I have had no trouble with 3 samples per bit when the baud rate error is nominally zero and the communication link is clean. I require two consecutive samples to detect the start bit. I then sample the other bits every three samples after the second start bit detection sample. Bob Ammerman RAm Systems ----- Original Message ----- From: "M. Adam Davis" To: Sent: Friday, June 06, 2003 12:55 PM Subject: Re: Software UARTs (was Zilog Encore series microprocessors) > Tim McDonough wrote: > > >2) If you did not have an external interrupt available to sense the start of > >a byte, how many times the bit rate would you need to sample/poll for > >reliable receive? 4X? > > > As with nearly everything else, the correct answer is "It depends". On > my last stint in bit banging a full duplex rs-232 port I used 4. It is > possible to do it with three, but I ran the numbers and found that my > maximum bit rate error coupled with the maximum error introduced by > using three may result in missing the last bit (stop bit - reading too > early or too late). > > I'm certian that with a crystal that could be divided down correctly you > could get great reliability with three. You would receive the start > bit, wait four cycles for the first read, and then read every three > cycles thereafter. The earliest the reads would occur is 1/3 into each > bit, and the latest is 2/3 into each bit. > > So the correct answer is - run a simulation at the maximum possible > error and see how much error there is at your given N. > > -Adam > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics