I have a project I'm working that features the 16c73 (scaled down 16c74), specifically using its built-in uart. The project is essentially a portable data logging device. Data is stored in a serial eeprom. To extract the data, you plug your PC into the device, and a proprietary exchange protocol sucks the data out of the monitor and on to the PC's disk. So far so good. The problem is this: The act of "plugging" the pc's serial cable into the data logger will sometimes generate some noise. The uart apparently gets confused, and all serial communication is crippled before it even really starts. To get around this, I tried to insert some code which will look for noise or data errors (coming from noise) immediately after the logger senses that the pc's cable has been plugged in. (It is written in the Parallax dialect and looks something like this: ;*** Look for Comm Errors ********************* :rx clrb RP0 ;bank 0 registers jb OERR,:er1 ;if rx overrun or jb FERR,:er2 ;if framing error jump jmp :sd1 ;proceed if no error ;*** process UART errors ************** :er1 clrb RP0 mov Tmp2,#050h ;set freq for gleep lcall gleep ;generates a brief tone jmp :comerr :er2 clrb RP0 mov Tmp2,#000h ;set freq for gleep lcall gleep ;generates a brief tone jmp :comerr :comerr clrb RP0 ;bank 0 registers clrb CREN ;*reset receive logic setb CREN ;*reset receive logic setb SPEN ;*force enable of serial port mov w,RCREG ;pull byte out of receiver jmp :rx :sd1 clrb RP0 ;continue with rest of the code: Some explanation is in order. This code contains lcalls to a subroutine called "gleep" which generates a musical note through a piezo speaker. I was using this for diagnostic purposes in order to determine what type of com errors are really being detected. The problem is, this code doesnt work as expected. If the com error is an overrun, the code cycles and seems to recover ok. If the error is a framing error, however, it ends up going into and endless loop, as though FERR can't be reset or something. The final piece to the puzzle: If I send a few characters to the logger while its locked in this loop, it does break out and continue. What this means, however, is that the first data packet sent to the logger following "plug-in" will likely be corrupted. Ultimately, my question is this: If I plug in and generate noise in the process, how can I *really* clear the uart and its flags before I start any dialog? Any tips or suggestions would be greatly appreciated. P.S. BRGH=0