OlPhart
Member
Howdy, I've used this dual 4 bit binary counter in a Lot of designs. This one has me pulling hair: tie the B side clock to bit3 of A for an 8 bit counter. Feed A side clock with a rotary encoder. Take all 8 outputs into a CD4021 parallel->serial shift register. Read the encoder count by a pulse of the shift/load line then 8 clock pulses into the micro. Subtract the previous count from the current count to get # counts this period.
Simple, can't miss an encoder pulse (if period vs encoder speed doesn't overrun 256), perhaps elegant. Here's the rub: about half work as expected, the other half have counter problems. Most failures are the 1st F/F having same waveform as the input: not dividing by 2. Some exhibit this on the 1st and 2nd F/Fs. A couple have the 2nd F/F adding transitions: divide by 2 then only by 1... erratically. Some boards you can make behave by putting a locally ungrounded (!) scope probe on the problem line, others ignore any such "tapping".
I started out using the HC family, but tried changing to the LS... no avail. I have both S/R & counter adequately bypassed, all boards are built the same, with minor layout differences. No apparent correlation of layout or part family to behavior. I'm missing something, but what? TNX <<<)))
Simple, can't miss an encoder pulse (if period vs encoder speed doesn't overrun 256), perhaps elegant. Here's the rub: about half work as expected, the other half have counter problems. Most failures are the 1st F/F having same waveform as the input: not dividing by 2. Some exhibit this on the 1st and 2nd F/Fs. A couple have the 2nd F/F adding transitions: divide by 2 then only by 1... erratically. Some boards you can make behave by putting a locally ungrounded (!) scope probe on the problem line, others ignore any such "tapping".
I started out using the HC family, but tried changing to the LS... no avail. I have both S/R & counter adequately bypassed, all boards are built the same, with minor layout differences. No apparent correlation of layout or part family to behavior. I'm missing something, but what? TNX <<<)))