Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

[SOLVED] Why can't I configure pic18f46k22's oscillator?

Status
Not open for further replies.

ahsoopk

Member level 5
Joined
Mar 12, 2010
Messages
81
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,103
I am newbie to micro-controller and trying to understand that why I can define Oscillator of pic18f4520 by using
#pragma OSC =HS
but can do the same for pic18f46k22, instead I have to use the following
#pragma FOSC = HSMP

what is the difference between two?

Regards,
 

hello,

they are many sub-familly in the PIC18 familly, so
every time use on MPLAB IDE
help
topics
PIC18 Config setting


Example for PIC18F46K22
Code:
// voir Help
//  Topics
//        Pic18
//            config bits settings
//                    choisir PIC18F46K22
#ifdef OSCILLATEUR_INTERNE
#pragma config FOSC = INTIO67, FCMEN = OFF, PLLCFG=OFF            // CONFIG1H
#else
#pragma config FOSC = HSHP, PLLCFG=OFF, PRICLKEN=ON ,FCMEN=OFF
#endif
#pragma config IESO=OFF,PWRTEN=OFF,BOREN=OFF,WDTEN=OFF,CCP2MX=PORTC1
#pragma config PBADEN=OFF,CCP3MX=PORTE0,T3CMX=PORTC0,P2BMX=PORTC0
#pragma config MCLRE=EXTMCLR,STVREN=OFF,LVP=ON,XINST=OFF,DEBUG=OFF
#pragma config CP0 = OFF, CP1 = OFF, CP2 = OFF, CP3 = OFF                    // CONFIG5L
#pragma config CPB = OFF, CPD = OFF                                          // CONFIG5H
#pragma config WRT0 = OFF, WRT1 = OFF, WRT2 = OFF, WRT3 = OFF                // CONFIG6L
#pragma config WRTB = OFF, WRTC = OFF, WRTD = OFF                            // CONFIG6H
#pragma config EBTR0 = OFF, EBTR1 = OFF, EBTR2 = OFF, EBTR3 = OFF            // CONFIG7L
#pragma config EBTRB = OFF                                                   // CONFIG7H
 

Attachments

  • 18F46K22_config.jpg
    18F46K22_config.jpg
    162.6 KB · Views: 53
  • 18F4520_config.jpg
    18F4520_config.jpg
    147.6 KB · Views: 46

thanks my dear friend Paul.. always helpful.. *** bless..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top