Introduction to Microprocessors
1kB x 8bit Memory chip
2
Memory Chip Interfacing
• Address lines of a Microprocessor
• Data lines of a Microprocessor
3
Memory Extended and Expanded
8 bit 8 bit
A0
D0
1kB A0 D0 Memory
A9 D7 Extended
A0 2kB
D0 D7
A10
1kB
A9 D7
16 bit
8 bit 8 bit
A0 A0 D0 Memory
1kB 1kB 2kB Expanded
A9 A9 D15
4
Memory Organization
Computer memory
Primary memory Secondary memory
(Main memory)
HDD, CD, DVD,
ROM, RAM Flash drive,Tape, etc…
5
Random Access memory ( RAM )
Random Access Memory (RAM) is a type of
memory used for temporary storing data and
intermediate results created and used during the
operation of the microcontrollers/microprocessor. The
content of this memory is cleared once the power supply
is off.
A memory device that can be read and written.
Volatile: It looses its data when the power supply is
switched-off
When the supply is switched-on it contains random data.
A RAM device can be divide two types, Static and Dynamic
Static RAM ( SRAM )
Static ram consisting of array of flip-flops.
Information stored in SRAM is lost when the power is
removed from them.
Dynamic RAM ( DRAM )
Dynamic Ram consisting of array of capacitors.
Charged and discharge represent two binary
states.
Advantage and Disadvantage of two RAM’s
SRAM is fast (Access time: 1ns) ( 60ns A/T for DRAM ).
SRAM needs more space on the semiconductor chip than
DRAM.
SRAM more expensive than DRAM.
SRAM consumes power only when accessed.
DRAM requires refreshing every 2 to 4 ms.
SRAM is used as a Cache.
Other types of RAM’s
• SDRAM – Synchronous dynamic random access
memory.
• DDR SDRAM – Double data rate synchronous
dynamic RAM.
• EDO DRAM – Extended data-out dynamic RAM.
• VRAM – Video RAM.
• SGRAM – Synchronous graphics RAM.
Read Only Memory (ROM)
• Memory device that maintains its data permanently (or
until the device is reprogrammed).
• Non-volatile: It maintains its data even without power
supply.
• Used to store Programs such as the BIOS.
• A ROM device can be Programmed by the
manufacturer.
• Programmable ROM can be program-erased-
reprogrammed many times.
• The size of ROM ranges from 512B to many KB and MB
range.
Types of ROM’s
ROM – Read only memory
PROM – Programmable read only memory
EPROM – Erasable Programmable ROM
EEPROM – Electrically erasable PROM
ROM (Read Only Memory)
ROM chip are fundamentally different from RAM chips.
RAM uses transistors and capacitors while ROM uses a
diodes.
The cell’s value is “0” if
there is no diode at that
intersection to connect
the column and row.
After the ROM chip is
created you cannot
reprogram or rewrite a
standard ROM chip.
PROM (Programmable read only memory)
PROM chips have a grid of columns and rows just as ordinary
ROMs do.
The difference is that every intersection of a column and row in a
PROM chip has a fuse connecting them.
The higher voltage breaks
the connection between the
column and row by burning
out the fuse. This process is
known as burning the
PROM.
PROMs can only be
programmed once.
EPROM (Erasable Programmable ROM)
EPROM chips can be rewritten many times. Erasing an EPROM
requires a special tool that emits a certain frequency of ultraviolet
(UV) light. Because this particular frequency will not penetrate
most plastics or glasses.
EPROMs are configured using an EPROM programmer that
provides voltage at specified levels depending on the type of
EPROM used.
Columns and rows intersection of
EPROM cell has two transistors. The two
transistors are separated from each
other by a thin oxide layer.
EEPROM (Electrically Erasable PROM)
Which can be erased and re-programmed by exposing it to
electric field.
The chip does not have to removed to be rewritten.
The entire chip does not have to be completely erased to
change a specific portion of it.
Changing the contents does not require additional
dedicated equipment.
EEPROM chips are too slow.
FLASH Memory
Flash memory is an electronic (solid-state)
non-volatile computer storage medium that can be
electrically erased and reprogrammed.
A type of EEPROM that uses in-circuit wiring to erase by
applying an electrical field to the entire chip or to
predetermined sections of the chip called blocks.
Flash memory works much faster than traditional
EEPROMs because it writes data in chunks, usually 512
bytes in size, instead of 1 byte at a time.
Programming Cell
To store a 0, a sufficient positive To store a 1, no charge is applied
voltage is applied to the control gate and the cell is left in the erased
with respect to the source to add condition.
charge to the floating gate during
programming.
https://en.wikipedia.org/wiki/Flash_memory
18
Types of ROM
Written during manufacture
Very expensive for small runs
Programmable (once)
PROM
Needs special equipment to program
Read “mostly”
Erasable Programmable (EPROM)
• Erased by UV
Electrically Erasable (EEPROM)
• Takes much longer to write than read
Flash memory
• Erase whole memory electrically
Next…
Memory Map and I/O device
Interfacing
&
Designing Microprocessor Based
Systems
20
I/O device Interfacing
Ex : Switch Interfacing (Input Device)
LED interfacing (Output Device)
7- Segment Interfacing (Output Device)
21
Memory Map
The memory map is a picture
representation of the address range
and shows where deferent memory
chips (ROM, RAM), I/O devices
(LED, Switches,
7-Segments, A to D converters,
Sensors, Etc…) are located within
the all address space of
microprocessor
22
Reset Vector
• Default starting location of a Central
Processing
Unit
• First Instruction executing address
• Design by Microprocessor Architecture
Ex: Motorola 6809
Reset Vector FFFE h and FFFF h
Intel 8088
Reset Vector FFFF0 h
23
Ex: Draw a Memory Map for following
microprocessor based system
ROM - 2KB
RAM - 4KB
One Seven segment
One Switch
Reset vector of the Processor 0000 H
Address Bus – 14 bits
Data Bus – 8 bits
24
Memory Map
ROM starting 0000 H
ROM (2KB locations)
location
(Reset Vector) 07FF H
1000 H ROM End
ROM starting location
and RAM (4KB locations)
End location
1FFF H
2000 H 7 Segment
3000 H Switch
End Address
Location of the
processor
3FFF H 25