OPTION - OPTION Control register

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

!RBPU

INTDG

T0CS

T0SE

PSA

PS2

PS1

PS0

Items in red are not relevant to the watchdog.

PSA - PreScaler Assignment Bit

If this bit is set the prescaler is assigned to the watchdog. This means that TIMER0 will be updated at the instruction clock rate.

The pre-scaler lets you control the rate at which the timer counts. It divides the timer input frequency by a particular power of 2, so that you can slow down the clock. Note that the divide ratios for the watchdog are different from those used for the system clock in that you can divide by 1. This has the effect of halving the maximum divide value.

PS2, PS1, PS0 - PreScaler control bits

These bits allow you to select one of eight pre-scaler values. These are the numbers which the clock is divided by. The assignments are as follows:

PS2

PS1

PS0

divide by

0

0

0

1

0

0

1

2

0

1

0

4

0

1

1

8

1

0

0

16

1

0

1

32

1

1

0

64

1

1

1

128

counts up at a rate of around 56 Hz, which means that your program

STATUS - Status register

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

IRP

RP1

RP0

!TO

!PD

Z

DC

C

Items in red are not relevant to the watchdog status.

!TO - not Time Out

The !TO flag is set immediately after a power up. It is also set by a sleep instruction and a clear watchdog instruction. It is set when the watchdog triggers. This means that your program can check this bit on power up to see if the reset was caused by a watchdog timeout.