Skipping "zero" with a counter?

Hi guys:

I'm working on an application where I'd like to have a two-bit counter that needs to continuously count 1, 2, 3, 1, 2, 3, 1, 2, 3... in a loop. I don't want zero. It is controlling three of the four channels of a mux and the zero channel is "off" (no signal), so I want to skip it.

Is there an easy way to do this, or do I need to build my own counter with logic?

Don

Reply to
eromlignod
Loading thread data ...

--- You could use an 8 bit asynchronously presettable counter, like a 4510 or a 4516, and have it load 0001 when it counts to 0100: (view in Courier)

+-------------+ | +---------+ | +-|LOAD | | |__ | | GND>-+-O|CE | | | | | | +--|MR | | | | | | +--|D4 Q4| | | | | | +--|D3 Q3|-+ | | | +--|D2 Q2|----->MSB OUT | | Vcc>-+--|D1 Q1|----->LSB OUT | | _ | +--|U/D | | | CLK>----|>CP | +---------+
Reply to
John Fields

If you need a 2-bit binary counter, you can do this with a pair of J-K flip flops and some wires. I don't know for sure, but I think you can get just about _any_ 2-bit sequence you want from a J-K flip-flop pair without additional logic.

(It would be interesting to know just how far this extends -- can you do this with any three-bit sequence and three J-Ks? Four? Five?)

--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

Yes, and probably. Do you want a two bit binary representation of the count sequence (01, 10, 11, 01 etc.) or three individual bits that take turns turning on in sequence (001, 010, 100, 001, etc.)? Do you need a reset function to an initial count, or can the count start at any point in the sequence? It is the details that determine the simplest way to accomplish the counter.

--
Regards,

John Popelish
Reply to
John Popelish

/ / Oops, 4 bit----- JF

Reply to
John Fields

J-K flip-flops, what a blast from the past. Can't remember the last time I needed them. But you're right, that's a very clean solution, a single dual-FF package. I warmed up the long-forgotten neurons and came up with this solution

Ja =3D B, Ka =3D B Jb =3D 1, Kb =3D !A

I used to love solving those problems. :)

Reply to
Mike Silva

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.