On Fri, 6 Nov 1998, Ultra Control Sdn. Bhd. wrote: > Anyone for the old Debouce challege: > > I hooked a push to make switch at RA1 of a PIC16F84. > The other end to the ground. And connected to the +VDD is a 15KOhm > resistor. > What is the fool proof way to read the key? I used the code below with > inconsistent result although is does work. Or any recommendation of a > cheap hardware > configuration. WWW site welcome. > > SCAN MOVLW 0XFF ;Init Port A as input > TRIS PORTA ; > > KEY_LO BTFSC PORTA, 1 ;Key Press down = 0 > GOTO KEY_LO ;Keep scan till LO detected > CALL DELAY ;Debouce, dont scan for > ~500msec > CALL DELAY ; > CALL DELAY ; > CALL DELAY ; > KEY_RLS BTFSS PORTA, 1 ;Key Release > GOTO KEY_RLS I'm not sure what you're seeking, but you oughta check out my web page: http://www.interstice.com/~sdattalo/technical/software/pic/debounce.html It's better suited for simultaneously debouncing 8 inputs. Scott