beautypg.com

Acrosser AR-B9612 User Manual

Page 16

background image

AR-B9612 User’s Guide
2-11

2.8 WATCH-DOG TIMER

The watchdog timer is a circuit that may be used from your
program software to detect crashes or hang-ups.

Once you have enabled the watchdog timer, your program must
trigger the watchdog timer every time before it times-out.
After you trigger the watchdog timer, it will be set to zero and
start to count again. If your program fails to trigger the
watchdog timer before time-out, it will generate a reset pulse to
reset the system.
The I/O port address of watchdog timer is located at 214Hex or
215Hex. The factor of the watchdog timer time-out constant
is approximately 1.6 seconds.

2.8.1 Enabled the Watchdog Timer

To enable the watchdog timer, you have to output a byte of timer
factor to the watchdog address. The following is a BASICA
program:

1000 REM Points to I/O port address

1010 WD_REG% = I/O_PORT

1020 REM Timer factor =80H

1030 TIMER_FACTOR% = &H80

1040 REM Output factor to watchdog

1050 OUT WD_REG%, TIMER_FACTOR%

,etc.