I need to interface to another processor that will, at random times, send me 100 bits, 1 every millisecond. The data will start with a transition from a '0' to a '1'.
The 'random time' part says INTERRUPT to me.
But, an interrupt service routine can evidently only collect 16 bits of data, and probably can't have a delay for the 1 millisecond requirement.
My thinking is that I need an interrupt to sense the start of the data, followed by a 500 microsecond delay to get me to the middle of the incoming bit, and then collect a bit every time a 1 millisecond timer goes off.
My gift for the obvious evidently doesn't apply to Arduino code yet. I am only coming up with very complicated solutions.
The incoming data will be important, so I don't want to miss any.
The main loop will consist mainly of back and forth communication with the computer.
What is a great way to do this?