I am trying to scan a matrix keyboard using a 74LS194. The system works this way, there's an schematic below to support the explanation:

  1. A parallel load is done to insert a '1' to be shifted (Load)
  2. The system keeps on shifting the '1' until a key is pressed (!KeyDetected)
  3. When a key is pressed (!KeyDetected), the bit is held to allow the system to read the Row and Column values.
  4. Once the key is unpressed, the bit stops being held and is shifted again.

The user will never press more than one key at a time.

In simulator (proteus) works just fine. In the circuit I have build around the design with LS TTL chips and 1k resistors is where I am getting the issue.

For some presses, the system works fine, but after some presses, when the key is unpressed the register outputs '0' in all the outputs.

I have been looking for days at all the pins at the oscilloscope and nothing is clear. For some reason, the bit is lost.

This is the oscilloscope reading of an output when the key is pressed. Apparently it is between the limits: Osciloscope Reading.

I am asking for the cause of this issue so I can fix it

Keyboard Scan System

Thank you!

  • 2
    \$\begingroup\$ Hi, this is a Q&A site, what question you have? Please edit and add a question to your question. \$\endgroup\$
    – Justme
    Jan 29, 2022 at 21:41
  • 1
    \$\begingroup\$ For some reason, the bit is lost. ... think about what would cause the bit to shift past Q3 \$\endgroup\$
    – jsotola
    Jan 29, 2022 at 21:41
  • \$\begingroup\$ @jsotola, Q3 is connected to SR to keep it shifting, and it does for some presses... \$\endgroup\$
    – user306269
    Jan 29, 2022 at 21:46
  • \$\begingroup\$ that was a hint ... an extra clock pulse at the wrong time would make the bit disappear ... Q4 pulled low at the wrong time might do it, if you rely on recirculation \$\endgroup\$
    – jsotola
    Jan 29, 2022 at 21:53
  • \$\begingroup\$ Are you just running the circuit in a simulator, or have you actually built it with LS TTL chip and 1k resistors? \$\endgroup\$
    – Justme
    Jan 29, 2022 at 21:55

1 Answer 1


According to 74LS194 chip datasheet, it has a recommended maximum output sourcing current of 0.4 milliamps which guarantees output voltage between 2.7 to 3.5 volts.

It means your 1k pull-down resistors load the output too much and an input may not determine it as logic 1 any more. Also the schematic has no bypass capacitors, so if your circuit has no bypass capacitors either, it may fail to work properly.

  • \$\begingroup\$ Thank you! Will removing the resistors fix the issue ? \$\endgroup\$
    – user306269
    Jan 29, 2022 at 23:39
  • \$\begingroup\$ @James221 \$I_{_\text{OH}}=400\:\mu\text{A}\$ is the standard sourcing current compliance for LS TTL parts. See this chart. Also take careful note of \$V_{_\text{OH}}\$ and \$V_{_\text{IH}}\$. There's only about, worst case, \$400\:\text{mV}\$ separation when loaded down by \$400\:\mu\text{A}\$. Not a lot of noise margin, or margin generally. Just make sure you design around these details, carefully. That will include looking at the MCU datasheet, too. \$\endgroup\$
    – jonk
    Jan 30, 2022 at 0:01
  • \$\begingroup\$ You current circuit is working against TTL's strengths - change your logic so that a logic low is used to select the row with a pullup resistor on the columns - TTL has better sink than source specs. You'll see this in old skool designs. As well, you might want to add series diodes in the rows so multiple keypresses won't short circuit the LS194 outputs. \$\endgroup\$
    – Kartman
    Jan 30, 2022 at 1:55
  • \$\begingroup\$ @Kartman Or just shift to devices that are open-collector, which is exactly what we used in old skool designs and which was also the very first parts TI made sure we had available back then, too. We pretty much never used TTL outputs for key-scanning. (And tri-state was like a luxury item that was years later in coming.) \$\endgroup\$
    – jonk
    Jan 30, 2022 at 3:35
  • \$\begingroup\$ @jonk - I can't recall too many TTL shift registers with open collector outputs. Usually a counter with a 7445 or later a LS156. Not forgetting 7406/07. \$\endgroup\$
    – Kartman
    Jan 30, 2022 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.