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.

need help for configuration bits

Status
Not open for further replies.

internetuser2k13

Member level 3
Joined
Aug 10, 2013
Messages
56
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Location
pakistan
Activity points
408
what are the role of configuration bits.
i download for pic18f458. it contain the 2 pages for configuration bits.
is it good to write all config bit?

i see on some one blog.
he config bit in such a manners as it given below,

Code:
__CONFIG(1, OSCSDIS & XT);
__CONFIG(2, BOREN & BORV42 & PWRTEN & WDTDIS);
__CONFIG(3, CCP2RC1);
__CONFIG(4, DEBUGDIS & LVPDIS & STVRDIS);
__CONFIG(5, UNPROTECT);		// Chnage to CPA
__CONFIG(6, WPB);
__CONFIG(7, TRU);

can anyone explain these.??

__CONFIG(NUMBER, --- &----);

IN SIMPLE WORDS.
 

In simple words: Read the "configuration bits" chapter in device datasheet.
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
what are the role of configuration bits.
i download for pic18f458. it contain the 2 pages for configuration bits.
is it good to write all config bit?

i see on some one blog.
he config bit in such a manners as it given below,

Code:
__CONFIG(1, OSCSDIS & XT);
__CONFIG(2, BOREN & BORV42 & PWRTEN & WDTDIS);
__CONFIG(3, CCP2RC1);
__CONFIG(4, DEBUGDIS & LVPDIS & STVRDIS);
__CONFIG(5, UNPROTECT);		// Chnage to CPA
__CONFIG(6, WPB);
__CONFIG(7, TRU);

can anyone explain these.??

__CONFIG(NUMBER, --- &----);

IN SIMPLE WORDS.


Hi,

You should also find these files will help -
look up the pic18F458 .inc and pic18F458.temp files found in the Mplab ASM directories.

https://www.edutek.ltd.uk/Binaries/Datasheets/Micro/PICDeviceConfig.pdf
 

what are the role of configuration bits.

The configuration register(s)/bits configure various features of the PIC, many of which cannot be configured during runtime.

is it good to write all config bit?

I generally good practice to configure all features of the device to a known state, otherwise features not specifically configured are in a default state and it is your responsibility to know this default state.

i see on some one blog.
he config bit in such a manners as it given below,

Code:
__CONFIG(1, OSCSDIS & XT);
__CONFIG(2, BOREN & BORV42 & PWRTEN & WDTDIS);
__CONFIG(3, CCP2RC1);
__CONFIG(4, DEBUGDIS & LVPDIS & STVRDIS);
__CONFIG(5, UNPROTECT);		// Chnage to CPA
__CONFIG(6, WPB);
__CONFIG(7, TRU);

can anyone explain these.??


__CONFIG(NUMBER, --- &----);

In the case of the PIC18F series there are multiple Configuration Registers, the NUMBER refers to the particular Configuration Register:

Code:
__CONFIG([B]4[/B], DEBUGDIS & LVPDIS & STVRDIS);

Each specific bit within a particular Configuration Register is referred to by an identifier which are bitwise AND'd (&) to form the require bitmask to set the bits within that specific Configuration Register.

Code:
__CONFIG(4, [B]DEBUGDIS[/B] & [B]LVPDIS[/B] & [B]STVRDIS[/B]);

These identifiers are typically available for review in the device specific header file, pic18f458.h, I usually include the device specific header file in the project window so that it maybe referenced while coding a particular device.

Each specific device typically offers a unique set of Configuration Register Bits, therefore as suggested by FvM, you need to read and study the device's datasheet for specific details pertaining to that device.


BigDog
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top