- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 youLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Whatif you choose longest length for a shift register. Insert your bits into the shift register starting from one end. Then enable shift for the number of bits that you inserted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kaz's idea would probably be the simplest.
But could not use the input number as the load value for a down counter?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- 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? --- Quote End --- Page 45 has an example that may work for you too: http://www.ovro.caltech.edu/~dwh/carma_board/ad9956_tests.pdf Cheers, Dave

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page