Altera_Forum
Honored Contributor
14 years agoShift out design within state machine
Greetings.
I have a questions I cannot find in any books. I have several binary sequences I need to shift out in a shift register. there are seven of them ranging from 24 bits to 48 bits. They are basically error codes I am using to flash an LED in a specific pattern. I am writing a case statement that uses an 8 bit number as an input, clocks it in and then analyzes it. Once the binary number is determined it moves to the state and clocks out a specific sequence of 1's and 0's a half a second per bit. The problem is that the bit streams are all different length and I am trying to think of a creative way to output a different length binary stream. Worst case I could make a state machine for every single binary output but this would use a lot of logic elements up. Are there any other methods to shift out binary sequences of varying lengths within a state machine or a case statement? Thank you