Blogroll

Powered by Blogger.

Sunday, 27 July 2014

Controlling 74LS138, 3 - Line to 8 - Line Decoder / Demultiplexer, using Switches

by realfinetime  |  in IC at  11:54

          74138 is a commonly used 3-line to 8-line demultiplexer/decoder. 74138 is specifically designed for high speed memory decoders and data transmission systems. It is a shottkey-clamped TTL system and reduces the effective system delay considerably. Pinout diagram of 74138 is given below. It has three enable pins ( G1, G2A, G2B ), three select pins ( A, B, C ) and eight output pins ( Y0 - Y7 ). Vcc is normally 5V and is supplied from Arduino board or from 7805 voltage regulator. 74138 will take data inputs through the select pins and outputs through the output pin having the number same as input. That is,

if the select pins are at L L L ( 0 in decimal ) in the order C B A, output will be through Y0.
if the select pins are at L L H ( 1 in decimal ) in the order C B A, output will be through Y1.
If the select pins are at L H L ( 2 in decimal ) in the order C B A, output will be through Y2.
If the select pins are at L H H ( 3 in decimal ) in the order C B A, output will be through Y3.
If the select pins are at H L L ( 4 in decimal ) in the order C B A, output will be through Y4.
If the select pins are at H L H ( 5 in decimal ) in the order C B A, output will be through Y5.
If the select pins are at H H L ( 6 in decimal ) in the order C B A, output will be through Y6.
If the select pins are at H H H ( 7 in decimal ) in the order C B A, output will be through Y7.

74138 always gives a complemented output. LED will turn off, if there is an output. LED will turn on, if there is no output.



Controlling 74138 using switches

          We have already seen the basic characteristics of 74138. Next is to use 74138 in circuit. Controlling 74138 using switches is simple, but it will take a little time. If you are a beginner, definetly you will get confused atleast once before getting the proper output. Circuit is done as shown in the following diagram. Six switches are used in the circuit. First three switches are for controlling the Enable pins (G1, G2A and G2B ) and the next three switches are for controlling the select pins (A, B and C). Switches are used for controlling the contact of these control pins ( enable and select pins) to ground. Eight outputs ( Y0 - Y7 ) are connected to seperate LEDs through current limiting resistors of 1K each.

Why Pull Up resistors ?.

          I had already published one blog on controlling NAND gate using Pull down resistors  But in this circuit, I used pull up resistors. Both methods are acceptable. While controlling NOT gate using switches, I found that pull up resistors are more effective than pull down resistors. In this circuit, voltage for the control pins (enable and select pins) are supplied through the pull up resistors. A switch is also connected to the control pins ( enable and select pins ). When the switch turns on, corresponding control pin ( enable and select pin ) get connected to ground through switch. Voltage source also get grounded through the pull up resistor. So, that control pin ( enable and select pin ) will be at logical LOW. Similarly, when the switch is off, corresponding control pin (enable and select ) will get high voltage through the pull up resistor. So, that control pin (enable and select ) will be at logical HIGH.

          If pull up resistors are not used, when the switch turns on, power supply get shorted, high current will flow through that switch, due to low resistance of path. This will damage the power supply. Pull up resistor provides necessary resistance to the path to limit the current flow when switch turns on and hence protect the power supply from shorts.


Truth table of 74138

          Truth table of 74138 is given below. Voltage at a control ( enable or select ) pin will be HIGH ( H ), if the switch corresponding to that control ( enable or select ) pin is OFF. Similarly, voltage at a control ( enable or select ) pin will be LOW ( L ), if the switch corresponding to that control ( enable or select ) pin is ON. Because, switch will ground the voltage. 74138 gives inverted output. That is, LED will turn off, if there is an output through corresponding pin. If the output is HIGH ( H ), LED corresponding to that output will turn ON. Similarly, If the output is LOW ( L ), LED corresponding to that output will turn OFF.

          From the truth table, it is clear that G1 should be HIGH ( H ) always. If G1 is LOW ( L ), all the outputs will be HIGH ( H ) and will not change, even if the select (A, B and C) pins change. That is, all the LEDs will turn on. Similarly, G2A and G2B should be LOW ( L ) always. Otherwise, all the outputs will be HIGH ( H ) and will not change, even if the select (A, B and C) pins change.

          If G1 is HIGH ( H ), G2A is LOW ( L ) and G2B is LOW ( L ) , outputs will change with change in select pins ( A, B and C ). Changes in output with change in input is clearly given in the truth table given above.

State of switch and voltage at corresponding control (enable or select) pin

If switch S1 is OFF, Voltage at G1 will be HIGH ( H ). If switch S1 is ON, Voltage at G1 will be LOW ( L ).
If switch S2 is OFF, Voltage at G2B will be HIGH ( H ). If switch S2 is ON, Voltage at G2B will be LOW ( L ).
If switch S3 is OFF, Voltage at G2A will be HIGH ( H ). If switch S3 is ON, Voltage at G2A will be LOW ( L ).

If switch S4 is OFF, Voltage at C will be HIGH ( H ). If switch S4 is ON, Voltage at C will be LOW ( L ).
If switch S5 is OFF, Voltage at B will be HIGH ( H ). If switch S5 is ON, Voltage at B will be LOW ( L ).
If switch S6 is OFF, Voltage at A will be HIGH ( H ). If switch S6 is ON, Voltage at A will be LOW ( L ).

Enjoy decoding...

0 comments:

IMPORTANT NOTICE

All the circuits, published in this blog is only after testing and getting proper results in my private lab. When you try these circuits, you should check the supply voltage, polarity of components, presence of childrens nearby and shorts in the circuits. This website will not be responsible for any harm happened to you or your components caused by your carelessness.

For More Electronic Tips

Blog Archive

Proudly Powered by Blogger.