Bit banging Asynchronous Serial Communication
Stephen B Webb email (remove spam text)
> 1)For the Rx algorithm, what is the best was to watch for the Start Byte?
> Is it best to use an interrupt or to keep polling the line for a
If you can do it, I would let the interrupt on RB0 do the hard part for
you. Polling would work, but seems less flexible.
> 2) Once you think the start byte is coming, what is the best way to be
> sure. ie, do you look for a pulse that is equal to 1/baud rate? or do you
> assume that any transition is the beginning of the Start Byte?
Wait for 1/2 bit period, and sample a few times, if the line is still low,
then it's a start bit...
Advice: Buy the Serial Pic'n book.
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email mitvma.mit.edu with SET PICList DIGEST in the body listserv
In reply to: <email@example.com>
See also: www.piclist.com/techref/io/serials.htm?key=serial
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the