John Albers wrote: > > This is a question that I have often wondered about but have been afraid to ask: No need to be afraid here, except for the barrage of help that usually follows. > Question/Problem: > I know that I could use the BSF and BSC instructions to selectively change bits 3-0 on PORTB. But suppose that I want to use movlw b'????????' followed by movwf PORTB to set things up. I know that I need movlw b'????1100' but I don't know what to put for ???? since bits 7-4 are inputs. I have a felling that I can use anything for ???? and the PIC will ignore it because bits 7-4 are inputs. In general what happens if anything, when a pin is set for input and a BSF, BSC, or MOVWF command tries to change the value of that pin to a 1 or 0? Any help would be greatly appreciated. Thank You. Yes you can use anything on those bits. If they always stay inputs, then no problem. If you decide later to change them to outputs, make sure you initialise them to a known value before hand. Try not to use more than 1 consecutive BSF, BCF instruction on the ports. Eg bsf portb,1 ; not recommended bcf portb,0 bsf portb,5 Put a NOP or some other useful instruction between. -- Best regards Tony http://www.picnpoke.com mailto:sales@picnpoke.com