I tried debugging RCREG directly as a last resort. Previously, I had been moving the value out to another register first; thus, one read per character. However, the results are the same either way. Jen > -----Original Message----- > From: Peter Onion [mailto:ponion@srd.bt.co.uk] > Sent: Thursday, January 24, 2002 11:43 AM > To: pic microcontroller discussion list; pic microcontroller > discussion > list; Jennifer Loiacono > Subject: RE: [PIC]: PIC18 USART RX Data Corruption > > > > On 23-Jan-02 Jennifer Loiacono wrote: > > Jennifer Loiacono > > President > > Automaton Engineering, Inc. > > P.O. Box 10282 > > Brooksville, FL 34603When receiving serial data on the > PIC18C442, the value > > is not reflected correctly in the RCREG reception register. > However, the > > signal on the receiving PIC is perfect in terms of timing > and accuracy. > > Despite accurate signal levels, debugging RCREG immediately > after data is > > received reveals that the byte seems to flip back and forth. > > > > e.g., a byte equal to 4 (dec) will oscillate between 4 and > 32. A byte equal > > to 1 will oscillate between 1 and 128, etc. > > I'm not quite clear on what you mean by " oscillate between 1 > and 128". > > If I've missunderstood then please ignore me, but it sounds > to me that you > reading the RCREG multiple times for each recieved character ? > > I'm pretty sure that isn't allowed by the PIC. You should read RCREG > ONCE and ONLY ONCE for each recieved character. > > RCREG should be read ONCE each time the RCIF bit in PIR1 is > set. Reading RCREG > will reset this bit automagically ready for the next character. > > Peter Onion. > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.