In SX Microcontrollers, SX/B Compiler and SX-Key Tool, curtis wrote: Hello, I have created a circuit with an IR detector module and an rs232 module using the sx tech board. I know each module works but I was not sure if my code is correct. Can someone advise me if this is correct? I cannot see anything on hyperterminal or a VB program that I created. ' ------------------------------------------------------------------------- DEVICE SX28, OSCXT2, TURBO, STACKX, OPTIONX FREQ 4_000_000 ' ------------------------------------------------------------------------- ' IO Pins ' ------------------------------------------------------------------------- IRin VAR RA.0 ' IR input IRout VAR RA.1 ' IR output ' ========================================================================= ' Vaiables ' ========================================================================= IRval VAR Byte 'pulsin variable Temp1 VAR Byte 'counter variable ' ========================================================================= PROGRAM Start ' ========================================================================= Start: ' initialization code here goto Main Main: for temp1 = 0 to 15 pulsin IRin,0,IRval Serout IRout,T9600,IRval next end GOTO Main Thanks, Curtis ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=126855 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)