Memory Interfacing With Problem
Memory Interfacing With Problem
EMBEDDED C PROGRAMMING
Memory And I/O Devices Interfacing
For external memory interfacing to 8051 port 0 & port 2 are used as multiplexed
address/data bus & higher order data bus respectively. If circuit needs on-chip peripherals e.g. serial
I/O & interrupts then only port is available for I/On such situation, I/O expansions is necessary & it
is achieved by using 8255.
External Memory Interfacing in 8051
Microcontroller
Why need External Memory Interfacing in 8051 Microcontroller ?
• Larger programs
• Data storage
• Flexibility
• Cost-effective
EXTERNAL PROGRAM MEMORY
Instructions to Access External ROM / Program Memory
• Given, Memory size: 4k that means we require 2n=4k :: n address lines here n=12 :: A0 to A11 address lines are required.
remaining lines A0, A0, A0, A0 & PSEN are connected though OR gate to CS & RD of external ROM. when A0 to A0 are
low (logic ‘0’), only then external ROM is selected.
3. Design a µController system using 8051, 16k bytes of ROM & 32k bytes of RAM.
Interface the memory such that starting address for ROM is 0000H & RAM is 8000H.