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.

[HELP] PIC18 Configuration

Status
Not open for further replies.

scdvom

Member level 1
Joined
Feb 8, 2010
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,524
Hi, why do we need to set the configuration as follow most of the time? whats the story behind? can anyone tell me here? thanks

Code:
#pragma config LVP = OFF
#pragma config WDT = OFF
 

Ref. datasheet of ur controller.
Thats the right way.

Good luck.
 

Hi,

When you code, you usually have <include p18Fxxxx .h >

If you open that file you will see towards the end all the config options.

It is this that sets the defaults - you then change any of them in your code to suit your needs.

Many folk put all the parameters into the code as an extra check that they are set as they want.

Another way to see what you configure options are is in MPlab, Configure, Config Bits.
Notice there is a check box for telling it you are using the config paramenters in your code.

In those two examples your do not want low voltage programming and you do not want the watchdog timer in use.
The one you should be using is the Oscillator selection config bit, unless its the default value you need.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top