Skipping "zero" with a counter?

E

eromlignod

Guest
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
 
eromlignod wrote:
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?
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
 
On Wed, 26 Mar 2008 07:03:41 -0700 (PDT), eromlignod
<eromlignod@aol.com> wrote:

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?
---
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 |
+---------+
 
On Wed, 26 Mar 2008 07:03:41 -0700, eromlignod wrote:

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
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
 
On Wed, 26 Mar 2008 09:53:52 -0500, John Fields
<jfields@austininstruments.com> wrote:

You could use an 8 bit
/
/
Oops, 4 bit-----


JF
 
On 3ÔÂ26ČŐ, ĎÂÎç10Ęą03ˇÖ, eromlignod <eromlig...@aol..com> wrote:
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


Do you want access to China's massive pool of electronic
manufacturers... but lack the time to contact suppliers, negotiate
contracts, arrange shipping or monitor product quality? Don't worry -
Let seriouswholesale deal with all that for you.

*Check out the huge range of Gadgets, MP3 / MP4 Players, Car DVD /
Audio, and Computer Accessories now by visiting the online wholesale
catalog at seriouswholesale. com You'll have peace of mind thanks to
the seriouswholesale Quality Control, 12-month Warranty on all
products, and easy secure payment by credit card through Paypal.

Selling on eBay or your own online store? Send products direct from
our warehouse to your customers using our unique drop-shipping
service. You can profit by selling hundreds of different products,
without holding any of your own inventory! Any questions you have will
be answered by the seriouswholesale English-speaking customer support
team... Their aim is to make your China electronics importing business
easier to run than ever before.

Welcome to http://www.seriouswholesale.com.

seriouswholesale - Buy from the source, profit without the hassle.

- 12 Months Warranty - No minimum order restrictions - Drop-shipping
with no additional fee - Pay by safely by PayPal seriouswholesale
Wholesale Co., Ltd.: Chinas original and best online electronics
wholesaler & drop-shipper: seriouswholesale. com
 
On Mar 26, 11:26 am, Tim Wescott <t...@seemywebsite.com> wrote:
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?)
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 = B, Ka = B
Jb = 1, Kb = !A

I used to love solving those problems. :)
 

Welcome to EDABoard.com

Sponsor

Back
Top