Thanks for all that. I decided just prior to breadboard I would try something else.
I had timed a 30 second pause (LED on then off) to make sure the osc wasn't completely out. It was as near as 30 seconds as I could detect. I was also using the EUSART at 9600 successfully for debugging.
I should have done the crystal / cap serial test first but didn't get Steve's post in time. I had a 16mhz resonator lying there so I put that in instead as it shouldn't need caps right? First I changed the prescaler to /4 to still get 48mhz for USB. Then I timed a 60 second pause and sure enough, all good. So I tried Steves suggestion of serial test. It gives garbage on all bauds and yes, I am using PicMultiCalc (wonderful tool Steve!) so I know the settings are correct.
I do at least get Device Not Recognised. I wasn't even getting that sometimes with 20mhz setup. Arhhhh. It sucks of a dodgy connection to me but the holder is new and I checked / resoldered them all. The board has too many wires under it so it could still be a stuff up somewhere.
Only one question out of this I suppose. Are resonators less accurate than crystal/ cap combos. Does 60 second pause test validate clock accuracy to any degree at all? OK, that's 2 questions!
Off to the breadboard. I will see if I can do it tonight (1.30AM already) as I am desperate to know!
Oh and one final point. When the code works it works great. I also tried the MOUSETEST.BAS and that works when it works but doesn't when it doesn't. Says it's not a code issue to me for what my opinion is worth!
Cheers guys
Rich
Bookmarks