Exact match. Not showing close matches.
'[PIC]: ASYNC Data Communication'
Dear PicList members
I am trying to send data via a TDA5051 home automation modem. I have difficulties to receive reliable data from this modem and I think it is because of a lot of unwanted disturbances on the current lines...
Can anyone help me with .asm code or a website for async data transfer at 600 or 1200 baud that does multisampling of a byte and error correction?
(The code that I used sample the RxData pin only once every 1.6 ms for 600 baud and Michat Electronics describes a way of sampling a byte 9 times to improve the noise immunity)
\\ ~ ~ //
( @ @ )
| Francois Robbertze |
| mweb.co.za | fr10
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
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.
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email mitvma.mit.edu with SET PICList DIGEST in the body listserv
More... (looser matching)
- Last day of these posts
- In 2001
, 2002 only
- New search...