Below is a section of code that reads 32 inputs into an '84 via hc244's I wass origanally having trouble with bouncy switches but after adding Scott's debounce chunk it wont work at all can sombody please help this is causing lots of grey hairs and a severly short temper. DTA is port_b and the information is saved in four consecutive registers. TIA Steve..... ;--------------READ DATA ON INPUTS TO FILE LOCATION---------------- ;--------------DATA ON INPUTS 1-4 (0-32) ARE SAVED IN INREG 1-4 ;--------------SCRATCHES GP1,2,3 & W READ_1 MOVLW .4 ; NUMBER OF LOCATIONS MOVWF GP1 ; SAVE IN TEMP STORE READ_2 MOVFW GP1 ; GET COUNTER ADDLW CONOFF+3 ; ADD THE OFF LOCATION TO PORT LOCATION MOVWF CON ; SET CONTROL PORT CLRF DTA ; CLEAR GARBAGE MOVLW B'11111111' ; PORT INPUTS BANK1 ; REGISTER BANK 1 MOVWF DTA ; SET B AS INPUTS BANK0 ; REGISTER BANK 0 MOVFW GP1 ; GET COUNTER ADDLW INREG1-1 ; ADD OFFSET MOVWF FSR ; SAVE IN INDIRECT ADDRESS BCF IOEN ; ENABLE PORT ;de_bounce by Scott Dattalo ;Increment the vertical counter MOVF GP3,W XORWF GP2,F COMF GP3,F ;See if any changes occurred MOVF DTA,W XORWF INDIRECT,W ;Reset the counter if no change has occurred ANDWF GP3,F ANDWF GP2,F ;Determine the counter's state MOVF GP3,W IORWF GP2,W ;Clear all bits that are filtered-or more accurately, save ;the state of those that are being filtered ANDWF INDIRECT,F XORLW 0xff ;Re-write the bits that haven't changed. ANDWF DTA,W IORWF INDIRECT,F ;END DEBOUNCE. THE ABOVE SECTION REPLACES THE FOLLOWING TWO LINES. ; MOVF DTA,W ; INPUTS INTO W ; MOVWF INDIRECT ; SAVE IN TEMP STORE BSF IOEN ; DISABLE PORT CLRF DTA ; CLEAR GARBAGE MOVLW B'00000000' ; OUTPUTS BANK1 ; REGISTER BANK 1 MOVWF DTA ; SET B AS OUTPUTS BANK0 ; REGISTER BANK 0 DECFSZ GP1,F ; TEST FINISHED GOTO READ_2 ; DO NEXT RETLW 0 ; RETURN TO PROGRAM