-->

Configuration Bits setting in MPLABX

By
Set Configuration Bits -PIC16f877.


How Configuration Bits are set

Each PIC MCU has it's own set of configuration bits. The Special Features section of the individual datasheets contains the definition for each of the bits.
The setting for each configuration bit is determined by directives written in the application software. The syntax for the configuration bit settings is available from the compiler manual. This tutorial will show how to generate proper configuration code without consulting the compiler manual for the proper syntax.

How to display the Configuration Bits window

                                                 From the main menu select Window ▶ PIC Memory Views ▶ Configuration Bits

ConfigBitsMenu.pngConfigBitsWindow.png

The Configuration Bits window will open in a tab in the Output area under the editor.

How to set configuration bits and generate initialization code



ConfigBits.png
In the configuration bits window, click on any value in the Option column and it will turn into a combo box that will allow you to select the value you desire.

The example on the left shows the WatchDog timer being changed from "enabled" to "disabled"

GenerateConfigBits.png




Click on the Generate Source Code to Outputbutton:

ConfigBitsSaveAs.png

The IDE will automatically generate the code necessary to initialize all the configuration bits to the settings you specified in the window. This code may now be copied and pasted into one of your source files, or you may save it to its own file and add it to your project. To save the file, right click anywhere in the output window and select Save Asfrom the popup menu as shown in the screenshot at left.

More Posts

gElectron. Powered by Blogger.

Contributors

16x2 LCD Interfacing with STM32,STM32F103C6

 16x2 LCD  Interfacing with STM32,STM32F103C6 lcd_init(); LCD_LINE1; lcd_String(" GeElectron"); LCD_LINE2; lc...

Contact Form

Name

Email *

Message *

Contact us

Name

Email *

Message *

Follow Us

https://www.facebook.com/gElectron-393939667321867/ FBbox/https://www.facebook.com/IVYthemes

Comments

[blogger]

MKRdezign

Test
google.com, pub-8429441124104529, DIRECT, f08c47fec0942fa0
[blogger]

Latest

[recent][newsticker]

Technology

Top Ads

RECENT COMMENTS

Subscribe Via Email

Subscribe to our newsletter to get the latest updates to your inbox. ;-)


Your email address is safe with us!

RECENT COMMENTS