memory address decoding.pptx

31
8051 INTERFACING TO EXTERNAL MEMORY

Upload: mehuljain

Post on 23-Dec-2015

23 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MEMORY ADDRESS DECODING.pptx

8051 INTERFACING TO EXTERNAL MEMORY

Page 2: MEMORY ADDRESS DECODING.pptx

Interrupt locations in the program memory

Page 3: MEMORY ADDRESS DECODING.pptx

8051 Data memory map

Page 4: MEMORY ADDRESS DECODING.pptx

On-chip and Off-chip Program Code Access

On-chip and off-chip code ROMIn such a system we still have EA = Vcc, meaning that upon reset the 8051 executes the on-chip program first; then, when it reaches the end of the on-chip ROM it switches to external ROM for the rest of the program cod

Page 5: MEMORY ADDRESS DECODING.pptx

MEMORY ADDRESS DECODING

Logic gate as decoder

Page 6: MEMORY ADDRESS DECODING.pptx

74LS138 decoder

Page 7: MEMORY ADDRESS DECODING.pptx

74LS138 as Decoder

Page 8: MEMORY ADDRESS DECODING.pptx

Find the address range for following (a) Y4 (b) Y2 (c) Y7 Using the 74LS138 3-8 decoder

Page 9: MEMORY ADDRESS DECODING.pptx

8051 INTERFACING WITH EXTERNAL ROM

EA pin

Connect the EA pin to Vcc to indicate that the program code is stored in the mC's on-chip ROM.

To indicate that the program code is stored in external ROM, this pin must be connected to GND.

Program stored enable pin

Page 10: MEMORY ADDRESS DECODING.pptx

74LS373 D Latch

Page 11: MEMORY ADDRESS DECODING.pptx

P0 and P2 role in providing addresses

Address/Data Multiplexing

Page 12: MEMORY ADDRESS DECODING.pptx

Data, Address, and Control Buses for the 8031

Page 13: MEMORY ADDRESS DECODING.pptx

8031 Connection to External Program ROM

Page 14: MEMORY ADDRESS DECODING.pptx

8051 Connection to External Data ROM

External ROM for dataFor the ROM containing the program code, PSEN is used to fetch the code. For the ROM containing data, the RD signal is used to fetch the data.

Page 15: MEMORY ADDRESS DECODING.pptx

8031 Connection to External Data ROM and External Program ROM

Page 16: MEMORY ADDRESS DECODING.pptx

8051 Connection to External Data RAM

Page 17: MEMORY ADDRESS DECODING.pptx

A single external ROM for code and data

Page 18: MEMORY ADDRESS DECODING.pptx

8031 system with ROM and RAM

Page 19: MEMORY ADDRESS DECODING.pptx

8051 Accessing 256Kx8 External NV-RAM

Page 20: MEMORY ADDRESS DECODING.pptx

8051 accessing 256 K 8 external NV – RAM

Page 21: MEMORY ADDRESS DECODING.pptx

Example 1• Design a 8051 system with following specifications• (1) 8051 CPU working at 12 MHz• (2) 32 KB program memory (IC 2764) (8 KB)• (3) 16 KB data memory (IC 6264) (8 KB) • (4) 8255 PPI

• ROM Organization

Page 22: MEMORY ADDRESS DECODING.pptx

Memory Map of EPROM

Example 1

Page 23: MEMORY ADDRESS DECODING.pptx

Example 1

Memory map of RAM

Page 24: MEMORY ADDRESS DECODING.pptx

Final design Implementation

Example 1

Page 25: MEMORY ADDRESS DECODING.pptx

Example 2

• With neat schematic diagram show the interfacing of 8051 with following memory and I/O subsystem.

• (1) 32 KB SRAM (16 KB device)• (2) 32 KB EPROM (16 KB device)• (3) 8 LEDs with driver

Page 26: MEMORY ADDRESS DECODING.pptx

Memory map for EPROM and RAM

ROM /RAM Organization

Decoder for ROM /RAM

Example 2

Page 27: MEMORY ADDRESS DECODING.pptx

Example 2

Final design Implementation

Page 28: MEMORY ADDRESS DECODING.pptx

Example 3• Design 8KB (4 KB ) of RAM and 4 KB EOROM with 8051. The starting

address of ROM is 8000H.

Page 29: MEMORY ADDRESS DECODING.pptx

Example 3

Final design Implementation

Page 30: MEMORY ADDRESS DECODING.pptx

• The Flash program memory supports both parallel programming and in serial In-System Programming (ISP).

• Parallel programming mode offers gang-programming at high speed, reducing programming costs and time to market.

• ISP allows a device to be reprogrammed in the end product under software control.

• The capability to field/update the application firmware makes a wide range of applications possible.

• The P89V51RD2 is also In-Application Programmable (IAP), allowing the Flash program memory to be reconfigured even while the application is running.

Page 31: MEMORY ADDRESS DECODING.pptx

• Program Store Enable: PSEN is the read strobe for• external program memory. When the device is executing• from internal program memory, PSEN is inactive• (HIGH). When the device is executing code from• external program memory, PSEN is activated twice each• machine cycle, except that two PSEN activations are• skipped during each access to external data memory. A• forced HIGH-to-LOW input transition on the PSEN pin• while the RST input is continually held HIGH for more• than 10 machine cycles will cause the device to enter• external host mode programming.