SlideShare a Scribd company logo
1 of 18
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

Arduino and its hw architecture
Arduino and its hw architectureArduino and its hw architecture
Arduino and its hw architectureZeeshan Rafiq
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adcPRADEEP
 
Flag register 8086 assignment
Flag register 8086 assignmentFlag register 8086 assignment
Flag register 8086 assignmentZia3130
 
Transistor Transistor Logic
Transistor Transistor LogicTransistor Transistor Logic
Transistor Transistor Logicsurat murthy
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architectureprasadpawaskar
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 MicroprocessorNahian Ahmed
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptxMemonaMemon1
 
Typical Embedded System
Typical Embedded SystemTypical Embedded System
Typical Embedded Systemanand hd
 
Fm transmitter and receivers
Fm transmitter and receiversFm transmitter and receivers
Fm transmitter and receiversYogesh Bhargawa
 
Logic Families ( Digital Electronics )
Logic Families ( Digital Electronics )Logic Families ( Digital Electronics )
Logic Families ( Digital Electronics )Yaksh Jethva
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O portsanishgoel
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexersUnsa Shakir
 

What's hot (20)

ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
Arduino and its hw architecture
Arduino and its hw architectureArduino and its hw architecture
Arduino and its hw architecture
 
8251 USART
8251 USART8251 USART
8251 USART
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adc
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counter
 
Flag register 8086 assignment
Flag register 8086 assignmentFlag register 8086 assignment
Flag register 8086 assignment
 
Transistor Transistor Logic
Transistor Transistor LogicTransistor Transistor Logic
Transistor Transistor Logic
 
FPGA
FPGAFPGA
FPGA
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
IEEE-488
IEEE-488IEEE-488
IEEE-488
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
8051 MICROCONTROLLER ARCHITECTURE.pptx
 8051 MICROCONTROLLER ARCHITECTURE.pptx 8051 MICROCONTROLLER ARCHITECTURE.pptx
8051 MICROCONTROLLER ARCHITECTURE.pptx
 
Typical Embedded System
Typical Embedded SystemTypical Embedded System
Typical Embedded System
 
Fm transmitter and receivers
Fm transmitter and receiversFm transmitter and receivers
Fm transmitter and receivers
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
Trapatt diode
Trapatt diodeTrapatt diode
Trapatt diode
 
Logic Families ( Digital Electronics )
Logic Families ( Digital Electronics )Logic Families ( Digital Electronics )
Logic Families ( Digital Electronics )
 
Pin diagram 8085
Pin diagram 8085 Pin diagram 8085
Pin diagram 8085
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
multiplexers and demultiplexers
 multiplexers and demultiplexers multiplexers and demultiplexers
multiplexers and demultiplexers
 

Similar to Bus Structure, Memory and I/O Interfacing

memory-interfacing.ppt
memory-interfacing.pptmemory-interfacing.ppt
memory-interfacing.pptVanitha472439
 
Memory intrface and addrs modes
Memory intrface and addrs modesMemory intrface and addrs modes
Memory intrface and addrs modesbalbirvirdi
 
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 MemorySaumay Paul
 
lecture 18PART 1 Memory Interfacing.pptx
lecture 18PART 1  Memory Interfacing.pptxlecture 18PART 1  Memory Interfacing.pptx
lecture 18PART 1 Memory Interfacing.pptx0901ET211047ROHITSIN
 
decoders121-170714184489769876987698749.pptx
decoders121-170714184489769876987698749.pptxdecoders121-170714184489769876987698749.pptx
decoders121-170714184489769876987698749.pptxtlap4412
 
16. memory interfacing ii
16. memory interfacing ii16. memory interfacing ii
16. memory interfacing iisandip das
 
timing_diagram_of_8085.pptx
timing_diagram_of_8085.pptxtiming_diagram_of_8085.pptx
timing_diagram_of_8085.pptxBhagyarajKosamia
 
Decoders-Digital Electronics
Decoders-Digital ElectronicsDecoders-Digital Electronics
Decoders-Digital ElectronicsPaurav Shah
 
Microprocessor questions converted
Microprocessor questions convertedMicroprocessor questions converted
Microprocessor questions convertedArghodeepPaul
 
2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptx2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptxISMT College
 

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
 
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
 
2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptx2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptx
 

Recently uploaded

EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
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
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
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
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
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
 
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
 
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
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 

Recently uploaded (20)

EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
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
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
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
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
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
 
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
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
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
 
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
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 

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.