In SX Microcontrollers, SX/B Compiler and SX-Key Tool, VelocitąPaola wrote: To put the SX to sleep itself, all you need to do is use the "SLEEP" command. I've seen others put a few "nop" commands directly after, though I don't know the exact reasoning. To wake it up, you just need to configure a few registers: [CODE] WKED_B = %1111_1110 WKPND_B = 0 WKEN_B = %1111_1110 [/CODE] WKED_B specifies which edge triggers the wake up routine. 1's signify a falling edge and 0's signify a rising edge. In this example, RB.0 is set to look for a rising edge before waking up the SX. The WKPND_B register should be cleared before every time you put the SX to sleep. The WKEN_B register is what specifically enables the port B pins to wake up the chip when triggered. 0's enable the pins. Only RB.0 is enabled here. The 2N2222 transistor should work just fine for your needs, though something like a TIP110 might be more straightforward to implement. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=276305#m276517 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)