I am not sure whether the #chip, speed actually changes the the chip clock rate or is it just to calculate delays?
Do you then have to set OSCCON to set the desired speed?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It calculates the delays, and in the case of the intosc, it will also calculate the clock rate. If in doubt, check the .asm file for the OSCCON value.
In the case of devices with high speed intosc like the 18fxxkxx series, AND enabling PLLEN, requires manual OSSCON setting. Say for instance if 4 x 16Mhz is required, then the #chip setting would be 64, but the OSCCON needs to be manually set for 16Mhz.
Kent
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am not sure whether the #chip, speed actually changes the the chip clock rate or is it just to calculate delays?
Do you then have to set OSCCON to set the desired speed?
It calculates the delays, and in the case of the intosc, it will also calculate the clock rate. If in doubt, check the .asm file for the OSCCON value.
In the case of devices with high speed intosc like the 18fxxkxx series, AND enabling PLLEN, requires manual OSSCON setting. Say for instance if 4 x 16Mhz is required, then the #chip setting would be 64, but the OSCCON needs to be manually set for 16Mhz.
Kent