Take the 2-minute tour ×

I am learning microcontroller programming using the c language and the PIC processor from Microchip, but there are certain preprocessor directives that are not obvious to me.

For Example:

#fuses NOWDT

I have tried looking for the documentation for such instructions but i have failed.

Help would be appreciated.

share|improve this question
Looks like you're using the CCS compiler. CCS itself has an excellent forum: ccsinfo.com/forum . When it comes to CCS-specific issues, that forum is second to none. –  Nick Alexeev Mar 25 '11 at 0:28

3 Answers 3

up vote 3 down vote accepted

That preprocessor directive appears to be special to the CCS C compiler, and is listed in the manual.

share|improve this answer
thanks, kind of what i needed. –  Dr Deo Mar 21 '11 at 15:44
@Dr Deo, I wasn't familiar with that directive since we use the Hitech C compiler here so I just googled for Microchip and NOWDT to get the first link. –  Martin Mar 21 '11 at 16:42

NOWDT mean watchdog timer disabled. NOWDT must be defined in one of library files. NOWDT point to bit in MCPU config word.

share|improve this answer
NOWDT was just one of the many things i don't understand. Where can i get the docs that describe each of these directives in more detail? –  Dr Deo Mar 21 '11 at 10:08

The #fuses directive is unique to the CCS compiler.

NOWDT means that the watchdog timer is disabled. (A watchdog timer is what helps you deal with problems in your C code that cause your app to hang. The thinking is that you reset the watchdog timer 'kick the watch dog' every so often to avoid it from automatic resets. It's like a "Keep Alive" for your program.)

Here's the CCS manual. It's worth printing out and keeping on your desk. Look for the section on #fuses to see a partial list.

The full list of fuses comes with the compiler in a text file. It is dependent on your chip.

For example: http://www.ccsinfo.com/forum/viewtopic.php?t=42945

You can also get a sense of what fuses are probably available and what they do by reading the spec sheet for your particular processor. The exact terms will differ between the CCS compiler and the processor spec sheet. You'll have to decipher it a little bit.

share|improve this answer

Your Answer


