13
1 2. Encoders and Decoders Active high/Active low inputs Active high inputs need a +5V for the pin to be considered as logic high Active low inputs need to be tied to the 0V for a logic high to be applied. +5V 0V

2. Encoders and Decoders

Embed Size (px)

Citation preview

Page 1: 2. Encoders and Decoders

1

2. Encoders and Decoders

Active high/Active low inputs

• Active high inputs

need a +5V for the

pin to be considered

as logic high

• Active low inputs

need to be tied to the

0V for a logic high to

be applied.

+5V

0V

Page 2: 2. Encoders and Decoders

2

Encoders• Used to convert from one numerical system to

another

• Decimal numbers are encoded to a binary

number

• Application

Keypad Encoder Display

Encoder• 74147 is a priority encoder

• Accepts a decimal input and gives the equivalent binary output

• The higher order input presented to the chip will be selected if two inputs are pressed at the same time

• E.g. 8 has priority over 7 etc

Page 3: 2. Encoders and Decoders

3

Truth table

74147 example application block

diagram

Keypad

(Decimal)

74147

(Decimal to

BCD

Converter)

BCD output

(inverted)

Page 4: 2. Encoders and Decoders

4

Typical circuit

Active Low

inputs

Active Low outputs

Limitations of the 74147

• Limited to 10 decimal inputs only

• Does not indicate when a switch has been

pressed

• The limitations are overcome by the

74HC148 encoder

Page 5: 2. Encoders and Decoders

5

74HC148

• The 74HC148 provides the option to

cascade encoders

• They are

– Inputs can be enabled/disabled

– Signals when any input is pressed

– Cascadable to encode more than 8 inputs

74HC148

Page 6: 2. Encoders and Decoders

6

74HC148

Application block diagram

Keypad

74148

(Decimal to

BCD

Converter)

74148

(Decimal to

BCD

Converter)

16 bit output

Page 7: 2. Encoders and Decoders

7

Application circuit – Two 74HC148 cascaded together

Decoder

• Decoding is the process of translating data from a form to another

• Most common– Binary to Digital outputs

– Binary to 7 Segment displays to indicate a numerical value

• Applications– Decode and address from the PC Address bus to select a particular device

– To select different devices one at a time

• Example 74HC42,74HC138

Page 8: 2. Encoders and Decoders

8

Use of decoders

Input

(Encode)Process Decode Display

74HC42 – BCD to decimal decoder

• Mutually exclusive outputs

• 1-of-8 de-multiplexing capability

• Outputs disabled for input codes above

nine

• Output capability: standard

• Integrated circuit category: MSI

Page 9: 2. Encoders and Decoders

9

74HC42 – BCD to decimal decoder

Pin layout Function diagram

74HC42 – BCD to decimal decoder

Truth Table

Page 10: 2. Encoders and Decoders

10

74HC42 – BCD to decimal decoder

Internal logic diagram

74HC42 – BCD to decimal decoder

Application circuit

Page 11: 2. Encoders and Decoders

11

74HC138

• Decoders come in many different forms!

• Sometimes a single IC needs to be

selected from a group of IC’s

• 74HC138 features• Demultiplexing capability

• Multiple input enable for easy expansion

• Ideal for memory chip select decoding

• Active LOW mutually exclusive outputs

• Integrated circuit category: MSI

74HC138

Page 12: 2. Encoders and Decoders

12

74HC138

74HC138 – Application circuit

Page 13: 2. Encoders and Decoders

13

74HC138 – Alternative application

circuitDriven from 5V

Application using am encoder to

display the number of days in a month