# PIC: Watchdog timer off by a factor of 4

I have a PIC16 (datasheet here) for which I use the watchdog timer. I configure the watchdog timer as follows:

WDTCONbits.WDTPS = 0b01110;


According to page 105 of the datasheet, this should configure the watchdog timer for 16 seconds. However, the timer interrupt is called after only 4 seconds. (I have tested the timer with other values and the 4x discrepancy always persists.)

My first thought was that it was due to the 4xPLL being enabled. But as far as I understand, the watchdog timer is based upon the LFINTOSC clock, which is invariant under the 4xPLL.

Why is my watchdog timer running at four times the speed it should be?

The timing bits are bits 5 to 1, which means for 16 seconds the register should be written with 0b00011100 (or the LSB can be 1 if you are controlling the WDT in software).
Not sure why it would be 4 times off rather than 2, but try writing the above value directly to the full register (i.e. WDTCON) and see if it works correctly.