View previous topic :: View next topic |
Author |
Message |
beaker404
Joined: 24 Jul 2012 Posts: 163
|
#FUSES and covering the bases. |
Posted: Tue May 07, 2019 3:30 pm |
|
|
Another thread I was involved in pointed out an error in my FUSES. Ok.....
Is there a comprehensive list of fuse tags somewhere? Yeah, I know, look at the datasheet, but the nomenclature in the datasheets does not always match that in the CCS .H files. For me, it is hard to determine what some of these fuses do and second, which ones I need to disable for safety and to head off odd behavior in the future. I am opening this discussion in hopes that either there is a descriptive database for fuses, or there will be. Seems like the place for this would be in the device's .H file as comments.
18F87K22
CCS 5.064
MPLAB 8.91 |
|
|
dluu13
Joined: 28 Sep 2018 Posts: 395 Location: Toronto, ON
|
|
Posted: Tue May 07, 2019 3:50 pm |
|
|
There's that file called fuses.txt that should be in your compiler's install directory. |
|
|
beaker404
Joined: 24 Jul 2012 Posts: 163
|
|
Posted: Tue May 07, 2019 3:57 pm |
|
|
Copy that. Good to know.
I figured there was something, just did not know about it. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19544
|
|
Posted: Wed May 08, 2019 12:24 am |
|
|
and on 'covering the bases', I always build a 'header' for each project that
has the processor #include, fuses and clock setup, before anything else.
Temtronic I know does similar thing with a fuses file for each project.
So your main goes:
Code: |
#include "prjsetup.h" //defines processor, fuses, clock
//Then PPS
//Then setup RS232. I2C etc.
//then #include drivers etc.
//Then main variables/code
|
Having the 'configuration' as a separate block, or include like this makes
it much easier to keep things tidy for each project. If I start a new project
with the same chip, just copy this file as the starting point. |
|
|
beaker404
Joined: 24 Jul 2012 Posts: 163
|
|
Posted: Fri May 10, 2019 10:17 am |
|
|
good tip, thanks. |
|
|
|