Simple Clockable Decoder Chip

Let's say we have an 8-Bit shift register. We reset it so that its outputs are as follows:

00000000

We then set the data input high and clock it:

10000000

We then drop the data input low and continuously clock it:

01000000 00100000 00010000 00001000 00000100 00000010 00000001

This is done easily using two pins from a microcontroller, one pin for the data input and another pin for the clock input.

I'm looking for something that will do the same job with just one pin (i.e. a pin to clock it). That is to say, when you reset it, it becomes:

10000000

and then when you clock it, it cycles thru the outputs:

01000000 00100000 00010000 00001000 00000100 00000010 00000001 10000000 01000000 01000000

I've googled a bit and the closest I've come to this specification is the 4017 chip in the 4000 CMOS family. Here's a quick paragraph about it:

formatting link

The only problem though is that I need a chip that will count to 16 instead of 10. Does anyone know of a similar chip that will cycle thru

16 different outputs?

Then again I could always just use two of these chips, but I just thought I'd check to see whether there was a more suitable chip out there.

Reply to
Tomás Ó hÉilidhe
Loading thread data ...

Look, we told you last time that this was a daft idea. What do you think asking the same question again will change?

Daisy-chain and loop-back two 8-bit shift registers.

Reply to
Hans-Bernhard Bröker

Could you outline the purpose of your project?

At this stage (based on your other posts too) you appear to have a desired to build a project that drives as many LEDs as possible using only 1 processor pin. In real life I have seldom found such constraints - it is often cheaper & quicker to use a bigger part.

I worked on a hobby project that drove 36 LEDs and had 3 input switches all running of an 18 pin PIC. The interface components were 3 pullups, and 3 current limit resitors.

Reply to
Rocky

My project's already finished and it works perfectly. In fact I'll record a video of it, stick it on youtube, and post a link here.

I thinking of ways to improve the project though now.

Reply to
Tomás Ó hÉilidhe

He already said it's for college project. Homework by usenet.

Course assignments seldom make sense in real life.

Reply to
linnix

Just use two of them. They date from DIP package days, and 16 OP would not fit into a small DIP (DIP24). Or, you can put this into a CPLD. - then you could move to a one-wire PWM protocol if you wanted to get much smarter...

-jg

Reply to
Jim Granville

Scrap the 4017 idea. I've decide I'm going to run a 4-Bit counter into a 4-to-16 decoder.

Reply to
Tomás Ó hÉilidhe

Sure, a CPLD. Xilinx XC9536 (5V) or XC9536XL (3.3V) come to mind.

Reply to
Eric Smith

Too expensive.

As I said elsethread, I've decided to run a 4-Bit counter into a 4- to-16 decoder.

Reply to
Tomás Ó hÉilidhe

That will work fine, as long as you don't mind the decoding glitches.

Reply to
Eric Smith

Decoding glitches? Please explain.

Reply to
Tomás Ó hÉilidhe

What is your cost limit? CPLDs are pretty cheap. I want to say I have seen devices for around a dollar US. Even obsolete logic chips aren't much cheaper than that.

Is this intended to teach you something? If so, I would *require* you to use a CPLD if I were the instructor. There is very little value in learning to use chips that were designed long before the PC. Does your instructor also ask you to use a dial phone? Do you connect to your computer using a TTY? (do you know what a TTY is?)

Rick

Reply to
rickman

ru

$1.07 qty 1 at digikey:

formatting link
?name=3D122-1385-= ND

Only if you can find them.

The idea is to teach him what not to do in real life. In real apps, we would not be constrainted to a 20 pins PIC. All his logics can be replaced with a 44 pins uC for 50 cents.

Reply to
linnix

In what way is that superior to daisy chaining two shift-register type devices?

The only justification I see is if you either also have a use for the binary coded count, or you have those two parts in your junk box and don't have a pair of the others, or something similarly out-of-band (like a different logic family that doesn't include that function, whatever)

Reply to
cs_posting

If there's a part available off the shelf for 10 cents, that's likely going to beat the programmable logic solution in most cases.

Where it won't is if you don't have those, or don't want to stock them, and go through small CPLD's like jelly beans. Then the cost of programming the CPLDs might possibly beat the cost of inventory.

Or if the 10 cent part (or pair of them) won't do the whole job. If you need the CPLD anyway, then this function is no longer the justification for it.

But usually, if you can buy your whole solution, it's better to do that than make a custom one. And for that reason, a lot of old technology chips survive, albeit in often in smaller modern packages. There's just no reason to drop them.

Rotary dial phones? They had some real issues (finger hurt really badly trying to win radio station call in prizes). TTY? Well, I use software emulation of one almost every day... that basic idea is sound, but printing on paper isn't usually needed.

Reply to
cs_posting

Only one pin is needed from the microcontroller.

With the shift register setup, two pins are needed (one for clock, one for data input).

Reply to
Tomás Ó hÉilidhe

If you did it right for the display, you can free up more than one pin for the shift register.

Reply to
linnix

No, if you do it right only one pin is needed to clock the pair of shifters.

However, with either this scheme or the binary counter and decoder you proposed, you may find you need a reset or an input back to the uC to synchronize the software with the display ;-)

Reply to
cs_posting

Naah, just add an RC filter on the shift signal to generate the reset. Short pulses for shifting, long pulse for reset. :)

Reply to
Arlet Ottens

Please elaborate, I haven't a clue what you're on about.

Reply to
Tomás Ó hÉilidhe

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.