User’s Manual
104
ECM-3410/3410L/3410N User’s Manual
Programming Watchdog Timer
To Unlock / Lock W83977F and Enter / Exit configuration mode is to write a specific value
to I/O Port 3F0h as shown below.
Unlock W83977F: write value 87h to I/O port 3F0h twice.
Lock W83977F: write value aah to I/O port 3F0h.
Therefore, to unlock W83977F I/O chip and enter configuration mode, write twice unlock
value (87h) to port 3F0h.
Ex: outportb(0x3f0, 0x87);
outportb(0x3f0, 0x87);
Set register 30h of logical device 8 to 1 to activate the timer.
Logical Device 8: Register number 30h (CR30)
00h: timer inactive
01h: timer active
Write value 7 to port 3F0h
/* register 7 (logical device switch register)*/
Write value 8 to port 3F1h
/* write value 8 to enter logical device 8 */
Ex: outportb(0x3f0, 0x07);
outportb(0x3f1, 0x08);
Write time-out value (01h ~ FFh) to timer register (F2h).
Logical Device 8: Register number F2h (CRF2)
00h: Time-out Disable
01h: Time-out occurs after 16 seconds
02h: Time-out occurs after 46 seconds
03h: Time-out occurs after 1 minute 16 seconds
04h: Time-out occurs after 1 minute 46 seconds
05h: Time-out occurs after 2 minutes 16 seconds
.
.
.
FFh: Time-out occurs after 127 minutes 16 seconds
Write register number F2h to port 3F0h
Write time-out value to port 3F1h
Ex: outportb(0x3f0, 0xF2);
/* register F2 (Watchdog Timer) */
outportb(0x3f1, 0x01);
/* time-out value 01 = 16 seconds */
Lock W83977F I/O chip, and exit configuration mode
Write lock value (AAh) to port 3F0h
Ex: outportb(0x3f0, 0xAA);
The following shows two examples of programming the watchdog timer with 16 seconds
time interval in both Micro-assembly and C language.