piclist 2001\01\10\173657a >
Thread: ASYNC Data Communication
face BY : David Huisman email (remove spam text)


I assume that you are not using an on-board UART (as this would do the
multiple sampling for you).

If you are bit-bashing the Comms on the mains, you can sample the pin 3
times at the centre point of each BIT period and if 2 of the 3 samples are
at the same level then use this as your detected level. The sample rate
could be about 8 times higher than the Bit rate.
Check the data on the TDA5051 and make sure it can tolerate long runs of
"1's" and "0's". Standard NRZ format asynch data can be high or low for 8
bit periods (13.3ms @ 600 Baud).

If the IC cannot tolerate this then change the data format to Manchester
Encoded. You can approximate this in software by sending the Bit in each
byte followed by it's complement. This results in 2 bytes being sent per
data byte but the DC average per word is 50%.

Also, ensure you use some form of packet structure. ie. Preamble, Synch,
Data, CRC. And if comms is bi-directional then wait for ack from remote node
and resend if no ack within timeout period. If comms is unidirectional then
send packet 3 times.

David Huisman

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body

<004701c07b50$d2d8fd50$3c00a8c0@advminingtech.com.au> 7bit

See also: www.piclist.com/techref/microchip/memory.htm?key=data
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) ASYNC Data Communication

month overview.

new search...