1
\$\begingroup\$

Proteus simulation schematic

I used 74HC138 in the first circuit and 74LS138 in the second circuit.
Only the one with the 74HC138 is working.
Why?

\$\endgroup\$
1
  • \$\begingroup\$ we can't answer that with the info you're giving! What we can tell you is: there's a reason one has "HC" in the name, the other "LS". THat defines voltage levels and driving capabilities. Please look up the datasheets of your two ICs yourself and determine if they're not simply working as expected. \$\endgroup\$ Commented Apr 13, 2020 at 16:19

3 Answers 3

4
\$\begingroup\$

enter image description here

The 74ALS138 device that you found was unable to drive the output LEDs is operating (more than likely) correctly - the output high drive current is only specified at 400 uA in the data sheet.

Compare this with the 74HC138 - it can drive a high output current of 4 mA.

ALS device: -

enter image description here

HC device: -

enter image description here

So, given that the ALS device is pretty good at pulling down its output (note that 8 mA can be obtained), I would recommend that you turn the diodes round and have the anodes up to + 5 volts instead BUT, don't forget to use current limiting resistors like 220 ohms or thereabouts.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks guys .i rounded the leds, connected their anodes to power through 220 ohm and there cathodes to output pins of 74LS138 but didnt work \$\endgroup\$
    – mmm
    Commented Apr 13, 2020 at 19:33
  • \$\begingroup\$ @mmm - do you fix it in the end? What was wrong? \$\endgroup\$
    – Andy aka
    Commented Jun 11, 2020 at 11:58
  • \$\begingroup\$ @mmm are you done with this question and answer now? \$\endgroup\$
    – Andy aka
    Commented Nov 30, 2020 at 8:44
2
\$\begingroup\$

LS TTL logic high output is extremely weak and can only source very weak current out. In real world, the LED would be quite dim. However, what you have is not a real world scenario, that is just how your emulator works.

\$\endgroup\$
1
\$\begingroup\$

‘ALS devices have very weak high drive, so that’s why your LEDs don’t light.

The question is, why does it work with the CMOS version? Two reasons:

  • CMOS has roughly equal high and low drive (typically 4mA or so)
  • CMOS has inherent current limiting in the form of Rds(on), which kind of acts as a load resistor

So what will happen is, when the CMOS out is high, the pin will be clamped to the LED forward voltage, Vf, which is 2-3V depending on the LED color. Rds(on) is dropping the rest of the voltage internally.

You can calculate the approximate Rds(on) for a CMOS device from the 'HC138 datasheet values of Ioh/Iol and Voh / Vol:

  • Rds(on) = (Vdd - Voh) / Ioh = (5V - 3.7V) / 4mA = 325 ohms (minimum.)

Nevertheless, you should add an appropriate limiting resistor - about 300 ohms or so - to limit the LED current to about 4mA.

For the ‘ALS version you either need to add inverting buffers, or drive the LED on the cathode (low) side. Given that the 'ALS138 and 'HC138 have active-low outputs, that's a change you should do for both circuits anyway.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.