Page 214 of 346 Start Back Next End ZBasic System Library 202 ZBasic Microcontrollers OpenWatchDog Type Subroutine Invocation OpenWatchDog(timeout) Parameter Method Type Description timeout ByVal Byte Specifies a timeout value (see discussion). Discussion This subroutine prepares the watchdog timer for use. Once it is opened, the WatchDog() routine must be called from time to time. If the period between WatchDog() calls exceeds the timeout value, the system will be reset. The approximate timeout value is T times 2 to the power N where T is the Timeout Base value and N is the value of the timeout parameter limited to the range shown in the table below. Note that the timeout value varies with processor voltage, being slightly longer at a lower operating voltage. Consult the Atmel documentation for more specific information. WatchDog Timeout Parameter Range For ZX Devices ZX Devices Timeout Base Value Range Max. Time ZX-24, ZX-40, ZX-44 16mS 0-7 2 sec ZX-24a, ZX-40a, ZX-44a, ZX-24p, ZX-40p, ZX-44p, ZX-24n, ZX-40n, ZX-44n, ZX-24r, ZX-40r, ZX-44r, ZX-24s, ZX-40s, ZX-44s, ZX-40t, ZX-44t 16mS 0-9 8 sec ZX-24x, ZX-32a4, ZX-128a1, ZX-24xu 8mS 0-10 8 sec ZX-328n, ZX-328l, ZX-32n, ZX-32l, ZX-1281, ZX-1281n, ZX-1280, ZX-1280n 16mS 0-9 8 sec ZX-24e, ZX-128e, ZX-128ne 16mS 0-7 2 sec ZX-24ae, ZX-24ne, ZX-24pe, ZX-24nu, ZX-24pu, ZX-24ru, ZX-24su, ZX-1281e, ZX-1281ne, ZX-328nu 16mS 0-9 8 sec WatchDog Timeout Parameter Range For Generic Devices Target Device Timeout Base Value Range Max. Time tiny24, tiny24A, tiny44, tiny44A, tiny84, tiny48, tiny88, tiny87, tiny167, tiny2313, tiny2313A, tiny4313 16mS 0-9 8 sec mega48, mega48A, mega48P, mega48PA, mega88, mega88A, mega88P, mega88PA, mega168, mega168A, mega168P, mega168PA, mega328, mega328P, mega164A, mega164P, mega164PA, mega324P, mega324PA, mega644, mega644A, mega644P, mega644PA, mega1284P 16mS 0-9 8 sec mega8, mega8A, mega16, mega16A, mega32, mega32A, mega8515, mega8535, mega162 16mS 0-7 2 sec mega64, mega64A, mega128, mega128A 14mS 0-7 2 sec mega161, mega163, mega323, mega165, mega165A, mega165P, mega165PA 15mS 0-7 2 sec mega325, mega325P, mega645, mega645A, mega645P, mega169, mega169A, mega169P, mega169PA, mega329, mega329P, mega329PA, mega649, mega649A, mega649P, mega3250, mega3250P, mega6450, mega6450A, mega6450P, mega3290, mega3290P, mega6490, mega6490A, mega6490P 16mS 0-7 2 sec mega1281, mega2561, mega640, mega1280, mega2560 16mS 0-9 8 sec mega8U2, mega16U2, mega32U2, AT90USB82, AT90USB162 32mS 0-9 16 sec mega16U4, mega32U4, AT90CAN32, AT90CAN64, AT90CAN128, AT90USB646, AT90USB647, AT90USB1286, AT90USB1287 16mS 0-7 2 sec all xmega 8mS 0-10 8 sec