In SX Microcontrollers, SX/B Compiler and SX-Key Tool, phipi wrote: Lightfoot, Assuming that the incoming data consists of long idle periods, detecting the idle state, as shown here, will work. But, in general, the requirement being imposed on you by the transmission device makes absolutely no sense. You really need to know ahead of time what kind of data you're receiving. But, absent any cues, like long idle periods, there's no way to know; and if you guess wrong, you'll end up receiving garbage. Plus, I'm not even sure what you mean when you say that the transmitting device can send both types of data. Does this mean that it can change it's mind at any point in time and begin sending data of the opposite polarity? If so, an idle marking state will, all of a sudden, become either a bogus start bit, or the beginning of a long BREAK. If not, why can't you know ahead of time which polarity is being used? I have to admit: I'm stumped by what seems to be a rather capriciously-inspired design requirement. I hope, for the sake of your project's success, that you can convince the designers of the transmitting device to make up their minds one way or the other. -Phil ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=201356#m201454 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)