On 2010-11-28 23:59, David Duffy (AVD) wrote: > Olin Lathrop wrote: >> David Duffy (AVD) wrote: >> >>> I am using INDF0 for reading the receive buffer. It is the same code >>> I've used countless times before. >>> >> >> Are you doing this in the interrupt routine and forgot to save/restore t= he >> FSR? > > I am using INDF0 in the serial receive ISR, as well as in tasks > triggered by flags in the main loop. > > I'm not saving / restoring them in the ISR, as I understand this > particular chip does that by itself. > David... > They are. But of course you have to re-init them at each entry to the ISR, they are not preserved between two interrupts. You didn't say you don't, but just to clearify. B.t.w, this is what the PIC16F193X/LF193X datasheet says : Upon entering an interrupt, the return PC address is saved on the stack. Additionally, the following registers are automatically saved in the shadow registers: =95 W register =95 STATUS register (except for TO and PD) =95 BSR register =95 FSR registers =95 PCLATH register Upon exit from the Interrupt Service Routine, these registers are automatically restored. Any modifications to these registers during the ISR will be lost. Depending on the user=92s application, other registers may also need to be saved. What I do not understand is why you don't read the receive buffer (RCREG) directly. Why go through the index registers ? The reading will always be from the same fixed address (RCREG) so I do not see the need for any "indexing" here !? --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .