In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Coriolis wrote: One final addundum, if you are accessing the WKPND_B in your ISR as shown in section 4.4.2 (same page of document cited above) you will need to save the contents of the mode register before changing it, this is because the ISR can interrupt the main code at the end of any clock cycle, so a MODE $0B, mov !rb, #$ff sequence can be interrupted in between the two instructions, if this occurs and you don't save and restore the mode register's contents the mode would be $09 (WKPND_B) when mov !rb, #$ff is executed and not $0B as you intended. Due to the asynchronous nature of MIWU, this could cause an infrequent and nearly un-reproducible (and therefore extremely hard) bug to fix. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=78775#m79557 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)