-
4017 counter and pic
hi,
i'd like to switch between 10 outputs using a 4017 decade counter.
let's say i'm using 10 leds which anode is linked to one of the 10 outputs.
i have to connect vdd an vss, obviously, then the clock pin to a pin of my pic, the clock enable to another pic pin and the carryout to the clock pin of another 4017 if desired, right?
If i understood well the datasheet, by default, output 0 will be on. to switch to next outout i have to input a positive voltage to clock pin AND bring clock enable pin low, is this right?
even if i put a positive voltage on clock pin, it wont switch to next output, right?
Last thing, the switch to next output happens only on the rising edge of the clock pin, right?
-
Maybe not 0 as default, but for sure 0 after a reset. Look at the Functional Truth Table (page 2 of the following PDF).
http://www.onsemi.com/pub_link/Colla...MC14017B-D.PDF
Clock Enable can be connected to Vss all the time, so the output will shift at each clock rising edge.
What i would do is to connect Reset and Clock on the PIC, and Clock enable to Vss.
Check PDF page 3, Output Drive current... not a good idea to use this chip as is to drive LEDs... maybe you have high efficiency ones? Spec might be different from brand to brand though... worth a look.