hello.. I am doing a serial communication and doing a loopback test through a PIC most of the times the last two or four bytes of a message is not being sent back to the sending computer from the PIC... the computer pulls down a pin to 0volts to tell the PIC that a transmission is over and up to tell the PIC that its about to initiate a transmission.. The PIC signal a clear to send message by raising another pin to 5 volts... when the PIC has sent a reply it pulls down this other pin to low and disables Transmit Interrupt... the problem I think is the timing when raising and lowering the said pins. when the pins are lowered while some data is still in the PIC's hardware buffer.. Some of the last 4 bytes are being lost.. maybe 2 when received and 2 when transmitting.. I got an idea of checking TXSTA register's TRMT bit to check whether the shift register is empty or not before sending a "message sent" signal to the computer and disabling interrupt so as not to loose the last data sitting on the transmit buffer.. on the other hand.. Is there a way to check the PIC's Receiving Shift register if it has data or currently shifting data.. I would like to avoid waiting or delay code if it can be avoided... thanks.. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist