Jun 13, 2011 #1 S shreyas_patel21 Full Member level 3 Joined Jan 4, 2011 Messages 181 Helped 15 Reputation 30 Reaction score 14 Trophy points 1,298 Activity points 2,325 I am using pic18f46k22 my configurationbits settings are Code: #pragma config FOSC = INTIO67, FCMEN = OFF,IESO = OFF,PLLCFG = OFF #pragma config PWRTEN = ON, WDTEN = OFF,BOREN = OFF #pragma config MCLRE = INTMCLR, HFOFST = ON #pragma config LVP = OFF #pragma config CP0=OFF, CP1=OFF,CP2=OFF, CP3=OFF, CPB=OFF, CPD=OFF #pragma config WRTC=OFF, WRTB=OFF,WRTD=OFF #pragma config EBTR0=OFF , EBTR1=OFF , EBTR2=OFF , EBTR3=OFF , EBTRB=OFF OSCCONbits.IRCF0 =1; //HFINTOSC 16MHz with PLLEN OSCCONbits.IRCF1 = 1; OSCCONbits.IRCF2 = 1; OSCTUNEbits.PLLEN = 1; what is the Fosc(clock frequency) for this settings? I think its 16Mhz settings but when I made calculation for timer the timer was working as 64Mhz clock Last edited: Jun 17, 2011
I am using pic18f46k22 my configurationbits settings are Code: #pragma config FOSC = INTIO67, FCMEN = OFF,IESO = OFF,PLLCFG = OFF #pragma config PWRTEN = ON, WDTEN = OFF,BOREN = OFF #pragma config MCLRE = INTMCLR, HFOFST = ON #pragma config LVP = OFF #pragma config CP0=OFF, CP1=OFF,CP2=OFF, CP3=OFF, CPB=OFF, CPD=OFF #pragma config WRTC=OFF, WRTB=OFF,WRTD=OFF #pragma config EBTR0=OFF , EBTR1=OFF , EBTR2=OFF , EBTR3=OFF , EBTRB=OFF OSCCONbits.IRCF0 =1; //HFINTOSC 16MHz with PLLEN OSCCONbits.IRCF1 = 1; OSCCONbits.IRCF2 = 1; OSCTUNEbits.PLLEN = 1; what is the Fosc(clock frequency) for this settings? I think its 16Mhz settings but when I made calculation for timer the timer was working as 64Mhz clock
Jul 2, 2011 #2 S shreyas_patel21 Full Member level 3 Joined Jan 4, 2011 Messages 181 Helped 15 Reputation 30 Reaction score 14 Trophy points 1,298 Activity points 2,325 I measured the clock it shows 16Mhz clock on its pin; but the timer configuration is working like if the clock is of 64Mhz. still any suggestion or explaination regarding why this happened would be helpful to me.
I measured the clock it shows 16Mhz clock on its pin; but the timer configuration is working like if the clock is of 64Mhz. still any suggestion or explaination regarding why this happened would be helpful to me.