In SX Microcontrollers, SX/B Compiler and SX-Key Tool, VelocitąPaola wrote: Well, I don't think this was the actual problem, but there was a typo in the "IF SIGNAL = 0 THEN" line where "SIGNAL" was written as "SIGNAl." My guess is that the chip isn't getting a proper signal on that pin, probably because "SIGNAL" wasn't defined as an input. It could also have something to do with the fact that you used "PROGRAM Setup" instead of "PROGRAM Start." That line of code NEEDS to be correct. Now, I also have a few style criticisms for you as well. For starters, look into using the programming template found in the SX/B help file. It helps keep your code more organized and easier for others to read. The same goes for using lots of white space and tabs/spacing -- I'm not sure if that was lost in the upload/download process, or if you omitted it from the start. You can define a pin's data direction in the same line of code that you define its name. Notice how I did it in the revised version I uploaded. You'll quickly run out of memory if you use bytes where bits would suffice. Become familiar with words, bytes, bits and arrays and know when to use each. Again, notice how I did it in the revised version I uploaded. Then there are just a few small code optimization techniques you should be aware of... when using an IF...THEN statement in conjunction with a GOTO statement, you can simply write it as IF condition THEN GOTO label in one line: no ENDIF is needed. Also, where you wrote "IF SIGNAL = 1 THEN STATUS1 = A ENDIF," etc.; since SIGNAL and STATUS1 are now both bits, you can simply write STATUS1 = SIGNAL. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=307554#m308027 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)