void putch(unsigned char data) { while( ! PIR1bits.TXIF) // wait until the transmitter is ready continue; TXREG = data; // send one character }