Chapter 6

Low-level Instructions

The dspic-utility.h header file defines a number of macros for emitting special instructions, like CLRWDT to clear the watchdog timer.

6.1  Usage

To use these macros, you can use the -I compiler option to add the dsPIC Helper Library source directory to the compiler command line, and then include the header file like so:

  #include <dspic-utility.h>

6.2  Macros

NOP()   macro

Emits the NOP instruction; i.e., the “no operation” instruction.

RESET()   macro

Emits the RESET instruction to force a software reset of the microcontroller.

CLRWDT()   macro

Emits the CLRWDT instruction to clear the watchdog timer.