Hi All, I had a test program running which received and echoed back character from a PC serial port connected to the USART of a PIC 16F877. The code worked, and in fact is the sample at piclist.com by Claudio Rachiele. It can be found at http://www.piclist.com/techref/microchip/16F877/rs232-cr.htm The problem is that the code broke when I add a simple subroutine. The subroutine writes to PORTC and I suspect this might cause the problem. Basically, if I call the subroutine before the serial receive and transmit subroutines, the transmit subroutine goes into an infinite loop while checking the TXIF bit. The exact location the subroutine is called from in the code linked above is just before the "baud rate settings" comment. Below is the subroutine, I8255WriteConfigRegister, are there any obvious errors? Thanks in advance. Lindsay 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 ; load the config byte onto the data lines call I8255WriteStrobe ; write the config byte return I8255WriteStrobe ; change pic PORTD pins into output banksel TRISA movlw b'00000000' movwf TRISD banksel PORTA bcf PORTC, I8255CONTROL_WRITE call Delay200ns bsf PORTC, I8255CONTROL_WRITE call Delay200ns ; to meet minimum delay req. between WR and RD return -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.