Circuit will not work with 20MHZ xcal
Posted: Wed Apr 11, 2012 10:29 am
Hi guys
Im a bit stuck at the moment
I am trying to get a motor running with PWM and things were going well but I wanted a higher PWM frequency for better control and eliminate audible hum.
So I changed out my 4MHZ crystal and put in a 20MHZ made all the necessarily changes but nothing works properly now. Im using a 16F877A
Went back to basics and made a simple program(led flashing, lcd screen flashing message) with the correct configs and it ran ok on my EB006.
But in my circuit it just doesnt run, very erratic , the screen displays once and then nothing, the led flashes erratically and then stops after 30seconds.
After numerous different attempts I put back in my 4MHZ; in HS mode it doesn't work but when i change to XT it works perfectly.
My settings: project options=20KMZ, Configure options= Xcal HS , circuit 22pF with the crystal, have power and gnd where it should be, 10K between power and MCLR. have caps between power and ground.
One thing when i change to XT in the menu, exit and re-enter the selection has automatically gone from XCAL to RC, is that normal? so the 4MHz circuit that worked would be RC XT.
could there be a setting in the compiler options i need to change?
Hope thats understandable.
Puddy
Im a bit stuck at the moment
I am trying to get a motor running with PWM and things were going well but I wanted a higher PWM frequency for better control and eliminate audible hum.
So I changed out my 4MHZ crystal and put in a 20MHZ made all the necessarily changes but nothing works properly now. Im using a 16F877A
Went back to basics and made a simple program(led flashing, lcd screen flashing message) with the correct configs and it ran ok on my EB006.
But in my circuit it just doesnt run, very erratic , the screen displays once and then nothing, the led flashes erratically and then stops after 30seconds.
After numerous different attempts I put back in my 4MHZ; in HS mode it doesn't work but when i change to XT it works perfectly.
My settings: project options=20KMZ, Configure options= Xcal HS , circuit 22pF with the crystal, have power and gnd where it should be, 10K between power and MCLR. have caps between power and ground.
One thing when i change to XT in the menu, exit and re-enter the selection has automatically gone from XCAL to RC, is that normal? so the 4MHz circuit that worked would be RC XT.
could there be a setting in the compiler options i need to change?
Hope thats understandable.
Puddy