Download presentation
Presentation is loading. Please wait.
Published byAngela Gallagher Modified over 9 years ago
1
Decode 1.1 Decoder, Encoders and Displays ©Paul Godin Updated Aug 2013
2
Decode 1.2 Decoders
3
Decode 1.3 Decoder A decoder receives one binary value or state and converts it to another value or state. Some decoders accept an input binary value or number and enable a single output pin based on that value or number (such as a “3-to-8 decoder”) Some decoders provide a full conversion of the input to an output (such as a “BCD to a 7-segment display”) Basic decoders are comprised of combinational logic.
4
Decode 1.4 Output Select Decoders
5
Decode 1.5 Output Select Decoders An output selection or output enable decoder: input a binary number provides one active output from an array of outputs based on that input number Single output activated Binary Number
6
Decode 1.6 Output Select/Enable Decoders An example of a 3-to-8 decoder InputOutput CBA Decimal Y0Y0 Y1Y1 Y2Y2 Y3Y3 Y4Y4 Y5Y5 Y6Y6 Y7Y7 000001111111 001110111111 010211011111 011311101111 100411110111 101511111011 110611111101 111711111110 The output of this device is active low Note the input decimal value equals the output label
7
Decode 1.7 Application of a Decoder Device selection (enable) 3 to 8 Decoder Device Address Enable Device #0 Enable Device #1 Enable Device #2 Enable Device #3 Enable Device #4 Enable Device #5 Enable Device #6 Enable Device #7 Decoders have a variety of applications, including enabling specific devices based on an address. A very common application is to enable a single device on a shared bus.
8
Decode 1.8 Decoders The 7445 is a BCD to Decimal decoder. Input a BCD value Activate the output pin that corresponds to the BCD value Added feature is high current capabilities. Applications include lamp driver, relay driver, motor driver, etc... BCD to Decimal Decoder Device Address Enable Lamp #0 Enable Lamp #1 Enable Lamp #2 Enable Lamp #3 Enable Lamp #4 Enable Lamp #5 Enable Lamp #6 Enable Lamp #7 Enable Lamp #8 Enable Lamp #9
9
Decode 1.9 Exercise – In Class Look up the 74LS42 specification sheet and explain its operation. Look up the 74139 and the 74138 specification sheets and explain the additional control inputs. Design a 2-to-4 decoder. Using EWB, connect a counter to a decoder to enable devices in sequence.
10
Decode 1.10 Encoders
11
Decode 1.11 Encoders An encoder receives an active input on one of its pins and produces a binary number to identify the pin label. Priority encoders will provide a binary number of the input pin with the highest binary value. Priority is an issue if more than one input is active.
12
Decode 1.12 Priority Encoder Outputs a binary number that corresponds to the label of the active input pin. If more than one input is active, indicates the one corresponding to the highest value. Input active state Binary Number
13
Decode 1.13 8-to-3 Priority Encoder An example of an 8-to-3 priority encoder (74148) InputOutput Y0Y0 Y1Y1 Y2Y2 Y3Y3 Y4Y4 Y5Y5 Y6Y6 Y7Y7 CBA XXXXXXX0000 XXXXXX01001 XXXXX011010 XXXX0111011 XXX01111100 XX011111101 X0111111110 01111111111 The input is active low The output is active-low, where “000” represents “7”
14
Decode 1.14 Exercise – In Class Look up the 74LS148 specification sheet and explain its operation. Design a 4-to-2 encoder. Discuss a keyboard encoder.
15
Decode 1.15 LEDs and Displays
16
Decode 1.16 LEDs Light Emitting Diodes are common in digital electronics circuits because: Require relatively little current Generate very little heat Sufficient amount of light for most applications (indicators, illuminators) May not require additional support circuitry Inexpensive Small in size Variety of colors Long life Rugged and vibration resistance Variety of shapes and configurations Actively being improved and developed in industry
17
Decode 1.17 LED LEDs are diodes designed to emit light in the visible or in the non-visible spectrums. The electrical properties of LEDs are: Current can flow in one direction only. Have a voltage drop not related to resistance (V F ). They require an external resistor to limit current. Caution: Some LEDs are bright enough to damage eyesight, and some get very hot.
18
Decode 1.18 LED diagrams Logic Diagram Anode (+) Cathode (-) + - Flat Side - Long is +, like a battery symbol
19
Decode 1.19 LED Voltage Drops Typical LED Voltage Drops ColorBrightVoltage (V F ) Infrared1.4 Red1.7 √1.9 Yellow2.0 √3.4 Orange2.0 Green2.1 √3.4 Blue3.4 √3.7 White3.6 Typical maximum current is from 20mA to 30mA
20
Decode 1.20 Calculating Series Resistor Values Apply basic Ohm’s law to calculate resistor voltage. Subtract the V F of the LED from the supply voltage.
21
Decode 1.21 LED Current and Logic Gates Most TTL devices are rated to sink much more current than they can source. Example: 7400: I OH (output high current)=0.4mA IOL (output low current)=16mA Many LEDs require 10mA of current or more to be at their maximum designed brightness. LEDs should therefore be configured to turn on with an output logic low. Vcc Driver circuit
22
Decode 1.22 LED Testing LEDs have a higher voltage drop than the 0.3 or 0.7 volts of a typical diode. Meters may not produce sufficient voltage to overcome the V F of the LED. Use a power supply with a series resistor for a visual check (except infrared). Use a voltmeter to test for open/short. Did you know you can use the active display of a digital camera to see the operation of an infrared LED? Try your TV remote control on your web cam!
23
Decode 1.23 Exercise – In-class Given a red LED with a V F of 1.7 volts, a 5 volt output and a maximum output current of 5mA, calculate the series resistance value. Calculate the current of a series LED circuit where the LED has a VF of 2.0 V, the resistor is 220Ω and the output voltage is 5V. What does the voltage at point A equal, given a 5 volt output from the gate? A Typical test question
24
Decode 1.24 Decoders – Logic Conversion
25
Decode 1.25 7-Segment Displays Seven Segment displays are a set of LEDs within a single, specially-configured package. The two basic configurations are Common Anode (connected to Vcc) Common Cathode (connected to ground) c b a d e f g dp c b a d e f g c b a d e f g Common Cathode (-) Common Anode (+)
26
Decode 1.26 Decoders – Logic Conversion Some decoders convert from a BCD input to an output that is compatible with a 7-segment display. BCD to 7 Segment Decoder BCD Input (A to D) Resistor Pack Decoded Output (a to g) c b a d e f g dp
27
Decode 1.27 Display Drivers Display drivers include the 7447 and the 4518. All share similar characteristics: Input a BCD value (A, B, C and D). The LSB is A. Output segments a, b, c, d, e, f and g. May have other features such as: LT (Lamp Test). If active makes all outputs “on”, to test the LEDs Enable/disable output Memory capabilities
28
Decode 1.28 Display Drivers BI/RBO and RBI: Ripple Blanking Input or Output Ripple Blanking refers to making displays blank out (nothing displayed) if their value is zero and they either precede or follow a non-zero value. Example: The value 034.250 would have the first and the last value 0 blanked, appearing as 34.25 Dealing with Blanking Read the specification sheet for more details Leave disconnected if not using ripple blanking
29
Decode 1.29 BCD to 7-Segment Decoder Other issues: The decoder’s active output (active high or active low) needs to match the display. There must be a resistor to limit current for each segment. The LEDs in 7-segment displays are especially sensitive to damage from too much current. CPLD outputs are not capable of driving much current. Design for active low output if connecting LEDs to outputs without a driver. EWB seems to have trouble with the non-decoded display. Best to use the decoded display.
30
Decode 1.30 Questions On a 7-segment display, why not use a single resistor at the common to limit current for all LEDs? What is the active output of the 7447 and the 4511? The following is known as a ½ display. What are some applications for ½ displays? c b dp
31
Decode 1.31 ©Paul R. Godin prgodin ° @ gmail.com END
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.