View previous topic :: View next topic |
Author |
Message |
RLScott
Joined: 10 Jul 2007 Posts: 465
|
#fuses not working as expected - 18F24K22 |
Posted: Wed Dec 14, 2011 10:16 pm |
|
|
I am running the latest (4.128) PCH with MPLAB as the IDE, and #fuses don't seem to work on all the bits. In particular, I can't enable the WDT. My fuses statement is:
Code: | #fuses XT,NOPROTECT,NOLVP,NOFCMEN,NOIESO,WDT,WDT4096,PLLEN,BROWNOUT,NOPBADEN |
The single source file has a #device PIC18F24K22 (instead of the full .h include) because I am not using any library functions.
After cleaning the project and doing a make (F10 on MPLAB) I look at the Config bits in MPLAB and they always say "Watchdog timer is always disabled. SWDTEN has no effect." Also this is confirmed by examining the .HEX file produced and seeing that it contains:
:0E0000000031193400BD000003C003E00340CE
The "34" after the "3119" is CONFIG2H.
Any idea what I am doing wrong? This always worked find on midrange projects (PCM) but this is my first PCH project. _________________ Robert Scott
Real-Time Specialties
Embedded Systems Consulting |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
RLScott
Joined: 10 Jul 2007 Posts: 465
|
|
Posted: Thu Dec 15, 2011 5:00 am |
|
|
Yup, that was it. After changing the build configuration to "Release", all the config bit settings responded as expected to the #fuses statement. Thanks. _________________ Robert Scott
Real-Time Specialties
Embedded Systems Consulting |
|
|
|