Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pic18f46k22 oscillator settings in configuration bits

Status
Not open for further replies.

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:

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.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top