Jump to content
mityeltu

Setting Configuration Bits

Recommended Posts

Is there an easy way to set the configuration bits in the Sourceboost IDE? It might seem lazy, and maybe I've been spoiled by using MPLAB and Oshonsoft compilers as they have a nice module for setting the bits and generating the necessary code to include in the firmware. Is there anything like that in the Sourceboost IDE? I've looked but couldn't find anything. If not, is there an easy way to go about it?

 

I've been using the meLABS meCongfi software to get the code close, but it still needs some tweeking after pasting and I'd like to just set it and forget. I know that once I have them set I can just copy/paste into new programs, but it really seems like there should be an easy way to get them set the first time.

 

For anyone who is interested, I'm also working on a VB project to do this for a number of the chips that I use frequently. If anyone wants a copy, I'll post it here. And if there is a chip you want included, let me know and I'll try to code it in.

Edited by mityeltu

Share this post


Link to post
Share on other sites

Actually is not so hard set config fuse bits, unless you are using on of the rare devices that comes with missing defines.

In that case you need to write all defines in the include file

Anyway, it depends of device you are using

 

Here is an example for pic18f4620

    #pragma config CP0      = OFF   // Code Protection bits (Program memory code protection off)
    #pragma config OSC      = INTIO67 //XT    // Oscillator Selection bits (RC oscillator w/OSC2 configured as RA6)
    #pragma config IESO     = OFF   // Oscillator System Clock Switch Enable bit (Oscillator system clock switch option is disabled (main oscillator is source))
    #pragma config PWRT     = OFF   // Power-up Timer Enable bit (PWRT disabled)
    #pragma config BOREN    = ON    // Brown-out Reset Enable bit (Brown-out Reset enabled)
    #pragma config BORV     = 0     // Brown-out Reset Voltage bits (VBOR set to 2.5V)
    #pragma config WDT      = ON    // Watchdog Timer Enable bit (WDT enabled)
    #pragma config WDTPS    = 128   // Watchdog Timer Postscale Select bits (1:128)
    #pragma config STVREN   = ON    // Stack Full/Underflow Reset Enable bit (Stack Full/Underflow will cause RESET)

if i remember, when we start a new project using the sourceboost wizard, "he" do it for us, but this feature not cover all devices.... again... since i remember

 

br

Edited by joli

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×