EasyManua.ls Logo

protech PA-6225 - Page 206

protech PA-6225
283 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 3 Software
PA-6225 SERIES USER MANUAL
Page 199
3-5-2. Code Example for Watchdog Timer
Enable watchdog timer and set the timeout interval as 30 seconds.
;------ Enter to extended function mode --------------------------------------------------------
mov dx, 2eh
mov al, 87h
out dx, al
out dx, al
;------ Select Logical Device 7 of watchdog timer --------------------------------------------
mov al, 07h
out dx, al
inc dx
mov al, 07h
out dx, al
;------ Enable Watch dog feature --------------------------------------------
mov al, 030h
out dx, al
inc dx
mov al, 01h
out dx, al
;------ Enable Watch PME--------------------------------------------
dec dx
mov al, 0FAh
out dx, al
inc dx
in al, dx
and al, 51h
out dx, al
;------ Set second as counting unit --------------------------------------------------------------
dec dx
mov al, 0f5h
out dx, al
inc dx
in al, dx

Table of Contents