SlideShare a Scribd company logo
D E C O D E R
7 4 L S 1 3 8 B I N A R Y D E C O D E R
A D D R E S S D E C O D I N G U S I N G 3 * 8 D E C O D E R
I N 8 0 8 5 M I C R O P R O C E S S O R
Bus Structure, Memory and I/O
Interfacing
Er. Sulav Paudel | MSc
Decoder
 The decoder is a logic circuit that indentifies each
combination of the signals present at its input.
 If the input to the decoder had ‘n’ lines, the decoder
will have 2n output lines.
 Eg, if n = 2, the no. of output lines = 2n = 22 = 4.
 The two lines can assume four combinations of input
signals – 00, 01, 10, 11; with each combination
identified by the output lines 0 to 3. If the input is 11,
the output line 3 will be at logic 1 and other will
remain at logic 0. This is called decoding.
Er. Sulav Paudel | MSc
Decoder
 Various types of decoders are available, eg., 3 to 8, 4
to 16, etc.
 In general decoders have enable lines too. The
decoder will not function unless enable lines are
activated.
A 2-to-4 Binary Decoders
Er. Sulav Paudel | MSc
74LS138 Binary Decoder
 If the input has three binary lines, then the output
lines would be 8.
74LS138 Binary Decoder
Er. Sulav Paudel | MSc
74LS138 Binary Decoder (cont.)
Er. Sulav Paudel | MSc
 74LS138 can be used to decode 3 address lines to enable
up to 8 memory chips (each of its output can be used to
enable a different chip).
 All 8 outputs are not asserted when the enable input is
not asserted.
 Only one output is asserted when enable input is
asserted, and the output asserted depends on the A, B, C
selection inputs (one output for each possible
combination).
 Sometimes an external logic gate may be used in
conjunction with the 74LS138 to perform decoding using
more than 3 address lines.
A 4-to-16 Binary Decoder Configuration
Er. Sulav Paudel | MSc
Memory Address Decoding
Er. Sulav Paudel | MSc
Memory Address Decoding
 The binary decoder requires only 3 address lines, (A0 to
A2) to select each one of the 8 chips (the lower part of the
address), while the remaining 8 address lines (A3 to A10)
select the correct memory location on that chip (the
upper part of the address).
 Having selected a memory location using the address
bus, the information at the particular internal memory
location is sent to a common “Data Bus” for use by the
microprocessor.
 This is of course a simple example but the principals
remain the same the same for all types of memory chips
or modules.
Er. Sulav Paudel | MSc
Encoder
 The encoder is a logic circuit that provides the
appropriate code (binary, BCD, etc.) as output for
each input signals.
 The process is reverse of decoding.
Er. Sulav Paudel | MSc
Address Decoding using 3 * 8 Decoder in 8085
Microprocessor
Interface 2K bytes of memory to 8085 with memory
address 8000H. (Using logic gates and decoder)
 Solution:
2K = 2048 = 211
The total address lines required will be A10 to A0.
Write the 8000H, starting addressing in the table
below. The ending address can be found as follows:
A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
Er. Sulav Paudel | MSc
 In this state, 11 bits are used for 2K bytes of memory.
 It will be minimum value when A10 to A0 lines are
zero and when A10 to A0 lines all are high, it will be
maximum value. So maximum value in HEX is
87FFH which is the ending address.
Er. Sulav Paudel | MSc
Address decoding using simple NAND gate
decoder
 Thus A15 to A11 = ‘1 0 0 0 0’, these lines are used to
select the memory chip.
Er. Sulav Paudel | MSc
Addressing decoding using simple NAND gate decoder
Address decoding using simple NAND gate 3 * 8
Decoder in 8085 Microprocessor
Er. Sulav Paudel | MSc
Address Decoding using 74LS138 Decoder
Er. Sulav Paudel | MSc
 Interface 64K (eight 8K * 8 bits) byte block of
memory with the physical address in the range
F0000H to FFFFFH
 Solution:
8K = 213 bytes in each EPROM
Address Decoding using 74LS138 Decoder
Er. Sulav Paudel | MSc
Mapped the memory directly to an 8K byte block
1st block: F0000H – F1FFFH
2nd block: F2000H – F3FFFH
3rd block: F4000H – F5FFFH
4th block: F6000H – F7FFFH
5th block: F8000H – F9FFFH
6th block: FA000H – FBFFFH
7th block: FC000H – FDFFFH
8th block: FE000H – FFFFFH
Address Decoding using 74LS138 Decoder
Er. Sulav Paudel | MSc
 The most significant hexadecimal digit must be F to
address the 8 EPROMS.
 Hence, address lines A16 – A19 may be used to
enable the 138 decoder (so that CE signals are only
generated if A16 – A19 are all asserted)
Address Decoding using 74LS138 Decoder
Er. Sulav Paudel | MSc
1st block: F0000 – F1FFFH = 1111 0000 0000 0000 0000
1111 0001 1111 1111 1111
2nd block: F2000 – F3FFFH
3rd block:
4th block:
5th block:
6th block:
7th block:
8th block: FE000 – FFFFFH = 1111 1110 0000 0000 0000
1111 1111 1111 1111 1111
Used for
Enable
pins
Used for
Selection
pins
Address Decoding using 74LS138 Decoder
Er. Sulav Paudel | MSc
 The address pins of each EPROM (Memory) must be
connected to the 13 least significant address lines in
order to address the 213 (=8K) bytes in each EPROM.

More Related Content

What's hot

PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
Dr.YNM
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
Mahalakshmiv11
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
UshaRani289
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
Poojith Chowdhary
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
kamlesh deshmukh
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
Aniket Thakur
 
Ec8791 arm 9 processor
Ec8791 arm 9 processorEc8791 arm 9 processor
Ec8791 arm 9 processor
RajalakshmiSermadurai
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
deval patel
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
Mathivanan Natarajan
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
Srikrishna Thota
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
deval patel
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
hello_priti
 
Programmers model of 8086
Programmers model of 8086Programmers model of 8086
Programmers model of 8086
KunalPatel260
 
Analog to Digital converter in ARM
Analog to Digital converter in ARMAnalog to Digital converter in ARM
Analog to Digital converter in ARM
Aarav Soni
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
ShivamSood22
 
8086 pin details
8086 pin details8086 pin details
8086 pin details
AJAL A J
 
8251 USART
8251 USART8251 USART
8251 USART
ShivamSood22
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
Zakaria Gomaa
 

What's hot (20)

PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
Ec8791 arm 9 processor
Ec8791 arm 9 processorEc8791 arm 9 processor
Ec8791 arm 9 processor
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 
Programmers model of 8086
Programmers model of 8086Programmers model of 8086
Programmers model of 8086
 
Analog to Digital converter in ARM
Analog to Digital converter in ARMAnalog to Digital converter in ARM
Analog to Digital converter in ARM
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
8086 pin details
8086 pin details8086 pin details
8086 pin details
 
8251 USART
8251 USART8251 USART
8251 USART
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
 

Similar to Bus Structure, Memory and I/O Interfacing

knowledge in daily life.ppt
knowledge in daily life.pptknowledge in daily life.ppt
knowledge in daily life.ppt
SunilSharma941036
 
Notes chapter 6
Notes chapter  6Notes chapter  6
Notes chapter 6
HarshitParkar6677
 
memory-interfacing.ppt
memory-interfacing.pptmemory-interfacing.ppt
memory-interfacing.ppt
Vanitha472439
 
interfacing1 lecture notes for eng 5.ppt
interfacing1 lecture notes for eng 5.pptinterfacing1 lecture notes for eng 5.ppt
interfacing1 lecture notes for eng 5.ppt
JumanneChiyanda
 
Memory intrface and addrs modes
Memory intrface and addrs modesMemory intrface and addrs modes
Memory intrface and addrs modesbalbirvirdi
 
ATT SMK.pptx
ATT SMK.pptxATT SMK.pptx
ATT SMK.pptx
MadhavKarve
 
pin-diagram of 8085_new.ppt
pin-diagram of 8085_new.pptpin-diagram of 8085_new.ppt
pin-diagram of 8085_new.ppt
praveenkistappagari
 
8085 microprocessor Architecture and pin description
8085 microprocessor Architecture and pin description 8085 microprocessor Architecture and pin description
8085 microprocessor Architecture and pin description
Vijay Kumar
 
8085 Interfacing with I/O Devices or Memory
8085 Interfacing with I/O Devices or Memory8085 Interfacing with I/O Devices or Memory
8085 Interfacing with I/O Devices or Memory
Saumay Paul
 
lecture 18PART 1 Memory Interfacing.pptx
lecture 18PART 1  Memory Interfacing.pptxlecture 18PART 1  Memory Interfacing.pptx
lecture 18PART 1 Memory Interfacing.pptx
0901ET211047ROHITSIN
 
decoders121-170714184489769876987698749.pptx
decoders121-170714184489769876987698749.pptxdecoders121-170714184489769876987698749.pptx
decoders121-170714184489769876987698749.pptx
tlap4412
 
16. memory interfacing ii
16. memory interfacing ii16. memory interfacing ii
16. memory interfacing ii
sandip das
 
Microprocessor history1
Microprocessor history1Microprocessor history1
Microprocessor history1
HarshitParkar6677
 
Microprocessor history1
Microprocessor history1Microprocessor history1
Microprocessor history1
HarshitParkar6677
 
timing_diagram_of_8085.pptx
timing_diagram_of_8085.pptxtiming_diagram_of_8085.pptx
timing_diagram_of_8085.pptx
BhagyarajKosamia
 
Ch3 ppt
Ch3 pptCh3 ppt
Ch3 ppt
wasz123
 
Decoders-Digital Electronics
Decoders-Digital ElectronicsDecoders-Digital Electronics
Decoders-Digital Electronics
Paurav Shah
 
8085 architecture
8085 architecture8085 architecture
8085 architecture
Rishabh Kataria
 
Microprocessor questions converted
Microprocessor questions convertedMicroprocessor questions converted
Microprocessor questions converted
ArghodeepPaul
 

Similar to Bus Structure, Memory and I/O Interfacing (20)

Interfacing address
Interfacing addressInterfacing address
Interfacing address
 
knowledge in daily life.ppt
knowledge in daily life.pptknowledge in daily life.ppt
knowledge in daily life.ppt
 
Notes chapter 6
Notes chapter  6Notes chapter  6
Notes chapter 6
 
memory-interfacing.ppt
memory-interfacing.pptmemory-interfacing.ppt
memory-interfacing.ppt
 
interfacing1 lecture notes for eng 5.ppt
interfacing1 lecture notes for eng 5.pptinterfacing1 lecture notes for eng 5.ppt
interfacing1 lecture notes for eng 5.ppt
 
Memory intrface and addrs modes
Memory intrface and addrs modesMemory intrface and addrs modes
Memory intrface and addrs modes
 
ATT SMK.pptx
ATT SMK.pptxATT SMK.pptx
ATT SMK.pptx
 
pin-diagram of 8085_new.ppt
pin-diagram of 8085_new.pptpin-diagram of 8085_new.ppt
pin-diagram of 8085_new.ppt
 
8085 microprocessor Architecture and pin description
8085 microprocessor Architecture and pin description 8085 microprocessor Architecture and pin description
8085 microprocessor Architecture and pin description
 
8085 Interfacing with I/O Devices or Memory
8085 Interfacing with I/O Devices or Memory8085 Interfacing with I/O Devices or Memory
8085 Interfacing with I/O Devices or Memory
 
lecture 18PART 1 Memory Interfacing.pptx
lecture 18PART 1  Memory Interfacing.pptxlecture 18PART 1  Memory Interfacing.pptx
lecture 18PART 1 Memory Interfacing.pptx
 
decoders121-170714184489769876987698749.pptx
decoders121-170714184489769876987698749.pptxdecoders121-170714184489769876987698749.pptx
decoders121-170714184489769876987698749.pptx
 
16. memory interfacing ii
16. memory interfacing ii16. memory interfacing ii
16. memory interfacing ii
 
Microprocessor history1
Microprocessor history1Microprocessor history1
Microprocessor history1
 
Microprocessor history1
Microprocessor history1Microprocessor history1
Microprocessor history1
 
timing_diagram_of_8085.pptx
timing_diagram_of_8085.pptxtiming_diagram_of_8085.pptx
timing_diagram_of_8085.pptx
 
Ch3 ppt
Ch3 pptCh3 ppt
Ch3 ppt
 
Decoders-Digital Electronics
Decoders-Digital ElectronicsDecoders-Digital Electronics
Decoders-Digital Electronics
 
8085 architecture
8085 architecture8085 architecture
8085 architecture
 
Microprocessor questions converted
Microprocessor questions convertedMicroprocessor questions converted
Microprocessor questions converted
 

Recently uploaded

NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 

Bus Structure, Memory and I/O Interfacing

  • 1. D E C O D E R 7 4 L S 1 3 8 B I N A R Y D E C O D E R A D D R E S S D E C O D I N G U S I N G 3 * 8 D E C O D E R I N 8 0 8 5 M I C R O P R O C E S S O R Bus Structure, Memory and I/O Interfacing Er. Sulav Paudel | MSc
  • 2. Decoder  The decoder is a logic circuit that indentifies each combination of the signals present at its input.  If the input to the decoder had ‘n’ lines, the decoder will have 2n output lines.  Eg, if n = 2, the no. of output lines = 2n = 22 = 4.  The two lines can assume four combinations of input signals – 00, 01, 10, 11; with each combination identified by the output lines 0 to 3. If the input is 11, the output line 3 will be at logic 1 and other will remain at logic 0. This is called decoding. Er. Sulav Paudel | MSc
  • 3. Decoder  Various types of decoders are available, eg., 3 to 8, 4 to 16, etc.  In general decoders have enable lines too. The decoder will not function unless enable lines are activated. A 2-to-4 Binary Decoders Er. Sulav Paudel | MSc
  • 4. 74LS138 Binary Decoder  If the input has three binary lines, then the output lines would be 8. 74LS138 Binary Decoder Er. Sulav Paudel | MSc
  • 5. 74LS138 Binary Decoder (cont.) Er. Sulav Paudel | MSc  74LS138 can be used to decode 3 address lines to enable up to 8 memory chips (each of its output can be used to enable a different chip).  All 8 outputs are not asserted when the enable input is not asserted.  Only one output is asserted when enable input is asserted, and the output asserted depends on the A, B, C selection inputs (one output for each possible combination).  Sometimes an external logic gate may be used in conjunction with the 74LS138 to perform decoding using more than 3 address lines.
  • 6. A 4-to-16 Binary Decoder Configuration Er. Sulav Paudel | MSc
  • 7. Memory Address Decoding Er. Sulav Paudel | MSc
  • 8. Memory Address Decoding  The binary decoder requires only 3 address lines, (A0 to A2) to select each one of the 8 chips (the lower part of the address), while the remaining 8 address lines (A3 to A10) select the correct memory location on that chip (the upper part of the address).  Having selected a memory location using the address bus, the information at the particular internal memory location is sent to a common “Data Bus” for use by the microprocessor.  This is of course a simple example but the principals remain the same the same for all types of memory chips or modules. Er. Sulav Paudel | MSc
  • 9. Encoder  The encoder is a logic circuit that provides the appropriate code (binary, BCD, etc.) as output for each input signals.  The process is reverse of decoding. Er. Sulav Paudel | MSc
  • 10. Address Decoding using 3 * 8 Decoder in 8085 Microprocessor Interface 2K bytes of memory to 8085 with memory address 8000H. (Using logic gates and decoder)  Solution: 2K = 2048 = 211 The total address lines required will be A10 to A0. Write the 8000H, starting addressing in the table below. The ending address can be found as follows: A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 Er. Sulav Paudel | MSc
  • 11.  In this state, 11 bits are used for 2K bytes of memory.  It will be minimum value when A10 to A0 lines are zero and when A10 to A0 lines all are high, it will be maximum value. So maximum value in HEX is 87FFH which is the ending address. Er. Sulav Paudel | MSc
  • 12. Address decoding using simple NAND gate decoder  Thus A15 to A11 = ‘1 0 0 0 0’, these lines are used to select the memory chip. Er. Sulav Paudel | MSc Addressing decoding using simple NAND gate decoder
  • 13. Address decoding using simple NAND gate 3 * 8 Decoder in 8085 Microprocessor Er. Sulav Paudel | MSc
  • 14. Address Decoding using 74LS138 Decoder Er. Sulav Paudel | MSc  Interface 64K (eight 8K * 8 bits) byte block of memory with the physical address in the range F0000H to FFFFFH  Solution: 8K = 213 bytes in each EPROM
  • 15. Address Decoding using 74LS138 Decoder Er. Sulav Paudel | MSc Mapped the memory directly to an 8K byte block 1st block: F0000H – F1FFFH 2nd block: F2000H – F3FFFH 3rd block: F4000H – F5FFFH 4th block: F6000H – F7FFFH 5th block: F8000H – F9FFFH 6th block: FA000H – FBFFFH 7th block: FC000H – FDFFFH 8th block: FE000H – FFFFFH
  • 16. Address Decoding using 74LS138 Decoder Er. Sulav Paudel | MSc  The most significant hexadecimal digit must be F to address the 8 EPROMS.  Hence, address lines A16 – A19 may be used to enable the 138 decoder (so that CE signals are only generated if A16 – A19 are all asserted)
  • 17. Address Decoding using 74LS138 Decoder Er. Sulav Paudel | MSc 1st block: F0000 – F1FFFH = 1111 0000 0000 0000 0000 1111 0001 1111 1111 1111 2nd block: F2000 – F3FFFH 3rd block: 4th block: 5th block: 6th block: 7th block: 8th block: FE000 – FFFFFH = 1111 1110 0000 0000 0000 1111 1111 1111 1111 1111 Used for Enable pins Used for Selection pins
  • 18. Address Decoding using 74LS138 Decoder Er. Sulav Paudel | MSc  The address pins of each EPROM (Memory) must be connected to the 13 least significant address lines in order to address the 213 (=8K) bytes in each EPROM.