slowpicn wrote: > > does anyone have sample pic code for pic16f84 to make it watch its > inputs for a specific code (example 1,2,3 in binary) then once it sees > this code it displays everthing at its inputs to its out puts until a > outside key says shut down then it goes back to watching inputs for code > again? anyone please .... Don't know if this is what you meant, but... MnLoop movf portb,w ; read portb movwf Temp ; store it for future testing if need be xorlw 1h ; test for 1 btfss status,z goto MnLoop ; not 1 movf portb,w ; read portb bsf status,rp0 clrf trisb ; portb = outputs bcf status,rp0 movwf portb ; data onto portb wait nop btfsc porta,0 ; wait until porta,0 = lo goto wait bsf status,rp0 ; portb = inputs again movlw 0xff movwf trisb bcf status,rp0 goto MnLoop -- Best regards Tony 'The Engine' - Design your own programmer. http://www.picnpoke.com Email picnpoke@cdi.com.au