In SX Microcontrollers, SX/B Compiler and SX-Key Tool, hainguyen51 wrote: Hi, I need to detect an edge of a signal (+ or -). I have tried to use the example in the manual but it doesn't seem to work. Anyone knows how please let me know. In the main program, I would like to set rc.0 "high" when a positive edge is detected. Thanks Hai 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. ; main MOV M,#$09 MOV !RB,#$00 JMP main ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=302755 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)