Ports are ports <-- note the 's'. There are two separate buffer circuits for each bit. These can be alternatively connected to the actual pins, but never both at once, so go ahead and change the out values for the disconnected buffers - it won't affect the in values being read from the connected buffers. Just one proviso - read the (real) port value back in after sending all 8 bits out to the buffers - whichever buffers are connected to the pins will be read back. Bye. -----Original Message----- From: John Albers [SMTP:jalbers@GW.BSU.EDU] Sent: Friday, 24 March 2000 4:09 To: PICLIST@MITVMA.MIT.EDU Subject: Basic Question about PORTS ?? This is a question that I have often wondered about but have been afraid to ask: Assumptions: I am working with a PIC16F84. I want bits PORTB bits 3-0 to be outputs having values 1100 respectively. I want bits PORTB bits 7-4 to be inputs. Lets assume for example that bits 7-4 are receiving the following inputs 0011 respectively from external logic. Also assume that I have already used TRIS to set up the PORTB directions. 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. jalbers@gw.bsu.edu