Megahertz
- 25th December 2009, 23:19
Merry Christmas to everyone
I am having a small problem which I would like to ask.
I am using 12C671 & my fuse settings are the following ones:
DEFINE NO_CLRWDT
DEFINE OSC 4
@ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF
I just want to run the PIC at 4MHz. I do not understand how to implement bits of the OSCCAL register. Mainly bits 4 to 7.
I read the PBP manual and it advises to put one of the two defines in the program: Define OSCCAL_1K 1 & Define OSCCAL_2K 1
I am confused as to if I put Define OSCCAL_1K 1 on top of the code, do I need any other supporting statement in the fuse setting section like may be setting bits 4-7 of OSCCAL register? OR Will my PIC will run at 4MHz just by adding this define statement only?
Can someone guide me please?
Thanks
I am having a small problem which I would like to ask.
I am using 12C671 & my fuse settings are the following ones:
DEFINE NO_CLRWDT
DEFINE OSC 4
@ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF
I just want to run the PIC at 4MHz. I do not understand how to implement bits of the OSCCAL register. Mainly bits 4 to 7.
I read the PBP manual and it advises to put one of the two defines in the program: Define OSCCAL_1K 1 & Define OSCCAL_2K 1
I am confused as to if I put Define OSCCAL_1K 1 on top of the code, do I need any other supporting statement in the fuse setting section like may be setting bits 4-7 of OSCCAL register? OR Will my PIC will run at 4MHz just by adding this define statement only?
Can someone guide me please?
Thanks