Using a PIC16C84, I have written some code for my electronic gate. The first part goes like this... ;****************************************************************** ; THIS SECTION SETS UP THE I/O PINS ON PORT A AND B * ;****************************************************************** BSF STATUS,RP0 ;CLEAR RP0 IN STATUS REGISTER MOVLW B'0000000' ;MOVE BINARY TO W MOVWF PORTA ;SET A0-A4 AS OUTPUTS MOVLW B'11111111' ;MOVE BINARY TO W MOVWF PORTB ;SET B0-B7 AS INPUTS MOVLW B'00000100' MOVWF OPTION_REG ;ENABLE PORTB PULLUP BCF STATUS,RP0 ;SELECT PAGE 0 CLRF PORTA ;CLEAR PORTA CLRF PORTB ;CLEAR PORTB and the second goeslike this... INIT_TIMER ; BSF STATUS,RP0 ; MOVLW B'00000100' ;DIVIDE BY 32,ENABLE PULLUP ; MOVWF OPTION_REG BCF STATUS,RP0 MOVLW B'10100000' MOVWF INTCON ; MOVLW .102 ; MOVWF TMR0 the parts that are remmed out were me trying to find the problem. What happens is that the pullup does not seem to work with the second code section added. Using the timer interupt was an addition. In the first part of the code I specificaly cleared the pullup bit to enable it. I can't get it to work together and I don't know why. Please help Gordon Gordon Zerf Director - KerZer Computers