8-Bit Latch

Thread Starter

mcardoso

Joined May 19, 2020
226
One more thread from me!

I'm wondering if there is a pre-made discrete logic chip that accomplishes the following function:

-8 parallel inputs (A0-A7)
-8 parallel outputs (Q0-Q7)
-Input High on An will latch on Qn
-Input Low on An will hold the current output state (Qn remains high if previously set High)
-Input High on An will unlatch all outputs except Qn

Basically a selector switch where only one output can be on at a time (output corresponds to the last high input). There is no risk of two inputs being high at the same time for my application.

Haven't found anything that does this yet, but I might not know what it is called.

Thanks,

Mike

EDIT: Clarification "Input Low on An will hold last state high (Qn latches on) " changed to "Input Low on An will hold the current output state (Qn remains high if previously set High)"
 
Last edited:

Thread Starter

mcardoso

Joined May 19, 2020
226
8-bit priority encoder CD4532B or MC14532.
MrChips,

Thanks for the reply. Maybe I am missing something, but that looks to convert parallel inputs to binary with no latching functions. I guess I could tie this to something like a 74HC137 and get creative with the latch enable input, but I was hoping to find this in one chip.

Best,

Mike
 

Thread Starter

mcardoso

Joined May 19, 2020
226
So both inputs result in Qn latched high?
No, I corrected the first post. A low input holds the current state of the associated output. Ax HIGH will latch Qx HIGH. An LOW will continue to hold Qx HIGH because it is latched on. Any other input HIGH will unlatch Qx

For example A2 pulses HIGH and Q2 is set and remains high even after A2 falls LOW. Then later, A5 is pulsed HIGH, Q2 and all other outputs are unlatched (set LOW) and Q5 is latched (set HIGH).

EDIT: Clarification. Changed wording and letter subscript changed from "n" to "x".
 
Last edited:

Thread Starter

mcardoso

Joined May 19, 2020
226
He's looking for a radio button circuit.
Bingo! That’s exactly it. Funny how you don’t know the right words for stuff if it isn’t what you do every day.

I call it Mt. Stupid. Still climbing...

but yes, ideally an IC that would be an 8 way radio button.
 

dl324

Joined Mar 30, 2015
18,220
ideally an IC that would be an 8 way radio button
Don't know of any such device.

You could roll your own by expanding this circuit:
clipimage.jpg

EDIT: On second thought, a programmable device with a look up table would take less area (e.g. 28C16, 27C16, 2 X2110, 2 82S23, etc).
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,045
There are radio button threads on this and other circuits web sites, plus schematics on the innergoogle. Wally and I have gone back and forth on this in the past. Another variation is a "game show circuit".

Many circuits use a diode-OR (or diode-NOR) reset structure, so the circuit is infinitely expandable without a massive bank of OR gates. Here is an example for a specific application: bouncy switches, no chance of someone hitting two buttons at the same time, low-current LED indicators. SW2 - SW8 not shown to remove clutter. Connecting C3 to any input will force the circuit to that output on power-up.

ak
RadioButtons-8-1.gif
 

BobaMosfet

Joined Jul 1, 2009
2,211
One more thread from me!

I'm wondering if there is a pre-made discrete logic chip that accomplishes the following function:

-8 parallel inputs (A0-A7)
-8 parallel outputs (Q0-Q7)
-Input High on An will latch on Qn
-Input Low on An will hold the current output state (Qn remains high if previously set High)
-Input High on An will unlatch all outputs except Qn

Basically a selector switch where only one output can be on at a time (output corresponds to the last high input). There is no risk of two inputs being high at the same time for my application.

Haven't found anything that does this yet, but I might not know what it is called.

Thanks,

Mike

EDIT: Clarification "Input Low on An will hold last state high (Qn latches on) " changed to "Input Low on An will hold the current output state (Qn remains high if previously set High)"
This really sounds like you're wanting a shift-register like the SN74HC595, albeit serial in.... but it gives really nice control for latching... but really, @AnalogKid 's solution looks awesome.
 

Thread Starter

mcardoso

Joined May 19, 2020
226
There are radio button threads on this and other circuits web sites, plus schematics on the innergoogle. Wally and I have gone back and forth on this in the past. Another variation is a "game show circuit".

Many circuits use a diode-OR (or diode-NOR) reset structure, so the circuit is infinitely expandable without a massive bank of OR gates. Here is an example for a specific application: bouncy switches, no chance of someone hitting two buttons at the same time, low-current LED indicators. SW2 - SW8 not shown to remove clutter. Connecting C3 to any input will force the circuit to that output on power-up.

ak
View attachment 208909
I really like this option. I don't I could use the capacitor for startup since this would be driven low by CMOS outputs rather than floating, but it looks to accomplish what I need. The chip attached to this circuit's inputs would likely be a SN74AC11 (triple 3-Input AND gate)

The whole reason I need this is the previous section of the circuit has 7 parallel outputs that pulse on but might turn off. I need to latch these conditions in until a different input comes on.
 

Thread Starter

mcardoso

Joined May 19, 2020
226
If you want a one-chip solution look at using an MCU.
I considered an MCU for my whole design, but the timing is tricky. It would need to read inputs (interrupt), read/write memory, do some basic logic, and set outouts, and exit the interrupt within less than 1us. Likely possible with optimized code on a fast processor, but really pushing it.

FPGA would be another good way to handle this, but more complex than I think this needs. Plus I'm getting a good education in discrete logic design.
 

AnalogKid

Joined Aug 1, 2013
12,045
The chip attached to this circuit's inputs would likely be a SN74AC11 (triple 3-Input AND gate)
The circuit I posted works *only* with switches or open collector outputs, not totem-pole outputs. You would have to AC couple the AC11 outputs into the resistor network.

That raises a question - Is it always the case that only one input can be high at any time? IOW, is it possible for one input to go high while another input still is high? If so, do you want the second input to be ignored, latched, or what?

ak
 

joeyd999

Joined Jun 6, 2011
6,204
I considered an MCU for my whole design, but the timing is tricky. It would need to read inputs (interrupt), read/write memory, do some basic logic, and set outouts, and exit the interrupt within less than 1us. Likely possible with optimized code on a fast processor, but really pushing it.

FPGA would be another good way to handle this, but more complex than I think this needs. Plus I'm getting a good education in discrete logic design.
The timing for reading a bunch of switches is not tricky, and an interrupt isn't even required.

Just the debounce will take 20 to 30ms, which is a lifetime, even on a slow, cheap processor with lots of other stuff to do.
 
Last edited:
Top