Hey all, I've been trying for a couple weeks to use the PORTC pins on a PIC 16F877 for output along with the hardware serial port. The hardware serial port functions fine and I can communicate with another host unless the following subroutine is called before the serial routines: I8255WriteConfigRegister ; set address lines of the 8255 to access its config register movlw b'00001111' movwf PORTC ; load the config value and write it to the config register movf I8255CONFIGVALUE, W movwf PORTD call I8255WriteStrobe return The serial port doesn't work if this routine is called as part of my initialization code when my program first starts. Any idea what could be causing this? I've read not to do read-modify-write instructions on TRISC but I don't think I'm doing this, I'm just writing to PORTC. The complete code can be found at http://www.geneseo.edu/~lkp3/cirtest.asm It's basically some IDE interface code I am brewing up for the PIC that uses an Intel 8255a to reduce the number of pin's the PIC needs for the task. I saw the same concept used with another microcontroller and I'm trying to adapt it to the pic. The code IDE interface code will be made available freely once it's complete, as I couln't find anything equivalent and free while googling around. Lindsay -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.