Can someone help me understand how to do this counter ripple? and what to be use as counter (74ls76 or 74ls193). My problem is to make counter like this [0, 2, 3, 4, 6, 7, 9, 15, 14, 13, 12, 11, 10, 8, 5, 1]
|
|
Any 4-bit binary counter will do the job, but you need to alter the output. Complex, but "normal" way - a nice logic circuit involving lots of gates to convolve the 4 bits of synchronous counting into the sequence you want. Tricky, but possible with some nice Karnaugh mapping to get you through. Simple, but "alternative" way - Counter + small (E)EPROM. Counter drives the address lines of the (E)EPROM. Data lines of the (E)EPROM contain the modified count values. The beauty of this way is that a) it's low on component count, and b) a new number sequence can be programmed without needing to change the circuitry in any way. |
|||||
|
|
Yet another way is to have the input pulse shift a bit around in a circular shift register. The output of the shift register goes into a priority encoder. Since you can wire the shift register bits into the priority encoder inputs any way you like, you can cause any arbitrary sequence of counts to come out of the priority encoder. Or, if the minimum required count speed is low enough, use a small microcontroller. This would be a very trivial program to implement in the micro. What is the maximum incoming pulse rate? |
|||||
|
|
I would also do it with the EEPROM as a lookup table, as also Matt suggests. An even more compact solution is to use a CPLD, because you can integrate the counter with the lookup table in it. Then there's the decode/re-encode solution. This would be sexier if there would exist 16-to-4 encoders, but I could only find 8-to-3 versions. |
|||
|
|