>H. P. Friedrichs wrote: >... >> specifically using its built-in uart......... >> 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...... > >Me too. >The Rx buffer is a two deep stack. >I have used multiple reads to flush the Rx buffer on framing errors, >and will shortly try flushing the Rx buffer on overrun errors. > >The manual says regarding RCSTA,FERR "Can be updated by reading RCREG >register and receive next valid byte". I talked with the factory >about this and they said that once you have a framing error the USART >gets out of sync. To get back into sync you need at least one byte's >worth >of stop bit. Only then will the next start bit be recognized > >In my case I have 9600 baud data in bursts once/second. Only about 80 >bytes/second and a lot of dead time. My USART locks up and never >recovers >from the framing error. I am using an LCD to display FERR and OERR. > >If you find out anything please let me know. > >Brooke Clarke >email brooke@pacific.net Try toggling CREN after each receive character. movf RCREG,W bcf RCSTA,4 bsf RCSTA,4 Ray Gardiner, Shepparton, Victoria, Australia ray@dsp-systems.com Technical Director DSP Systems http://www.dsp-systems.com Private e-mail to:- ray@netspace.net.au