I have read 2 other replies, and knowing how my projects are.. Far
apart(distance), and only wanting to use 3 wires, RX, TX, and GND, I am
sure you don't care for the extra output clock idea. Oh the second idea, that
is a interesting idea, to sample the byte length, and then
operate at that speed. Well, I am sure that would work, but for any fast BPS
rates, I would say you would get much to high a percentage of
error. I am working on a project that does not use the uart, so I will give an
example of solving the problem without using the uart. I can
correct my timing after each byte if I send about 3 or 4 bits length of stop bit
(typically hi for 1.5 bits is a normal stop bit) The
receiving end will not start getting a byte till it sees the start bit (a low),
this will only give you 9 bits for timing errors to show up.
I know I have a lot of slop in my bit-bang functions, but at 9600bps, I can talk
nonstop with no errors. As I am not using the uart, I might
not of given you any usable advice. Good luck.
Giles L. Honeycutt
Luckjiff Glen wrote:
{Quote hidden}>
> hi. I'm connecting two 65 PICs with USARTS using RS232
> in asyncronous mode with a MAX232A on each end. The PICs use
> RC oscillators. Problem is that if the internal clocks are off
> substantially (40kHz) due to component tolerences say
> the data gets corrupted. I could modify the SPRG value to
> get the baud rates close, but what is a good algorithm to do
> this. Also, can anyone suggest a simple protocol data transfer.
> Thanks for your time.
> Glen Luckjiff
>
KILLspamluckjiffKILLspam
cae.wisc.edu