Hi, I'm not too experienced, but I've had the same problem myself and after testing, I think the solution I have is good. You can define a macro like that #define clear_usart_errors_inline \ if (OERR) \ { \ TXEN=0; \ TXEN=1; \ CREN=0; \ CREN=1; \ rstate = 0; \ } \ if (FERR) \ { \ i=RCREG; \ TXEN=0; \ TXEN=1; \ rstate = 0; \ } and put it before or after (I'm not so sure now where) the reading of the RCREG or loading of TXREG. Hope this helps. Lucian -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of piclist@XARGS.COM Sent: 14 martie 2004 07:37 To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC:] Emptying TXREG on 16F62x USART On Sun, 14 Mar 2004, Spehro Pefhany wrote: > Perhaps a silly/obvious question, but have you tried a bsf on TXIF ? It > appears to perform the function of a flag holding the empty/full state of > TXREG. > It says it can't be *cleared* in software ("filling" TXREG), but nothing about > setting it ("emptying" TXREG). TXIF is read-only. -- John W. Temples, III -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.