> Van: Dennis Plunkett > Aan: PICLIST@MITVMA.MIT.EDU > Onderwerp: Re: I/O Problem with 16F84 > Datum: donderdag 4 juni 1998 4:17 [Cut] > I gather that you are using an F84, if this is so, then you must select the > correct register bank in the STATUS register (RP0) in order to write to the > port direction control register (TRISA and TRISB), do this and all should be Not when you use the (outdated) TRIS _command_. Re-write the code using the TRIS commando's like this (like dennis tried to say) : bsf STATUS,RP0 movlw 0x1f movwf TRISA movlw 0x00 ;\ or use : CLRF TRISB movwf TRISB ;/ bcf STATUS,RP0 > fine. I also note that the value written to the port a register is 0x3f, > should be 0xff Port A has only 5 I/O bits (on a 16x84) , so the value is OK. > Have fun > > Dennis >