In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: dbj, I will try to break this to you gently. Your present TX1.SXB code is not well written. (I understand SX/B may be new to you. Many of us have made similar mistakes while we were learning.) Here are some of the problems. [LIST]*1.) The program as written will make only one check of the alarm trigger before ending. To check continuously add something like "GOTO Main" at the end of your program. *2.) The PUSLEOUT command is expecting a Duration value not a quoted string. In my opinion the compiler should report an error in this case. Replace your "OT9600" entry with a number representing how many 10ms durations you want the pulse to last. *3.) The SEROUT command expects to send a single byte serially. You are attempting to use it to try to send an entire string. This is a common misunderstanding of how the command works under SX/B. Again, I think the SX/B compiler should generate an error under this condition but it does not seem to do so at this time. To send an entire string check out the LCD_OUT subroutine of the RFID Reader Interface example in the SX/B Help file. It demonstrates the passing of string data to a subroutine, which in turn uses the SEROUT command to send the data serially one byte at a time. *4.) While technically not a problem, the ELSE statement and the NOP command are not necessary and can be omitted.[/LIST] Other than that, you appear to be on the right track. Let us know how it goes. - Sparks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=194394#m197441 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)