View previous topic :: View next topic |
Author |
Message |
Greg_R
Joined: 21 Feb 2006 Posts: 19 Location: San Diego
|
What is the cleanest way to hard code configuration bits? |
Posted: Mon Jan 07, 2008 10:18 pm |
|
|
I just tried my first project with PCD and am not impressed. It sucks to be a beta tester and not at least get a shirt...
Ranting aside I need to be able to setup the configuration bits and not have the #fuse entries over-ride them. What is the best way to do that?
Greg |
|
|
Ttelmah Guest
|
|
Posted: Tue Jan 08, 2008 2:55 am |
|
|
The #fuse statements are there to set the configuration bits. Why use anything else?....
However if you want to 'byte' code them, then just don't have any fuse statements, or add a #ROM statement, declaring them with the required numeric values.
Your question is a little like asking "when I turn the steering wheel the wheels move, how can I stop this". It can done, but seems rather 'strange'...
Best Wishes |
|
|
Greg_R
Joined: 21 Feb 2006 Posts: 19 Location: San Diego
|
I've had problems with CCS and the "Valid" fuse li |
Posted: Tue Jan 08, 2008 9:55 am |
|
|
Ttelmah,
I've had problems with the Fuse lists being incomplete before. I don't tend to trust them anymore. Right now I have an external clock oscillator connected to a dsPIC33FJ64MC506. It's runs slow if I set EC. It runs as expected with FRC_PLL.(Yes, I know this means I'm running on the internal) I've checked the Oscillator with a scope and it is running fine.
The second reason is that I have to setup the PLL and VCO to get the speed I want. I may as well put all the clock stuff in one place...
Greg |
|
|
Ttelmah Guest
|
|
Posted: Tue Jan 08, 2008 11:00 am |
|
|
So, just use a #ROM statement for the configuration data.
If you either exclude the fuse statements entirely, or put the #ROM after it, this will override the fuse settings.
One way to generate the required values, is to setup all the fuses as you want them, in MPLAB, and it's setup window, then gives the word addresses and values to use. Makes it easier, and safer, than trying to generate them yourself.
The 'reason', is one of the ones that makes sense I'm afraid.....
Best Wishes |
|
|
|