Counter ICs

Am 1.7.2011 schrub Richard:

If you cannot, in no way, tolerate "glitches", i.e. unwanted intermediate counter values, a gray-code counter is (the only?) solution: a BCD counter may need to change several bits when progressing from one count to the next (e.g. all 4 bits need to change when going from 7 to 8), but since we're dealing with real-world hardware, they may, in fact, not change simultaneously but in (very fast) succession, so rather than

0111 -> 1000 you may end up with 0111 -> 0110 -> 0100 -> 0000 -> 1000 Gray code changes only a single bit between values.

However, I'm not sure if a decimal gray code exists.

Also, I know of no standard Gray Code to 7-segment decoders.

Josef

--
These are my personal views and not those of Fujitsu Technology Solutions!
Josef Möllers (Pinguinpfleger bei FTS)
	If failure had no penalty success would not be a prize (T.  Pratchett)
Company Details: http://de.ts.fujitsu.com/imprint.html
Reply to
Josef Moellers
Loading thread data ...

--
Sure.

You could use a binary counter and, with a little glue logic, reset it
when it gets to 1010 and generate a carry if you needed one.

You could also build a state machine using a ROM with an output latch:

(View in Courier)

       +--------+ 
CLK>---|A0    D0|
       |        |
       |A1    D1| 
       |        |
       |A1    D1| 
       |        |
       |A1    D1|
Reply to
John Fields

many leds are spec'd for max 5V reverse bias (I've yet to see a datasheet with a higher figure) that circuit will give about

6 or 7.

I'm aware that often they can withstand 12V reverse without damage but I've seem some damaged by less too.

--
?? 100% natural
Reply to
Jasen Betts

Oops... Messed up the last post.

Sure.

You could use a binary counter and, with a little glue logic, reset it when it gets to 1010 and generate a carry if you needed one.

You could also build a state machine using a ROM with an output latch:

(View in Courier)

. ROM LATCH . +-----+ +-----+ .CLK>-----|A0 D0|--|D0 Q0|---> CARRY OUT . | | | | . +-------|A1 D1|--|D1 Q1|-------+--[LEDa]-[R]-+ . | | | | | | | . |+------|A2 D2|--|D2 Q2|------+---[LEDb]-[R]-+ . || | | | | || | . ||+-----|A3 D3|--|D3 Q3|-----+----[LEDc]-[R]-+ . ||| | | | | ||| | . |||+----|A4 D4|--|D4 Q4|----+-----[LEDd]-[R]-+ . |||| | | | | |||| | . ||||+---|A5 D5|--|D5 Q5|---+------[LEDe]-[R]-+ . ||||| | | | | ||||| | . |||||+--|A6 D6|--|D6 Q6|--+-------[LEDf]-[R]-+ . |||||| | | | | |||||| | . ||||||+-|A7 D7|--|D7 Q7|-+--------[LEDg]-[R]-+ . ||||||| +-----+ +-----+ ||||||| | . ||||||+------------------+|||||| +V or GND . |||||+--------------------+||||| . ||||+----------------------+|||| . |||+------------------------+||| . ||+--------------------------+|| . |+----------------------------+| . +------------------------------+

Clocking the latch and generating the lookup table is left as an exercise for the student. ;)

--
JF
Reply to
John Fields

formatting link

Doesn't get cheaper.

signup hage is broken

--
?? 100% natural
Reply to
Jasen Betts

excess-3 code with xors in the usual places will get you a base-10 gray code.

use the same XORs to recover the excess-3 code and go from there to BCD with some adders.

--
?? 100% natural
Reply to
Jasen Betts

formatting link

Doesn't get cheaper.

signup page is broken

--
?? 100% natural
Reply to
Jasen Betts

How so?

Since the 4017 outputs are high true, they go positive to light the LEDs and go to 0V to extinguish them. The anodes of the LEDs must, therefore, be connected to the counter outputs and their cathodes connected together and grounded through R3.

Then, since the cathodes never go positive with respect to the anodes, how can the LEDs ever become reverse-biased?

--
But, there _are_ two errors in the circuit which'll keep it from
working.

1. The RESET switch should be connected between 9V and pin 15 of the
   4017, and,

2. pin 16 of the 4017 should be connected directly to 9V.

Not to my liking is ground being switched, instead of 9V, but what are
ya gonna do?
Reply to
John Fields

I see that you can use your knowledge to derive a scheme to build counters-with-display.

Just concentrating, for a moment, on what might be considered strictly commercial or marketing offerings. I mean, where the manufacturer promotes ICs for the very purpose of the constructing a counter-with-display and you are purchasing their scheme. It seems that these offerings (which could be a package of ICs) are:

*BCD counters *7-segment decoders *7-segment displays

And I suppose:

*BCD counter + 7-segment decoder in one IC *BCD counter + 7-segment decoder + LED display in one IC

If we take what ICs which are available as sort of a manufacturer's scheme, for a counter-with-display, at the moment the above are the only schemes I have any knowledge of.

But, there must be schemes involving LCDs. Must be. So, what ICs would we be talking about in that case? What have the manufacturers of the chips come up with, in their technical and marketing efforts?

Non microprocessor.

Reply to
Richard

formatting link

I'm able to use it, it appears. Oh, well. As a backup plan, TI's store does have a phone number to call and order stuff, as well. Used it many times when I've had problems with the web site. (Yeah, I've had them too.)

Jon

Reply to
Jon Kirwan

--
Can't help you much there, but take a look at the 4511 and go to:

http://www.national.com/cat/index.cgi?i=i//23
Reply to
John Fields

I see that the BCD - decoder - 7-segment scheme (more in the sense of product scheme) was used for LCDs as here:

formatting link

I guess any BCD counter might have sufficed, probably TI made their own.

Reply to
Richard

Easy 'nuff. Take a 7-bit register and a 128 x 7 ROM. Connect the Register's Q outputs to the address lines of the ROM and the outputs of the ROM feeding back the D inputs of the register. At the address of the *current* count (7-segment encoded) put the value of the *next* 7-segment code. Program all other locations to the value of the '0' code (or choose another). Add the clock and you're done.

Or you could do 20 lines of VHDL, or so (same thing).

SevenSegCounter: process (Clk, Reset) -- a begin -- ---- if Reset = 1 -- abcdefg -- f/ g /b then Output "01101101"; -- 0=>1 when "0110000" => "01101101"; -- 1=>2 when "1101101" => "01111001"; -- 2=>3 when "1111001" => "01110011"; -- 3=>4 when "1110011" => "01011011"; -- 4=>5 when "1011011" => "01011111"; -- 5=>6 when "1011111" => "01110000"; -- 6=>7 when "1110000" => "01111111"; -- 7=>8 when "1111111" => "11111011"; -- 8=>9 when "1111011" => "01101101"; -- 9=>0 when others => "01111110"; -- Catchall => 0 end case; end if; end process SevenSegCounter;

-- The left bit of output is the carry out

-- Disclaimer-1: not checked for errors

-- Disclaimer-2: I have *no* idea why anyone would want to do this

Reply to
krw

A synchronous counter won't have transition glitches. Well, any glitches won't be wider than the delta between propagation delays (which is usually less than the transition time).

Designs should be transition glitch tolerant, in any case. I don't remember the last time I used a ripple counter and I *sure* don't design asynchronous logic.

For good reason. They're never necessary. Do you really care if an 7-segment display shows the wrong value for 10ps? ;-)

Reply to
krw

There is no need, or they would exist. In fact they did exist. HP made a series of LEDs with a counter built in. They were *expensive*, though.

There are all sorts of LCD controllers but there wouldn't be any point in a standard product like you propose. The market is too limited.

Why?

Reply to
krw

I'm just now learning about counters-with-display. Really limited to ICs associated with counting and (7-segment) displays. Not just counting.

Okay, so I see that it's more or less a matter of the display technology which is LED or LCD. Has been for a while and still is.

Either way, counter-with-display involves(more or less) decade counters outputting BCD, BCD to 7-segment decoders, LED or LCD 7-segment displays.

Other counters, such as one-hot code counters are not manufacturer for counter-with-display purposes in mind.

Of course with ingenuity, you can make counter-with-display from a variety of ICs, you can implement your own peculiar technical schemes. Which is probably what some do.

But as to "product" schemes of manufacturers, it seems BCD counters are the regular offering, with associated decoder and 7-segment display.

That is my understanding of the situation.

Not entirely sure where binary counter and 7-segment display would figure, if people do that.

As to microprocessor. Yes, that is where I ought to be heading towards getting to grips with.

Reply to
Richard

grounded?

R3 is the current limit resistor and drops atleast 6V

All of the cathodes are at around 6V, 9 of he anodes are at around 0V

I didn't spot that mistake, but on reexamineing it the animation of the schematic looks almost right for the circuit as drawn. The 4017 is being powered through the clock input (I've done this by accident before), but to may way of thinking the red on the clock wire should coincide with the LED illuminating.

--
?? 100% natural
Reply to
Jasen Betts

--
Heh! 

Completely missed that; good catch! :-)
Reply to
John Fields

--
Yeah, you're right; the count changes on the _rising_ edge of the
clock.

That is, if there's enough charge left in the chip to ride out the
clock's low time and hold Vcc up until the next clock comes along.  

Plus, take a look at pin 1 of the 555!
Reply to
John Fields

Why? It's a learning exercise to do a counter-AND-display, but counter-with-display isn't all that much use, today. That's why you don't see them anymore.

LED vs. LCD isn't the point.

Which isn't all that interesting, marketing wise.

Why would *anyone* do such a thing? The fact is that counter-with-display isn't interesting. Thirty years ago, perhaps.

Sure, they use a microcontroller (or FPGA, like I'm doing now). ;-)

Why add gates unnecessarily?

Sure: '0123456789AbCdEF'

If you're looking to learn logic design, there is nothing wrong with playing with counters and displays. We all started there (or before ;), at some point in our careers. Any sort of saleable product isn't going to use such things (counters integrated with the display).

Reply to
krw

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.