View previous topic :: View next topic |
Author |
Message |
Junior Guest
|
WDT config bits opposite #fuses directive |
Posted: Mon Mar 26, 2007 12:53 pm |
|
|
CCS PCH C Compiler, Version 3.224
MPLAB 7.21.00.00
IDC2 7.20.9.1
PIC18F252
If I say
#fuses WDT128
then look under Configure/Configuration bits I see
Watchdog Postscaler 1:1
If I say
#fuses WDT1
then look under Configure/Configuration bits I see
Watchdog Postscaler 1:128
The actual Watchdog timout follows the Config Bits.
Has anyone else seen this or know of a fix?
Appart from the obvious work around of using the wrong #fuses setting?
Thanks |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Mar 26, 2007 1:28 pm |
|
|
I couldn't get it to fail, but I don't have your exact versions.
I have MPLAB vs. 7.20. I tested it with PCH vs. 3.188, 3.191, 3.230
and 3.249. It worked OK with all those.
If you have an earlier version of PCH than 3.224, try it.
This would prove if the problem is with MPLAB.
Also, make sure that you have the correct device selected in MPLAB.
Go to the Configure / Select Device menu and make sure it's set to
18F252. |
|
|
Junior Guest
|
WDT mystery solved |
Posted: Mon Mar 26, 2007 2:44 pm |
|
|
I was using the wrong header file.
The target is a PIC18F252 but I was using 18c252.h,
because this project was ported to the 18C252
and when I use the correct header file it doesn't run,
even though the WDT config bit are correct.
Guess I got some work to do.
Thanks |
|
|
|