Tech Support > Computer Hardware > Microprocessors > Simple Clockable Decoder Chip
Simple Clockable Decoder Chip
Posted by Tomás Ó hÉilidhe on May 3rd, 2008



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:

http://www.kpsec.freeuk.com/components/cmos.htm#4017

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.

Posted by Hans-Bernhard Bröker on May 3rd, 2008


Tomás Ó hÉilidhe wrote:


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.

Posted by Rocky on May 3rd, 2008


On May 3, 7:44*pm, Tomás Ó hÉilidhe <t...@lavabit.com> wrote:
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.

Posted by Tomás Ó hÉilidhe on May 3rd, 2008


On May 3, 7:29*pm, Hans-Bernhard Bröker <HBBroe...@t-online.de> wrote:

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.

Posted by linnix on May 3rd, 2008


On May 3, 11:37 am, Rocky <RobertG...@gmail.com> wrote:
He already said it's for college project. Homework by usenet.

Course assignments seldom make sense in real life.



Posted by Jim Granville on May 3rd, 2008


Tomás Ó hÉilidhe wrote:


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


Posted by rickman on May 4th, 2008


On May 3, 4:00 pm, Jim Granville <no.s...@designtools.maps.co.nz>
wrote:
But why use a CPLD along with a CPU when you can just use two CPUs?
One input and 16 outputs, heck that can be done in a CPU in a 24 pin
package. The program is about as simple as writing the HDL for the
counter. If you already have an MCU in your system this is like
falling off a log. Only a masochist would want to add obsolete 4000
series CMOS parts, RC timing or PLDs to such an otherwise simple and
elegant design.


Posted by Jim Granville on May 4th, 2008


rickman wrote:

This was a project, so normal commercial yardsticks do not apply.

However, even when they DO, do not dismiss the 4017 so quickly.

It has VERY low static power, cannot crash, and costs 15c for 10 op
pins. Show me a Micro that even comes close!

If that is ALL you need, using a Micro actually makes little sense.

CPLDs also compete reasonably well in a cents/IO function, with a uC,
and if you need highish drive current, they can outclass a uC, as most
uC have single GND pins, vs commonly 4+ on a CPLD.

ie a Micro is not always the best solution.

We still use PLD and 4000 cmos in active designs, because they are
the best parts for the task. (and uC too, of course!)

-jg




Posted by rickman on May 4th, 2008


On May 3, 10:55 pm, Jim Granville <no.s...@designtools.maps.co.nz>
wrote:
Let's face it, if this were a commercial project, you would just pick
a larger MCU and be done with it. Of course if you are making a
million of them a larger CPU is likely more expensive than a 4000
series chip. But most of my projects are space constrained and adding
a couple of chips would be way down the list of options. Everything
depends on your constraints.


Posted by Hans-Bernhard Bröker on May 4th, 2008


rickman wrote:

I wouldn't, and precisely _because_ it's a commercial project. Hobbyist
or one-off in-house projects often have virtually no cost constraints.
It's the commercial ones that do.

Exactly. And below a million pieces, some might not consider it a
commercial project ;-)

Posted by Tomás Ó hÉilidhe on May 4th, 2008



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

Posted by rickman on May 4th, 2008


On May 4, 11:24 am, Hans-Bernhard Bröker <HBBroe...@t-online.de>
wrote:
Obviously you only work on one type of commercial project. Mine are
mostly space constrained. I don't have the luxury of using large
package devices where I can do the job in a much smaller part, no
matter how many I am building.

Posted by Eric Smith on May 5th, 2008


Tomás Ó hÉilidhe <toe@lavabit.com> writes:
Sure, a CPLD. Xilinx XC9536 (5V) or XC9536XL (3.3V) come to mind.

Posted by Tomás Ó hÉilidhe on May 5th, 2008


On May 5, 9:33*pm, Eric Smith <e...@brouhaha.com> wrote:

Too expensive.

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


Posted by Eric Smith on May 6th, 2008


Tomás Ó hÉilidhe wrote:
That will work fine, as long as you don't mind the decoding glitches.

Posted by Tomás Ó hÉilidhe on May 6th, 2008


On May 6, 8:10*am, Eric Smith <e...@brouhaha.com> wrote:

Decoding glitches? Please explain.

Posted by rickman on May 6th, 2008


On May 5, 5:12 pm, Tomás Ó hÉilidhe <t...@lavabit.com> wrote:
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

Posted by linnix on May 6th, 2008


On May 6, 6:24 am, rickman <gnu...@gmail.com> wrote:
$1.07 qty 1 at digikey:

http://search.digikey.com/scripts/Dk...me=122-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.


Posted by cs_posting@hotmail.com on May 6th, 2008


On May 5, 5:12 pm, Tomás Ó hÉilidhe <t...@lavabit.com> wrote:

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)

Posted by cs_posting@hotmail.com on May 6th, 2008


On May 6, 9:24 am, rickman <gnu...@gmail.com> wrote:

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.


Similar Posts