Gordon Williams | 20 May 20:04
Favicon

Re: [PIC] CCP1 Glitches in noisy environment (RC Tx)

I eventually found the problem after a lot of long days.

When assigning to the compare register CCPR1 (2 bytes) the low byte was
written first followed by the high byte.  After the low byte was written
there was a match with Timer1 that caused another interrupt when one should
not have happened.

The solution is to write the high byte first followed by the low byte.

Regards,

Gordon Williams

----- Original Message ----- 
From: "Gordon Williams" <g_will <at> cyberus.ca>
To: "Microcontroller discussion list - Public." <piclist <at> mit.edu>
Sent: Thursday, May 15, 2008 9:18 PM
Subject: Re: [PIC] CCP1 Glitches in noisy environment (RC Tx)

: I got rid of the RF noise by removing the crystal and to my surprise I'm
: still getting glitches.  There is now a non-measurable amount of noise as
: far as I can detect.
:
: The glitch happens when the ISR returns to the main program.  The number
of
: instruction cycles matches the time delay to the glitch exactly.  I even
put
: in a time delay in the ISR to confirm that.  This point is a long way away
: from any pin being turned on or off.
:
: Anyone heard of anything like this on a 16f886 or similar device?
:
: Regards,
:
: Gordon Williams
:
: -- 
: http://www.piclist.com PIC/SX FAQ & list archive
: View/change your membership options at
: http://mailman.mit.edu/mailman/listinfo/piclist
:

--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist


Gmane