I still don't have the 20Mhz XTAL resonating, these are my settings now.
I have this commented out in the include file:
Code:
;__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
;__CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H
In my program I removed the OSCCON settings.
I'm setting the HS in my program:
Code:
asm
__CONFIG _CONFIG1H ,_FOSC_HS_1H
__CONFIG _CONFIG2L ,_BOR_ON_2L & _BORV_2_2L
endasm
I can jumper the 4Mhz XTAL into the circuit and it will resonate, I move the jumpers to the 20Mhz XTAL, I don't get anything.
I verify with a 200Mhz Fluke scope, and I also have an LCD that gives me a read out. The LCD works with the 4Mhz XTAL jumpered in and I have a nice clean wave form on the scope. The LCD cycles slow and I get garbage sometimes. My guess is that's because I still have the OSC DEFINE 20.
I though maybe something was up with the 20Mhz XTAL, so I tried another one with some short leads soldered on so it makes a good connection in the breadboard. Second 20Mhz XTAL does't resonate.
I tried 15, 17 and 20pf caps for the XTAL, no difference.
So I'm stumped, I do have a question on Mackrackit's Post, saying it can run at:
"1, 1.33, 2, 4, 16,32, or 48 MHz with a 4 MHz external"
It looks like all the settings divide the external XTAL speed, I don't see how I would get 16 or 32Mhz? If I can get 16 or 32Mhz with my 4Mhz XTAL I may have enough speed. At least it's worth a try.
Thanks, Let me know where I'm going wrong.
Shane
Bookmarks