Hello again,
I've built a circuit with a 74HC393, dual 4bit counter (http://www.nxp.com/documents/data_sheet/74HC_HCT393.pdf)
It "occasionally" counts correctly (i understand how binary numbers are meant to count) but usually counts "somewhat randomly" or I get counts on the opposite counter to what I'm expecting... My current theory is that my clock input needs a de-bounce circuit? I haven't built one before but happy with a "yes that's what you need" answer and i'll go work that out
For my clock/CP input, I'm using an "astable multivibrator" because:
The vib. uses 2N2222, 300R, 100K, 100uF (one of these things)
Click here to see video of the strange output i'm getting. It's low quality, dont expect you to see how i've wired everything, but just shows me plugging and unplugging CP input and the corresponding behaviour. Paper is covering the LED's so I can film them Essentially only one side works, but the other side usually has at least one LED on (constantly)... If normal behaviour (numbering bits from 1 to 4) is "1, 2, 1&2, 3, 1&3, 2&3 etc... my behavior is this: 3, 1&2&4, 3&4, 1&2&4, 3&4, 2&3&4, 1&2, 3, 1&2, 3, 1&3, 1&2... etc... So it exhibits certain "loops" then randomly changes, and maybe loops, or goes to other loops... It also seems to "briefly" turn on certain LED's occasionally. Which leads me to the theory i need a debounce circuit but looking at the vib. in Every Circuit it seems that it should be reasonably "clean"?
I've checked and double checked my lines going to transistors, resistors, and LEDs, haven't got any floating inputs or outputs.
Thanks heaps for any suggestions
I've built a circuit with a 74HC393, dual 4bit counter (http://www.nxp.com/documents/data_sheet/74HC_HCT393.pdf)
It "occasionally" counts correctly (i understand how binary numbers are meant to count) but usually counts "somewhat randomly" or I get counts on the opposite counter to what I'm expecting... My current theory is that my clock input needs a de-bounce circuit? I haven't built one before but happy with a "yes that's what you need" answer and i'll go work that out
- Chip is powered +5V to VCC, GND straight to ground.
- All 8 outputs (2 pairs of 4) are going to 2N2222 transistors: these have +5V to collector, emittor goes through 300R to LED then ground.
- MR and CP inputs (both pairs) have pull-up 1M resistors
For my clock/CP input, I'm using an "astable multivibrator" because:
- a) at first it seemed to work much better than plugging/unplugging 5V to CP by hand
- b) because I like looking at flashy lights and they in no way drive me insane and
- c) i wanted a super slow clock so i can "see" the counter working, know it's working, and get that sweet "ooo it's working!" feeling
- d) I wanted to play with my my newly arrived components rather than get my raspberry Pi to achieve the same result.
The vib. uses 2N2222, 300R, 100K, 100uF (one of these things)
Click here to see video of the strange output i'm getting. It's low quality, dont expect you to see how i've wired everything, but just shows me plugging and unplugging CP input and the corresponding behaviour. Paper is covering the LED's so I can film them Essentially only one side works, but the other side usually has at least one LED on (constantly)... If normal behaviour (numbering bits from 1 to 4) is "1, 2, 1&2, 3, 1&3, 2&3 etc... my behavior is this: 3, 1&2&4, 3&4, 1&2&4, 3&4, 2&3&4, 1&2, 3, 1&2, 3, 1&3, 1&2... etc... So it exhibits certain "loops" then randomly changes, and maybe loops, or goes to other loops... It also seems to "briefly" turn on certain LED's occasionally. Which leads me to the theory i need a debounce circuit but looking at the vib. in Every Circuit it seems that it should be reasonably "clean"?
I've checked and double checked my lines going to transistors, resistors, and LEDs, haven't got any floating inputs or outputs.
Thanks heaps for any suggestions