In SX Microcontrollers, SX/B Compiler and SX-Key Tool, phipi wrote: Hey Bean, I just read your post from 11/5. I've always used 3x the baudrate for receive. The reason is this: at 2x, if the first low in the start bit is detected near the middle of its transmitted frame, the first data bit won't be sampled until very near the end of its frame. Any slight mismatch between baudrates, and you [i]could[/i] already be into the next bit. And baud mismatches only get exacerbated as you near the end of the byte. At 3x, this can't happen. Here, you wait for the start bit, then wait four timer interrupts to sample the first bit, then three thereafter. The first detected low in the start bit can't be more than 1/3 through the bit. Add 4 clocks to this, and you can't be more than 2/3 through the first data bit. At the other end, if the first start bit sample occurs right when the start bit goes low, the first data bit sample can't be less than 1/3 through the first data bit. So in every case, you're sampling data bits in their middle third. At 3x, you've also got a chance to resample the start bit one interrupt after it's detected to see if it was just a noise glitch. 'Just a suggesiton... -Phil ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=151101#m154574 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)