mikrocdspic

In MircoC Pro for dsPIC How can I setup the watchdog timer?


I need to set the FWDT to have the WDT be on, the prescaler be 1 and the postscaler be 12.

I can't find any documentation on how to do this programmatically, or any way at all. I can see from the data sheet that I need to set FWDT, but I can't see how to do that.

I tried

_FWDT(0xdc);

But that gives me a compiler error "specifier needed"?


Solution

  • The answer, you fool, is that MicroC Pro for dsPIC allows you to set all that in the project configuration.

    Any halfwitted simpleton would have looked there first. Who needs documentation? Pah!

    In the main menu, select Project > Edit Project and that will bring up the following dialogue:

    General project settings, scrolled down to the watchdog timer settings

    Scroll to the bottom to find the watchdog timer settings and you will be able to set the things you need.