In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Lightfoot wrote: After much experimenting I found this is the most reliable way to transmit serial data through an HO scale railroad track. Transmitter Code: ****************************** tris_a = 0 _data var byte DO SEROUT RA.0, T2400, _data pauseus 100 LOOP Receiver Code: ****************************** tris_b = 0 plp_a = 0 DO SERIN RA.0, T2400, rb LOOP The only problem with the serout command is that it does not generate bipolar AC from my H Bridge. Only inverting a pin does that (the only way I know of). So the transmitter would need to transmit serial data at 2400 baud doing (ra.0 = ~ra.0) bitwise nots. I do not know how to calculate the pauses needed to send a binary 1 or 0 or have an accurate idea how to code a bitwise not serialout program. Also if there is a way (even using serout) besides bitwise not that can generate bipolar AC please say so. Thank you ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=198278#m199320 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)