CONFIG WATCHDOG

Top  Previous  Next

Action

Configures the watchdog timer from the AT89C8252

 

 

Syntax

CONFIG WATCHDOG = time

 

 

Remarks

Time

The interval constant in mS the watchdog timer will count to.

Possible settings:

16 , 32, 64 , 128 , 256 , 512 , 1024 and 2048.

 

When the WD is started, a reset will occur after the specified number of mS.

With 2048, a reset will occur after 2 seconds, so you need to reset the WD in your programs periodically.

 

 

See also

START WATCHDOG , STOP WATCHDOG , RESET WATCHDOG

 

 

Example

'-----------------------------------------------------

'                (c) 1995-2006 MCS Electronics

' WATCHD.BAS demonstrates the AT89S8252 watchdog timer

' select 89s8252.dat !!!

'-----------------------------------------------------

Config Watchdog = 2048                 'reset after 2048 mSec

Start Watchdog                         'start the watchdog timer

Dim I As Word

For I = 1 To 10000

Print I                               'print value

'  Reset Watchdog

'you will notice that the for next doesnt finish because of the reset

'when you unmark the RESET WATCHDOG statement it will finish because the

'wd-timer is reset before it reaches 2048 msec

Next

End