Microcontroller Memory Operations: Read/Write Modules & Timing Diagrams - Prof. Andrew Fag, Study notes of Aerospace Engineering

An in-depth look into memory operations in microcontrollers, focusing on read/write memory modules and their timing diagrams. The basics of memory elements, addressing, and the sequence of events during a read or write operation. It also includes examples using the atmel mega8 microcontroller.

Typology: Study notes

Pre 2010

Uploaded on 09/17/2009

koofers-user-qck
koofers-user-qck 🇺🇸

10 documents

1 / 164

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Andrew H. Fagg: Embedded Real-
Time Systems: Microcontrollers 1
Components of a Microprocessor
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Microcontroller Memory Operations: Read/Write Modules & Timing Diagrams - Prof. Andrew Fag and more Study notes Aerospace Engineering in PDF only on Docsity!

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Components of a Microprocessor

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Components of a Microprocessor• Memory:

  • Storage of data– Storage of a program
    • Registers: small, fast memories
      • General purpose: store arbitrary data– Special purpose: used to control the

processor

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Components of a Microprocessor• Instruction decoder:

  • Translates current program instruction into a

set of control signals

  • Arithmetic logical unit:
    • Performs both arithmetic and logical

operations on data

  • Input/output control modules

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Components of a Microprocessor• Many of these components must

exchange data with one-another

  • It is common to use a ‘bus’ for this

exchange

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Buses

  • At most one component may write to the

bus at any one time

  • Which component is allowed to write is

usually determined by the instructiondecoder (in the microprocessor case)

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Collections of Bits

  • 8 bits: a “byte”• 4 bits: a “nybble”• “words”: can be 8, 16, or 32 bits

(depending on the processor)

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Memory

What are the essential components of a

memory?

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

A Memory Abstraction

  • We think of memory as an array of

elements – each with its own address

  • Each element contains a value
    • It is most common for the values to by 8-bits

wide (so a byte)

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Memory Operations

Read

foo(A+5); reads the value from the memory locationreferenced by ‘A’ and adds the value to 5.The result is passed to a function called foo();

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Memory Operations

Write

A

writes the value 5 into the memory locationreferenced by ‘A’

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Types of Memory

Read Only Memory (ROM)• Computer

cannot

arbitrarily change state

of this memory

  • When power is lost, the contents are

maintained

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Types of Memory

Erasable/Programmable ROM (EPROM)• State can be changed under very specific

conditions (usually not when connected toa computer)

  • Our microcontrollers have an Electrically

Erasable/Programmable ROM (EEPROM)for program storage

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Today

  • Memory behavior• Atmel mega8 microcontroller• Assembly language (just a hint)• Digital I/O with the Atmel mega

Andrew H. Fagg: Embedded Real-Time Systems: Microcontrollers

Administrivia

  • Homework 2 is out
    • Due on February 14

th

(one week)