Nothing external available that might provide clocking? Like a serial port?
Unfortunately the wire would have to be 299792458 metres long
so I'm not offering like a prize or something.
PS: You have given me an idea for something I should try and write. A general purpose auto-baud rate detector function. Should be simple, just use pulseIn command to get the LOW data bit width from pin 0 and compare that to a look up table of values and then one could start the serial.begin command with?
The problem with serial data is finding the start / stop bits. If the serial bits are a continuous stream, it can be surprisingly difficult.
Lunch at your favorite restaurant when/if the winner is in your town?
Any restrictions on processors? (I suggest you only allow processors you have on hand so you can verify the win)
Well is it really? Using the pulseIn() command measuring the first low to high pulse width it sees
will either capture the width of the first start bit width or any valid zero data bit width if the stream is already active. A start bit and a data bit have the same width at any given baud rate.
What am I missing?
What if there are two same value bits side-by-side? Or three bits?But, you could sample for a while (using pulseIn) and take the lowest reading. Or, you may be able to collect a few samples and deduce the single bit time. I think the trick is to determine which timings are for odd numbers of bits or prime numbers of bits.