In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: When you "read" the WKPND_B register (MODE $09), the bits get put into the W register (actually the register and W values are swapped). So I'd try something like: start MOV M,#$0F ;Set up MODE register. MOV !RB, #$FF ;Set $00 make RB all Inputs. MOV !RC, #$00 ;Set $00 make RC all Outputs. MOV M,#$0E ;Set up MODE for PULL-UP configuration. MOV !RB, #$00 ;Set $00 make RB all inputs' Pullup. MOV !RC, #$00 ;Set $00 make RC all Outputs' Pullup. ; MOV M,#$0A MOV !RB, #$00 ;Set $00 make +slope detect at RB pins. ; MOV M,#$09 MOV W,#$00 main MOV !RB,W ' This will put the register bits in W MOV RC,W ' Put edge detect status on RC pins JMP main Bean ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=302755#m302764 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)