View previous topic :: View next topic |
Author |
Message |
Ömer Faruk
Joined: 15 Nov 2018 Posts: 42 Location: Çanakkale
|
Generation of configuration bits in ccs c |
Posted: Sat Jan 05, 2019 3:13 am |
|
|
Hello all
Is there an option in ccs c ide that i can generate configuration bits as in MPLAB X ide ? (I searched for it but i couldn't find. I ask to be sure) |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19388
|
|
Posted: Sat Jan 05, 2019 3:38 am |
|
|
It's not really plain what you mean?.
In CCS C, the configuration bits are normally set using the #FUSES settings.
So #FUSES NOWDT, sets the configuration bits to turn off the watchdog.
The values for this are basically the data sheet settings (though read
fuses.txt, to find the exact relationship between the names and the fuses).
So the configuration bits are already predefined in the fuse names.
These are listed at the top of the .h file for the processor.
You can also explicitly set a config word as a numeric value if required,
so to set config word 1 to 0xC200, use:
#FUSES 1=0xC200
CCS will also accept the MicroChip __CONFIG syntax as well (remember
you will have to #include the .h file that defines the values for this from
MicroChip if you want to work this way. If you want to do this, you'd
have to load the MicroChip file. CCS assumes you will use their names not
the MicroChip ones, so doesn't generate this file for you. |
|
![](templates/subSilver/images/spacer.gif) |
Ömer Faruk
Joined: 15 Nov 2018 Posts: 42 Location: Çanakkale
|
|
Posted: Sat Jan 05, 2019 4:14 am |
|
|
Ttelmah wrote: | It's not really plain what you mean?.
|
https://i.hizliresim.com/DY2p1l.png
I mean this. In Mplab X you can select manually configuration bits without searching datasheet. I like this feature. |
|
![](templates/subSilver/images/spacer.gif) |
elcrcp
Joined: 11 Mar 2016 Posts: 62 Location: izmir / Turkey
|
|
Posted: Thu Jan 10, 2019 1:54 pm |
|
|
Not like that, but there is something similar to that, you can tick select fuses if you use project manager but you can't change them later like you asked. But again, you can open "Config Bits" from view tab and copy them to your code. _________________ There is nothing you can't do if you try |
|
![](templates/subSilver/images/spacer.gif) |
|