Hello, I have a perplexity that is bugging me. It's in regards to Microchip's AN566 - "Using the PORTB Interrupt on Change as an External Interrupt." It's interesting, but I'm curious about their coding. I know Microchip has made coding errors in the past, so I just hope someone can clarify something for me. The code they have for Example 2: PER_INT BTFSS INTCON, RBIF ; PortB interrupt? GOTO OTHER_INT ; Other interrupt BTFSC PORTB, RB7 ;Check for rising edge GOTO CLR_RBINTF ;Falling edge, clear PortB int : ; flag : ;Do task for INT on RB7 : CLR_RBINTF MOVF PORTB, 1 ; Read PortB (to itself) to end mismatch condition BCF INTCON, RBIF ; Clear the RB interrupt flag. RETFIE ; Return from interrupt OTHER_INT : ; Do what you need to here : RETFIE ; Return from interrupt According to the app note, the ISR will run the needed code on the rising edge of a wide pulse and ignore the falling edge. I've gone over this hundreds of times and can't figure why they used BTFSC. Looking at the code tells me that the ISR will run when RB7 is low, which would be a falling edge, right? At this point, I've looked at the appnote/code so many times that it's just a blur. So, can someone clarify that snippet for me? Did Microchip make a goof? Thanks, Tim -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads