In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Lightfoot wrote: Thank You, JonnyMac, for your time. I finally found a way to make my receiver work. Here is the code for all: [code] tris_a = 0 tris_b = 0 DO serin RA.0, T2400, rb if rb = 0 then 'If the locomotive is reverse oriented (see my picture for explanation) on the track, the polarity of the serial data is reversed. SERIN will receive a value zero ' since it can not be read as true serial data. serin RA.0, N2400, rb 'Read the inverted data if the locomotive is reverse oriented on track. endif LOOP [/code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=198278#m199535 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)