In SX Microcontrollers, SX/B Compiler and SX-Key Tool, amiller wrote: A quick look at your code shows that you are looping back to Main after the sleep. The first thing you do in Main is to change the values of the ports, THEN read your pending triggers. Could this be causing your problems. Save your list of pending triggers before looping to Main, or loop to the code after the port initializations. You have also enabled wakeup on an output pin, rb.4. This may cause problems as above. You probably also want to turn on the internal pullups for the input pins, just to be safe. BTW, if you ever turn on those interupts, you are going to have contention within your serial output code. I hope this helps, -AGM- ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=106511#m107954 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)