Searching \ for '[PIC]: ASYNC Data Communication' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/memory.htm?key=data
Search entire site for: 'ASYNC Data Communication'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: ASYNC Data Communication'
2001\01\02@081737 by Francois Robbertze

flavicon
face
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)


Regards

             lllllllllll
            \\  ~ ~ //
            ( @ @ )
o------oOOo-(_)-oOOo-----o
|                                   |
|   Francois Robbertze    |
|    spam_OUTfr10TakeThisOuTspammweb.co.za     |
|                                   |
o--------.oooO-Oooo.-------o

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\01\10@173657 by David Huisman

flavicon
face
Francois,

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.

Regards
David Huisman

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


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...