Wiring a 74LS259 (addressable latch)

integrated-circuit

I’m an electronics newbie, so I’m trying to use a few IC's to check my understanding.

At the moment I’m trying to use a 74LS259 8 bit addressable latch. I’m trying to get it working without a micro-controller first to ensure that I understanding the wiring 100%.

But I am having a problem understanding the E and C pins … (see below)

I’ve wired it as follows:

  • A0-A2 – Address inputs – wired to a switch and the +5V Q0-Q2 – Outputs
  • Each wired to a LED and a 220ohm resistor
  • Q3-Q3 – Outputs – Not Wired (Is this a problem should I wire them to the -5V instead)

The issue I has is understanding how to wire the E (enable) and C (clear) pins.

The datasheet says that to select the “addressable latch” mode I should have:

  • E – Low
  • C – High

So I’ve wired E to 0V and C to +5V.

I then try to “write” a bit by taking A0 high and then D (data) high but this does not work.

I suspect that I have wired E and C wrong. I’ve searched around but I can’t find any circuit diagrams that could help me…

Can anyone assist? What am I doing wrong here?

Here is the circuit diagram at CircuitLabs:

enter image description here

Best Answer

You don't show the connections on your schematic, but I'll assume you actually have them wired up to the switches you mention.
It looks as if you have C and E the wrong way round - they are active low inputs, so you need to tie C to +5V, and E to GND.
Do not wire the unused outputs directly to a power rail (e.g. +5V or Ground) as this could cause a direct short if the logic level is set to the opposite rail (e.g if you have the output wired to ground, and you set it high, then a lot of current will flow and potentially damage your chip)

So set your data pin D to the desired logic level for your output (e.g. high to light your LED), then A0 and C high, then pull E low. Q1 should light up (if it doesn't check the LED is the right way round, power is present, etc)

Also, if you only have a single supply like is shown, then the low side is generally referred to as ground, not -5V.

The bottom section is the relevant table in the datasheet for addressable latch mode:

74LS259

You can see you must keep the clear pin high (tied to +5V) otherwise it will keep the outputs low (i.e. "cleared")

Also note this bit (the mention of Enable and Clear being active low - denoted by the bar above the letter):

74LS259b