Hi Rikard! Sorry... it's Monday... It is my code. I test for an overrun error and eventually restart the = receiver. Another point: you are using the baud rate generator with BRHG =3D 0 and = SPBRG =3D 2 but this will have a big error... Try using BRHG =3D 1 and SPBRG =3D 12... lrx_10 ;ricezione seriale BANKSEL 0 ; btfss fRXMode ; goto lrx_99 ; BANKSEL RCSTA ;0 btfsc RCSTA,OERR goto err_overrun btfsc PIR1,RCIF ;carattere nel buffer? goto lrx_99 lrx_15 ;c'=E8 un carattere! ; BANKSEL RCREG ;0 movf RCREG,w ;riceve movwf StoreIt goto lrx_99 err_overrun ;restart receiver bcf RCSTA,CREN bsf RCSTA,CREN clrf RXCount goto lrx_99 lrx_99 Rikard Bosnjakovic wrote: > On 07/04/2008, Nicola Perotto wrote: > > [...] > = >> This is a part of the problem: RCIF it works like other interrupt flags. >> YOU must clear it after use. >> = > > No, you musn't. In fact, you *can't* clear it: > > "If the transfer is complete, flag > bit RCIF (PIR1<5>) is set. The actual interrupt can be > enabled/disabled by setting/clearing enable bit RCIE > (PIE1<5>). Flag bit RCIF is a read-only bit, which is > cleared by the hardware. It is cleared when the RCREG > register has been read and is empty." > > > = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist