2

The 74hc590 http://www.ti.com/lit/ds/symlink/sn74hc590a.pdf is a binary counter followed by a register with a tri-state output.

I thought about using it in a homebrew CPU design, as it's wider than the 74hc161, but the output buffer means that it takes an extra clock before a counter clear CCLR# is reflected at the output.

Have I misunderstood this part?

What was the 590's original purpose? i.e. Why were people putting registers after counters, resulting in this part being made?

Purple Lady
  • 134
  • 7
fadedbee
  • 994
  • 9
  • 24

1 Answers1

4

The use case is pretty well described by you: a binary counter with a latch.

For when you want something counted, but the output of the counter to only change on a latch signal.

Use cases range pretty widely – from gated clock dividers to clock-domain crossing counters to very simple IO expanders.

A very striking example is a frequency counter: assume you want to measure something in the range of 20 kHz. You have a 100 Hz clock. You use that 10 Hz clock to reset the counter clocked by the ca 20 kHz, so counts should be always in the range of around 200. Of course, you don't want your display to update while your counter is counting – only maybe 12.5 times a second. So, you latch your counter on the 8. edge of your 100 Hz clock.

(these ICs weren't all invented to build CPUs, so the assumption that "it exists" and "it must be useful in a CPU design" is unfounded)

Marcus Müller
  • 88,280
  • 5
  • 131
  • 237
  • Thanks for your answer. I didn't think that all 7400 ICs were made for CPUs, I was just curious as to what it was for, as my exposure to electronics is limited. – fadedbee Aug 12 '18 at 12:21
  • 2
    You're welcome! I wasn't sure you were insinuating that, but I wanted to avoid future readers would interpret your question that way :) – Marcus Müller Aug 12 '18 at 12:33
  • Marcus, your frequency counter example of this chip's target-market is supported by it having tri-state output (for MUX'd displays), a gate-able clock, and a separate latch input pin. Somewhat obsolete today - I'd use a microcontroller instead, without a second thought. – glen_geek Aug 12 '18 at 13:24
  • @glen_geek :) thanks! yeah, I can only second that, especially considering that many microcontrollers even have timer units that can double as input edge counters. But then again, these ICs are from a time where that wasn't the case :) – Marcus Müller Aug 12 '18 at 13:27
  • It is a good one to use as a program counter in a homebrew CPU. That way, you are running one instruction while it is updating for the next one. – Purple Lady Oct 17 '21 at 01:11
  • It's interesting how versatile the 7400 series is, regardless of the original intended uses. For instance, the counter registers are good to increase instructions. You can use that as an index register and have it auto-increment for the next use. That can reduce the instruction time needed for updating that register and it doesn't rely on the main ALU. That can come in handy in bit-banging from memory since that can be done in a single cycle. – Purple Lady Oct 17 '21 at 01:33