SlideShare a Scribd company logo
1 of 41
1
The 8051 Microcontroller and
Embedded Systems
CHAPTER 14
8051 INTERFACING
TO EXTERNAL
MEMORY
2
OBJECTIVES
 Contrast and compare various types of semiconductor memories in
terms of their capacity, organization, and access time
 Describe the relationship between the number of memory locations on
a chip, the number of data pins, and the chip capacity
 Define ROM memory and describe its use in 8051-based systems
 Contrast and compare PROM, EPROM, UV EPROM, EEPROM, flash
memory EPROM, and mask ROM memories
 Define RAM memory and describe its use in 8051-based systems
 Contrast and compare SRAM, NV-RAM, checksum byte, and DRAM
memories
 List the steps a CPU follows in memory address decoding
 Explain how to interface ROM with the 8031/51
 Explain how to use both on-chip and off-chip memory with the 8051
 Code 8051 Assembly programs accessing the 64K-byte data memory
space
3
SECTION 14.1: SEMICONDUCTOR
MEMORY
 Memory capacity
 The number of bits that a semiconductor
memory chip can store is called chip
capacity.
 It can be in units of Kbits (kilobits), Mbits
(megabits), and so on.
4
SECTION 14.1: SEMICONDUCTOR
MEMORY
 Memory organization
 Memory chips are organized into a
number of locations within the IC.
 Each location can hold 1 bit, 4 bits, 8 bits,
or even 16 bits, depending on how it is
designed internally.
5
SECTION 14.1: SEMICONDUCTOR
MEMORY
 Speed
 The speed of the memory chip
is commonly referred to as
its access time.
 The access time of memory chips
varies from a few nanoseconds to
hundreds of nanoseconds,
depending on the IC technology
used in the design and
abrication process.
Table 14–1 Powers of 2
6
SECTION 14.1: SEMICONDUCTOR
MEMORY
 ROM (read-only memory)
 ROM is a type of memory that does not
lose its contents when the power is
turned off.
 For this reason, ROM is also called
nonvolatile memory.
7
SECTION 14.1: SEMICONDUCTOR
MEMORY
 PROM (programmable ROM) and OTP
 PROM is programmed by blowing the
fuses.
 If the information burned into PROM is
wrong, that PROM must be discarded
since its internal fuses are blown
permanently.
8
SECTION 14.1: SEMICONDUCTOR
MEMORY
 EPROM (erasable programmable ROM)
and UV-EPROM
Figure 14–1 Pin Configurations for 27xx ROM Family
9
SECTION 14.1: SEMICONDUCTOR
MEMORY
Table 14–2 Some UV-EPROM Chips
10
SECTION 14.1: SEMICONDUCTOR
MEMORY
 EEPROM (electrically erasable
programmable ROM)
Table 14–3 Some EEPROM and Flash Chips
11
SECTION 14.1: SEMICONDUCTOR
MEMORY
 Flash memory EPROM
 flash memory can be programmed while it
is in its socket on the system board, it is
widely used to upgrade the BIOS ROM of
the PC.
 flash memory is semiconductor memory
with access time in the range of 100 ns
compared with disk access time in the
range of tens of milliseconds.
12
SECTION 14.1: SEMICONDUCTOR
MEMORY
 Mask ROM
 Mask ROM refers to a kind of ROM in
which the contents are programmed by
the IC manufacturer.
 Mask ROM is used when the needed
volume is high (hundreds of thousands)
and it is absolutely certain that the
contents will not change.
13
SECTION 14.1: SEMICONDUCTOR
MEMORY
 RAM (random access memory)
 RAM memory is called volatile memory
since cutting off the power to the IC
results in the loss of data.
14
SECTION 14.1: SEMICONDUCTOR
MEMORY
 SRAM (static RAM)
 Storage cells in static
RAM memory are
made of flip-flops
and therefore do
not require refreshing
in order to keep
their data.
 This is in contrast
to DRAM.
Figure 14–2
2Kx8 SRAM Pins
15
SECTION 14.1: SEMICONDUCTOR
MEMORY
Table 14–4 Some SRAM and NV-RAM Chips
16
SECTION 14.1: SEMICONDUCTOR
MEMORY
 NV-RAM (nonvolatile RAM)
 New type of nonvolatile RAM called NV-
RAM.
 Like other RAMS, it allows the CPU to
read and write to it, but when the power is
turned off the contents are not lost.
17
SECTION 14.1: SEMICONDUCTOR
MEMORY
 Checksum byte ROM
 checksum will detect any corruption of
the contents of ROM
18
SECTION 14.1: SEMICONDUCTOR
MEMORY
 DRAM (dynamic RAM)
uses a capacitor to
store each bit
 requires constant
refreshing due to
leakage
Figure 14–3 256Kx1 DRAM
19
SECTION 14.1: SEMICONDUCTOR
MEMORY
20
SECTION 14.1: SEMICONDUCTOR
MEMORY
 Packaging issue in DRAM
 In DRAM there is a problem of packing a
large number of cells into a single chip
with the normal number of pins assigned
to addresses
21
SECTION 14.1: SEMICONDUCTOR
MEMORY
 DRAM organization
22
SECTION 14.2: MEMORY ADDRESS
DECODING
 Simple logic gate address decoder
Figure 14–4 Logic Gate as Decoder
23
SECTION 14.2: MEMORY ADDRESS
DECODING
 Using the 74LS138 3-8 decoder
Figure 14–5
74LS138 Decoder
(Reprinted by permission of Texas Instruments,
Copyright Texas Instruments, 1988)
24
SECTION 14.2: MEMORY ADDRESS
DECODING
Figure 14–6 74LS138 as Decoder
25
SECTION 14.2: MEMORY ADDRESS
DECODING
 Using programmable logic as an address
decoder
 The advantage of these chips is that they can be
programmed for any combination of address
ranges, and so are much more versatile.
 PALs and GALS have 10 or more inputs (in
contrast to 6 in the 74138) means that they can
accommodate more address inputs.
26
SECTION 14.3: 8031/51 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.
Figure 14–7 8051 Pin Diagram
27
SECTION 14.3: 8031/51 INTERFACING
WITH EXTERNAL ROM
Figure 14–8
74LS373 D Latch
(Reprinted by permission of Texas Instruments,
Copyright Texas Instruments, 1988)
28
SECTION 14.3: 8031/51 INTERFACING
WITH EXTERNAL ROM
 P0 and P2 role in providing addresses
Figure 14–9 Address/Data Multiplexing
29
SECTION 14.3: 8031/51 INTERFACING
WITH EXTERNAL ROM
Figure 14–10 Data, Address, and Control Buses for the 8031
30
SECTION 14.3: 8031/51 INTERFACING
WITH EXTERNAL ROM
Figure 14–11 8031 Connection to External Program ROM
31
SECTION 14.3: 8031/51 INTERFACING
WITH EXTERNAL ROM
 PSEN
Figure 14–12 On-chip and Off-chip Program Code Access
32
SECTION 14.3: 8031/51 INTERFACING
WITH EXTERNAL ROM
 On-chip and off-chip code ROM
 In 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 code.
33
SECTION 14.4: 8051 DATA MEMORY
SPACE
 Data memory space
Figure 14–13 8051 Connection to External Data ROM
34
SECTION 14.4: 8051 DATA MEMORY
SPACE
 External ROM for data
 For 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.
35
SECTION 14.4: 8051 DATA MEMORY
SPACE
 MOVX instruction
Figure 14–14
8031 Connection to External Data ROM and External Program ROM
36
SECTION 14.4: 8051 DATA MEMORY
SPACE
 MOVX instruction for external RAM data
Figure 14–15 8051 Connection to External Data RAM
37
SECTION 14.4: 8051 DATA MEMORY
SPACE
 A single external ROM for code and data
Figure 14–16 A Single ROM for Both Program and Data
38
SECTION 14.4: 8051 DATA MEMORY
SPACE
 8031 system with ROM and RAM
Figure 14–17
8031 Connection to External Program ROM, Data RAM, and Data ROM
39
SECTION 14.4: 8051 DATA MEMORY
SPACE
 Interfacing to large external memory
Figure 14–18 8051 Accessing 256Kx8 External NV-RAM
40
SECTION 14.4: 8051 DATA MEMORY
SPACE
 ACCESSING 1 K-BYTE SRAM IN
ASSEMBLY
Figure 14–19 PMR Register Bits for 1K-byte SRAM of DS89C4x0 Chip
41
Next …
 Lecture Problems Textbook Chapter 11
– Answer as many questions as you can and
submit via MeL before the end of the lecture.

More Related Content

What's hot

The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsmanishpatel_79
 
Lecture SOHIL LUHAR
Lecture SOHIL LUHARLecture SOHIL LUHAR
Lecture SOHIL LUHARSOHIL LUHAR
 
Motorola 68hc11
Motorola 68hc11Motorola 68hc11
Motorola 68hc11gajani121
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller NotesDr.YNM
 
8051 microcontroller and embedded training (sahil gupta 9068557926)
8051 microcontroller and embedded training  (sahil gupta   9068557926)8051 microcontroller and embedded training  (sahil gupta   9068557926)
8051 microcontroller and embedded training (sahil gupta 9068557926)Sahil Gupta
 
Block diagram of msp430x5xx
Block diagram of msp430x5xxBlock diagram of msp430x5xx
Block diagram of msp430x5xxRAMYASREEKUPPALA
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt ianishgoel
 
Introduction to microcontrollers
Introduction to microcontrollersIntroduction to microcontrollers
Introduction to microcontrollersCorrado Santoro
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller918007165995
 
Ashish microcontroller 8051
Ashish microcontroller 8051Ashish microcontroller 8051
Ashish microcontroller 8051ASHISH RAJ
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerAmandeep Alag
 
Course material msp430-for_automatic_control
Course material msp430-for_automatic_controlCourse material msp430-for_automatic_control
Course material msp430-for_automatic_controlBhukya Mangu
 

What's hot (18)

The 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systemsThe 8051 microcontroler based embedded systems
The 8051 microcontroler based embedded systems
 
Embedded System
Embedded SystemEmbedded System
Embedded System
 
Lecture SOHIL LUHAR
Lecture SOHIL LUHARLecture SOHIL LUHAR
Lecture SOHIL LUHAR
 
At89s52
At89s52At89s52
At89s52
 
Motorola 68hc11
Motorola 68hc11Motorola 68hc11
Motorola 68hc11
 
89s52 2
89s52 289s52 2
89s52 2
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
8051 microcontroller and embedded training (sahil gupta 9068557926)
8051 microcontroller and embedded training  (sahil gupta   9068557926)8051 microcontroller and embedded training  (sahil gupta   9068557926)
8051 microcontroller and embedded training (sahil gupta 9068557926)
 
Block diagram of msp430x5xx
Block diagram of msp430x5xxBlock diagram of msp430x5xx
Block diagram of msp430x5xx
 
Question Bank microcontroller 8051
Question Bank microcontroller 8051Question Bank microcontroller 8051
Question Bank microcontroller 8051
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt i
 
Introduction to microcontrollers
Introduction to microcontrollersIntroduction to microcontrollers
Introduction to microcontrollers
 
Study of 8051 microcontroller
Study of 8051 microcontrollerStudy of 8051 microcontroller
Study of 8051 microcontroller
 
Ashish microcontroller 8051
Ashish microcontroller 8051Ashish microcontroller 8051
Ashish microcontroller 8051
 
Embedded systems, 8051 microcontroller
Embedded systems, 8051 microcontrollerEmbedded systems, 8051 microcontroller
Embedded systems, 8051 microcontroller
 
Course material msp430-for_automatic_control
Course material msp430-for_automatic_controlCourse material msp430-for_automatic_control
Course material msp430-for_automatic_control
 

Similar to The 8051 Microcontroller and Embedded Systems

computer system embedded system volume1.ppt
computer system embedded system volume1.pptcomputer system embedded system volume1.ppt
computer system embedded system volume1.pptmshanajoel6
 
Rom (read only memory)
Rom (read only memory)Rom (read only memory)
Rom (read only memory)Hemin Patel
 
301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilog301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilogSrinivas Naidu
 
what is ROM? Rom(read only memory)
what is ROM? Rom(read only memory)what is ROM? Rom(read only memory)
what is ROM? Rom(read only memory)shire ali
 
Semiconductor memories and auxiliary memories
Semiconductor memories and auxiliary memoriesSemiconductor memories and auxiliary memories
Semiconductor memories and auxiliary memoriesAsif Iqbal
 
Introduction to Embedded System I : Chapter 2 (2nd portion)
Introduction to Embedded System I : Chapter 2 (2nd portion)Introduction to Embedded System I : Chapter 2 (2nd portion)
Introduction to Embedded System I : Chapter 2 (2nd portion)Moe Moe Myint
 
DIGITAL DESIGNS SLIDES 7 ENGINEERING 2ND YEAR
DIGITAL DESIGNS SLIDES 7 ENGINEERING  2ND YEARDIGITAL DESIGNS SLIDES 7 ENGINEERING  2ND YEAR
DIGITAL DESIGNS SLIDES 7 ENGINEERING 2ND YEARkasheen2803
 
ELEC3300_09-DMA.pdf
ELEC3300_09-DMA.pdfELEC3300_09-DMA.pdf
ELEC3300_09-DMA.pdfKwunHokChong
 
11. Computer Systems Hardware 1
11. Computer Systems   Hardware 111. Computer Systems   Hardware 1
11. Computer Systems Hardware 1New Era University
 
ROM(Read Only Memory )
ROM(Read Only Memory )ROM(Read Only Memory )
ROM(Read Only Memory )rohitladdu
 
rom-140919103032-phpapp02.pptx
rom-140919103032-phpapp02.pptxrom-140919103032-phpapp02.pptx
rom-140919103032-phpapp02.pptxRAJCHATTERJEE24
 
Giao trinh he thong nhung vdk h8
Giao trinh he thong nhung   vdk h8Giao trinh he thong nhung   vdk h8
Giao trinh he thong nhung vdk h8LÊ Tuấn
 
Read Only Memory
Read Only Memory Read Only Memory
Read Only Memory rohitladdu
 
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCET
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCETEC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCET
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCETSeshaVidhyaS
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorVikas Gupta
 
btech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxbtech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxSKWriters
 

Similar to The 8051 Microcontroller and Embedded Systems (20)

computer system embedded system volume1.ppt
computer system embedded system volume1.pptcomputer system embedded system volume1.ppt
computer system embedded system volume1.ppt
 
Rom (read only memory)
Rom (read only memory)Rom (read only memory)
Rom (read only memory)
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilog301378156 design-of-sram-in-verilog
301378156 design-of-sram-in-verilog
 
what is ROM? Rom(read only memory)
what is ROM? Rom(read only memory)what is ROM? Rom(read only memory)
what is ROM? Rom(read only memory)
 
Semiconductor memories and auxiliary memories
Semiconductor memories and auxiliary memoriesSemiconductor memories and auxiliary memories
Semiconductor memories and auxiliary memories
 
Introduction to Embedded System I : Chapter 2 (2nd portion)
Introduction to Embedded System I : Chapter 2 (2nd portion)Introduction to Embedded System I : Chapter 2 (2nd portion)
Introduction to Embedded System I : Chapter 2 (2nd portion)
 
DIGITAL DESIGNS SLIDES 7 ENGINEERING 2ND YEAR
DIGITAL DESIGNS SLIDES 7 ENGINEERING  2ND YEARDIGITAL DESIGNS SLIDES 7 ENGINEERING  2ND YEAR
DIGITAL DESIGNS SLIDES 7 ENGINEERING 2ND YEAR
 
computer Unit 5
computer Unit 5computer Unit 5
computer Unit 5
 
ELEC3300_09-DMA.pdf
ELEC3300_09-DMA.pdfELEC3300_09-DMA.pdf
ELEC3300_09-DMA.pdf
 
11. Computer Systems Hardware 1
11. Computer Systems   Hardware 111. Computer Systems   Hardware 1
11. Computer Systems Hardware 1
 
ROM(Read Only Memory )
ROM(Read Only Memory )ROM(Read Only Memory )
ROM(Read Only Memory )
 
rom-140919103032-phpapp02.pptx
rom-140919103032-phpapp02.pptxrom-140919103032-phpapp02.pptx
rom-140919103032-phpapp02.pptx
 
Giao trinh he thong nhung vdk h8
Giao trinh he thong nhung   vdk h8Giao trinh he thong nhung   vdk h8
Giao trinh he thong nhung vdk h8
 
002079
002079002079
002079
 
DDR DIMM Design
DDR DIMM DesignDDR DIMM Design
DDR DIMM Design
 
Read Only Memory
Read Only Memory Read Only Memory
Read Only Memory
 
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCET
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCETEC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCET
EC8392 -DIGITAL ELECTRONICS -II YEAR ECE-by S.SESHA VIDHYA /ASP/ ECE/ RMKCET
 
Interfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessorInterfacing memory with 8086 microprocessor
Interfacing memory with 8086 microprocessor
 
btech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptxbtech 8051 Microcontroller Programing.pptx
btech 8051 Microcontroller Programing.pptx
 

More from Avijeet Negel

More from Avijeet Negel (20)

TCP/IP
TCP/IPTCP/IP
TCP/IP
 
Upper OSI LAYER
Upper OSI LAYERUpper OSI LAYER
Upper OSI LAYER
 
SONET/SDH
SONET/SDHSONET/SDH
SONET/SDH
 
ATM
ATMATM
ATM
 
Frame Relay
Frame RelayFrame Relay
Frame Relay
 
X.25
X.25X.25
X.25
 
Integrated Services Digital Network (ISDN)
Integrated Services Digital Network (ISDN)Integrated Services Digital Network (ISDN)
Integrated Services Digital Network (ISDN)
 
Switching
SwitchingSwitching
Switching
 
Point to Point Protocol
Point to Point ProtocolPoint to Point Protocol
Point to Point Protocol
 
Networking and Networking Devices
Networking and Networking DevicesNetworking and Networking Devices
Networking and Networking Devices
 
DATA Link Control
DATA Link ControlDATA Link Control
DATA Link Control
 
CRC
CRCCRC
CRC
 
Error Detection and Correction
Error Detection and CorrectionError Detection and Correction
Error Detection and Correction
 
Telephone Network
Telephone NetworkTelephone Network
Telephone Network
 
Time Division Multiplexing
Time Division MultiplexingTime Division Multiplexing
Time Division Multiplexing
 
MULTIPLEXING
MULTIPLEXINGMULTIPLEXING
MULTIPLEXING
 
Radio Communication Band
Radio Communication BandRadio Communication Band
Radio Communication Band
 
Transmission Media
Transmission MediaTransmission Media
Transmission Media
 
DB-37 AND DB-9 CONNECTORS
DB-37 AND DB-9 CONNECTORSDB-37 AND DB-9 CONNECTORS
DB-37 AND DB-9 CONNECTORS
 
Transmission Of Digital Data
Transmission Of Digital DataTransmission Of Digital Data
Transmission Of Digital Data
 

Recently uploaded

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 

Recently uploaded (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 

The 8051 Microcontroller and Embedded Systems

  • 1. 1 The 8051 Microcontroller and Embedded Systems CHAPTER 14 8051 INTERFACING TO EXTERNAL MEMORY
  • 2. 2 OBJECTIVES  Contrast and compare various types of semiconductor memories in terms of their capacity, organization, and access time  Describe the relationship between the number of memory locations on a chip, the number of data pins, and the chip capacity  Define ROM memory and describe its use in 8051-based systems  Contrast and compare PROM, EPROM, UV EPROM, EEPROM, flash memory EPROM, and mask ROM memories  Define RAM memory and describe its use in 8051-based systems  Contrast and compare SRAM, NV-RAM, checksum byte, and DRAM memories  List the steps a CPU follows in memory address decoding  Explain how to interface ROM with the 8031/51  Explain how to use both on-chip and off-chip memory with the 8051  Code 8051 Assembly programs accessing the 64K-byte data memory space
  • 3. 3 SECTION 14.1: SEMICONDUCTOR MEMORY  Memory capacity  The number of bits that a semiconductor memory chip can store is called chip capacity.  It can be in units of Kbits (kilobits), Mbits (megabits), and so on.
  • 4. 4 SECTION 14.1: SEMICONDUCTOR MEMORY  Memory organization  Memory chips are organized into a number of locations within the IC.  Each location can hold 1 bit, 4 bits, 8 bits, or even 16 bits, depending on how it is designed internally.
  • 5. 5 SECTION 14.1: SEMICONDUCTOR MEMORY  Speed  The speed of the memory chip is commonly referred to as its access time.  The access time of memory chips varies from a few nanoseconds to hundreds of nanoseconds, depending on the IC technology used in the design and abrication process. Table 14–1 Powers of 2
  • 6. 6 SECTION 14.1: SEMICONDUCTOR MEMORY  ROM (read-only memory)  ROM is a type of memory that does not lose its contents when the power is turned off.  For this reason, ROM is also called nonvolatile memory.
  • 7. 7 SECTION 14.1: SEMICONDUCTOR MEMORY  PROM (programmable ROM) and OTP  PROM is programmed by blowing the fuses.  If the information burned into PROM is wrong, that PROM must be discarded since its internal fuses are blown permanently.
  • 8. 8 SECTION 14.1: SEMICONDUCTOR MEMORY  EPROM (erasable programmable ROM) and UV-EPROM Figure 14–1 Pin Configurations for 27xx ROM Family
  • 9. 9 SECTION 14.1: SEMICONDUCTOR MEMORY Table 14–2 Some UV-EPROM Chips
  • 10. 10 SECTION 14.1: SEMICONDUCTOR MEMORY  EEPROM (electrically erasable programmable ROM) Table 14–3 Some EEPROM and Flash Chips
  • 11. 11 SECTION 14.1: SEMICONDUCTOR MEMORY  Flash memory EPROM  flash memory can be programmed while it is in its socket on the system board, it is widely used to upgrade the BIOS ROM of the PC.  flash memory is semiconductor memory with access time in the range of 100 ns compared with disk access time in the range of tens of milliseconds.
  • 12. 12 SECTION 14.1: SEMICONDUCTOR MEMORY  Mask ROM  Mask ROM refers to a kind of ROM in which the contents are programmed by the IC manufacturer.  Mask ROM is used when the needed volume is high (hundreds of thousands) and it is absolutely certain that the contents will not change.
  • 13. 13 SECTION 14.1: SEMICONDUCTOR MEMORY  RAM (random access memory)  RAM memory is called volatile memory since cutting off the power to the IC results in the loss of data.
  • 14. 14 SECTION 14.1: SEMICONDUCTOR MEMORY  SRAM (static RAM)  Storage cells in static RAM memory are made of flip-flops and therefore do not require refreshing in order to keep their data.  This is in contrast to DRAM. Figure 14–2 2Kx8 SRAM Pins
  • 15. 15 SECTION 14.1: SEMICONDUCTOR MEMORY Table 14–4 Some SRAM and NV-RAM Chips
  • 16. 16 SECTION 14.1: SEMICONDUCTOR MEMORY  NV-RAM (nonvolatile RAM)  New type of nonvolatile RAM called NV- RAM.  Like other RAMS, it allows the CPU to read and write to it, but when the power is turned off the contents are not lost.
  • 17. 17 SECTION 14.1: SEMICONDUCTOR MEMORY  Checksum byte ROM  checksum will detect any corruption of the contents of ROM
  • 18. 18 SECTION 14.1: SEMICONDUCTOR MEMORY  DRAM (dynamic RAM) uses a capacitor to store each bit  requires constant refreshing due to leakage Figure 14–3 256Kx1 DRAM
  • 20. 20 SECTION 14.1: SEMICONDUCTOR MEMORY  Packaging issue in DRAM  In DRAM there is a problem of packing a large number of cells into a single chip with the normal number of pins assigned to addresses
  • 22. 22 SECTION 14.2: MEMORY ADDRESS DECODING  Simple logic gate address decoder Figure 14–4 Logic Gate as Decoder
  • 23. 23 SECTION 14.2: MEMORY ADDRESS DECODING  Using the 74LS138 3-8 decoder Figure 14–5 74LS138 Decoder (Reprinted by permission of Texas Instruments, Copyright Texas Instruments, 1988)
  • 24. 24 SECTION 14.2: MEMORY ADDRESS DECODING Figure 14–6 74LS138 as Decoder
  • 25. 25 SECTION 14.2: MEMORY ADDRESS DECODING  Using programmable logic as an address decoder  The advantage of these chips is that they can be programmed for any combination of address ranges, and so are much more versatile.  PALs and GALS have 10 or more inputs (in contrast to 6 in the 74138) means that they can accommodate more address inputs.
  • 26. 26 SECTION 14.3: 8031/51 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. Figure 14–7 8051 Pin Diagram
  • 27. 27 SECTION 14.3: 8031/51 INTERFACING WITH EXTERNAL ROM Figure 14–8 74LS373 D Latch (Reprinted by permission of Texas Instruments, Copyright Texas Instruments, 1988)
  • 28. 28 SECTION 14.3: 8031/51 INTERFACING WITH EXTERNAL ROM  P0 and P2 role in providing addresses Figure 14–9 Address/Data Multiplexing
  • 29. 29 SECTION 14.3: 8031/51 INTERFACING WITH EXTERNAL ROM Figure 14–10 Data, Address, and Control Buses for the 8031
  • 30. 30 SECTION 14.3: 8031/51 INTERFACING WITH EXTERNAL ROM Figure 14–11 8031 Connection to External Program ROM
  • 31. 31 SECTION 14.3: 8031/51 INTERFACING WITH EXTERNAL ROM  PSEN Figure 14–12 On-chip and Off-chip Program Code Access
  • 32. 32 SECTION 14.3: 8031/51 INTERFACING WITH EXTERNAL ROM  On-chip and off-chip code ROM  In 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 code.
  • 33. 33 SECTION 14.4: 8051 DATA MEMORY SPACE  Data memory space Figure 14–13 8051 Connection to External Data ROM
  • 34. 34 SECTION 14.4: 8051 DATA MEMORY SPACE  External ROM for data  For 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.
  • 35. 35 SECTION 14.4: 8051 DATA MEMORY SPACE  MOVX instruction Figure 14–14 8031 Connection to External Data ROM and External Program ROM
  • 36. 36 SECTION 14.4: 8051 DATA MEMORY SPACE  MOVX instruction for external RAM data Figure 14–15 8051 Connection to External Data RAM
  • 37. 37 SECTION 14.4: 8051 DATA MEMORY SPACE  A single external ROM for code and data Figure 14–16 A Single ROM for Both Program and Data
  • 38. 38 SECTION 14.4: 8051 DATA MEMORY SPACE  8031 system with ROM and RAM Figure 14–17 8031 Connection to External Program ROM, Data RAM, and Data ROM
  • 39. 39 SECTION 14.4: 8051 DATA MEMORY SPACE  Interfacing to large external memory Figure 14–18 8051 Accessing 256Kx8 External NV-RAM
  • 40. 40 SECTION 14.4: 8051 DATA MEMORY SPACE  ACCESSING 1 K-BYTE SRAM IN ASSEMBLY Figure 14–19 PMR Register Bits for 1K-byte SRAM of DS89C4x0 Chip
  • 41. 41 Next …  Lecture Problems Textbook Chapter 11 – Answer as many questions as you can and submit via MeL before the end of the lecture.