How do we go about designing a code or circuit that can detect some arbitrary sequence of bits? As in, the user inputs the sequence they wish to detect, and the code or circuit would detect that sequence in a string of bits.
I have done sequence detectors for some particular sequence and understand that the entire sequence diagram changes for every one. I wonder if there is a way to make a pattern and make a state diagram maker that works for any sequence?
Magnitude comparator sniffing the output of a shift register
is the general purpose approach. But if you're up against
the technology's speed limitations, it may be too slow and
a hard coded delimiter detect logic might be necessary to
hang with the bit rate.
The use of an UART module could meet the need in a safer way, due received bits must to be encapsulated at some protocol such as 8N1, in order to properly be recognized Start/Stop of each transmitted sequence.