Tue Nov 11 17:32:13 CET 2008
Now, let's see what there is to do to pipe in data. Using 4 channels,
there are 2 measure points per byte, gives a rate of about 50kbit.
But, let's keep it simple an pipe only the bytes.
Using 8 channels is easiest to code, but gives only 23k samples/sec.
At 230400 baud, a byte needs to leave every 434 cyles. Let's work
with a sample period of 54 cycles, this gives enough time to send out
the bytes (TXREG !) and amounts to 185k samples/sec.
Now, make this into 64 cycles, and a free running timer can be used to
synchronize, making everything easier to get right. This still gives
A free running timer isn't necssary, we can easily update the timer