From: Jim Granville on
Tom�s � h�ilidhe wrote:
>
> Only one pin is needed from the microcontroller.
>
> With the shift register setup, two pins are needed (one for clock, one
> for data input).

You can make a vanilla OneWire Shift-Register interface, by using a
RC on the Data pin, and pulse-width varying the clock.

Assuming a Positive edge Clock :

A narrow clock Low time, loads a HI on the rising edge
(D Pin is still hi),
a Wider clock LOW time, loads a LOW on the rising edge
(D pin has had time to follow the clock Lo)

Shft registers are very common, and you have a choice of drive-currents.

-jg

From: Jim Granville on
rickman 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?)

The 4017 candiate is appx 15c in moderate volumes, and has uA standby
power, and a small, easily handled package, and 5V operation (so can
drive Power MOSFETS). It is in volume production, so is not an
obsolete device.
(not all 4xxx devices are obsolete)

If that is ALL the functionality that is needed, then a CPLD
could be a massive overkill.

If the 4017 does not make it, and you need to add more chips, then
a CPLD moves onto the radar.

Avoid the high power ones, and for low power/low voltage designs
look at ATF1502BE/XC2C32A/MACH40xxZE series.

If you need to drive 5V from a low power CPLD, things get tougher...
(that's one combination that has fallen-thru-the-cracks, and another
reason those 4xxx / HCxx series devices still sell in volumes ! )

In fact, many 4xxx devices leave CPLD for dead, on a production
life-time basis !

So, a well rained designer knows about CPLD _and_ Logic Devices, even
back to 4000 series ones.

-jg


From: Hans-Bernhard Bröker on
rickman wrote:

> Let's face it, if this were a commercial project, you would just pick
> a larger MCU and be done with it.

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.

> Of course if you are making a
> million of them a larger CPU is likely more expensive than a 4000
> series chip.

Exactly. And below a million pieces, some might not consider it a
commercial project ;-)
From: Arlet Ottens on
cs_posting(a)hotmail.com wrote:

>> With the shift register setup, two pins are needed (one for clock, one
>> for data input).
>
> 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 ;-)

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

From: Tomás Ó hÉilidhe on

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