Okay guys, I have a "fix" to this. I'll explain what I went about doing... FAE visited me and spent several hours with me trying to fix this. Not=20 sure what happened when I scoped it earlier (images I sent), but now we=20 got a decently clean sine wave (when sleeping) and a bit of=20 noise/shakiness when the display was on. PS lines showed some noise=20 too. This time the equipment was moved to a desk with no other=20 electronics, so I must've had something else being picked up=20 previously. Noise-tested a similar circuit using a 16F1936 and the=20 noise was a *bit* lower when awake. Definitely learned a lot about=20 crystals and loading capacitances from him. Anyway, we tried (a) earthing the crystal case; (b) using a cylindrical=20 32.768khz crystal instead of this SMD type (both of which I have used=20 quite a bit before); (c) jumpering ground traces to stiffen the power=20 lines, (d) changing/adding bypass caps and electrolytics on the power=20 rails; (e) using a TO-220 7805 (as this is the first time I've used=20 these TO-89 78L05CPK's); (f) using a TO-92 78L05, (g) adding series=20 resistors of 140k and 280k; and none of these worked. I did also try not updating TMR1H in the ISR to get 0.5-sec pulses (for=20 the flashing colon) and instead just read TMR1H in the main code loop=20 regularly to determine if the flashing colon should be on or off any=20 time. Still no dice. What worked is when I removed the TMR1H read in the mainloop. =20 Apparently access this is causing some issue, and I've gone back to the=20 datasheet and errata and still have not found anything that says this=20 could be a problem. Yes I do have TMR1 set to 8-bit read/writes. I'm=20 going to have to live with a static colon for now, but 1.5 days later=20 it's still clocking accurately. I'll emailed the FAE so let's see what=20 he finds out about it and I'll report back. Thanks for all the help. Cheers, -Neil. On 6/8/2012 6:21 PM, IVP wrote: >> Cases not earthed -- was not aware that that could/should be >> done > It has fixed occassional mysteries. Personally cured problems > caused by, such as, the position of wiring to an LED display, > and the proximity of a relay > >> should have a sine wave, rather than square. See attached > eeeuuuuwwww. That's overdriven. Did you say this was the first > time you'd used these particular crystals with the 18F ? > > Suggests 100k - 200k series resistor > > http://www.microchip.com/forums/m313266.aspx > > Atmel, but would be relevant to PICs, see Section 4.2 > > http://www.atmel.com/Images/doc8333.pdf > >> In sleep mode, I get the same partial-sine waveform. If this really >> is the issue now, then why is the wake-mode waveform changing? > Possibly the 32kHz crystal is broadcasting noise into the die or the > primary clock source > > Joe --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .