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.

PIC Configuration Bits

Status
Not open for further replies.

duryan

Newbie level 4
Joined
Dec 1, 2011
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,342
Guys I would like to ask help from you. Im using the template of PIC16F84A, PIC16F877A and PIC18F4550 but still I dont know what are those configuration bits. Can anybody please explain the function of each bits?

Thank you and have a nice day!
 

The configuration bits specify some of the operating modes of the microcontroller and are written to a register in the PICMicro® as part of the device programming process. The PC software which controls your device programmer may display a dialog box as part of the programming procedure which lets you make mode selections by clicking on buttons. The PC software then assembles the configuration bit pattern and programs it into the device for you. The PICSTART Plus works this way.



From the PIC16F84 data sheet, the part has a 14-bit configuration word.

--------------------------------------------------
PIC16F84 Configuration Bits
--------------------------------------------------
13 ___________ 4 3 2 1 0
--------------------------------------------------
Code protect | | |__|____ Osc type 11 = RC
0 = on | | 10 = HS
1 = off | |__ WDT 01 = XT
| 0 = disabled 00 = LP
| 1 = enabled
|
|__ Power-up timer
0 = enabled
1 = disabled
 

The configuration bits sets some hardware configuration for the microcontroller.For example in PIC16F84A you can set the oscillator configuration i.e.. which kind of oscillator source you are going to use for your mcu,Watch dog,Power up timer and Code Protect can be turned on and off using configuration bits.

You can also set them in your source code,normally macros will be provided with you assembler or compiler.

The datasheet for your mcu will cover all the configuration bits settings.So check it out

Good Luck
 

I see..hmm... is it possible to read the configuration bits? let's say in the middle of my code I will read the config and output it to PORTB. Aside from the datasheet is there other sites have explains the function of each config? code protection for example? this is used for?
 

It seems you didnt understood the concept.Configuration bits are something like your program code,like you write your program code to the flash/program memory's user memory space of your mcu,you write your configuration bits to that same flash memory in a special configuration memory space.At programming time you can read/write the user memory space and the configuration memory space.

In some mcu like PIC16F84A while normal operation i.e.. executing code it can only access the user memory space not the configuration memory space.

But in some mcu like PIC24HJ32GP202 ,you can access both user memory space and configuration memory space while executing code i.e.. normal operation.


Here is a presentation form Microchip about Device Configuration.
https://ww1.microchip.com/downloads/en/DeviceDoc/config.pdf

Good Luck
 

that is what im looking for you. thank very much. btw can you recommend a book for PIC18F4550 and PIC16F877A aside from the data sheets? its good to be a member of this board.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top