FabiaTech Corporation
68
Watchdog Timer Enabled
To enable the watchdog timer, you have to output a byte of timer factor to the
watchdog register whose address is 2eh and data port is 2fH. The following is a Demo
program, which demonstrates how to enable the watchdog timer and set the time-
out period at 28 seconds.
;------------------------------------------------------------------------------------------
; Enter the extended function mode
;------------------------------------------------------------------------------------------
outportb (0x2e,0x87); // Enter to extended function mode
outportb(0x2e,0x01);
outportb(0x2e,0x55);
outportb(0x2e,0x55);
;--------------------------------------------------------------------------------------------------------------
; Logical device 7, configuration registers Index 72h-Bit 7, 73H (LSB)/74H (MSB)
;--------------------------------------------------------------------------------------------------------------
outportb(0x2e,0x72);
// Index 72h- Time and Watchdog Register
outportb(0x2f,0xc0);
//
Set Bit 7 is 1: Second and Bit6: Enabled Watchdog.
//outportb(0x2f,0x40); //
Set Bit 7 is 0: Minute.
outportb(0x2e,0x74);
// Set Timer Value counter1 0100~FF00 (MSB)
outportb(0x2f,0x00);
outportb(0x2e,0x73);
// Set Timer Value counter0 0001~00FF (LSB)
outportb(0x2f,0x28); //
Set timeout interval as 28seconds and start counting
;------------------------------------------------------------------------------------------
; Exit the extended function mode
;------------------------------------------------------------------------------------------
outportb(0x2e,0x02);
// Set Timer Value counter0 0001~00FF (LSB)
outportb(0x2f,0x02); //
Set timeout interval as 28seconds and start counting
Watchdog Timer Trigger
After you enable the watchdog timer, your program must write the same factor as
enabling to the watchdog register at least once every time-out period to its previous
setting. You can change the time-out period by writing another timer factor to the
watchdog register at any time, and you must trigger the watchdog before the new
time-out period in next trigger.
Watchdog Timer Disabled
To disable the watchdog timer, simply write a 00H to the watchdog register.
;--------------------------------------------------------------------------------------------------------------
; Logical device 7, configuration registers Index 72h Bit 6
;--------------------------------------------------------------------------------------------------------------
outportb(0x2e,0x72);
// Index 72h- Time and Watchdog Register
outportb(0x2f,0x80);
//
Set Bit6 to 0 Disabled Watchdog.
Содержание FB2701
Страница 6: ...vi...
Страница 12: ...FabiaTech Corporation 6...
Страница 28: ...FabiaTech Corporation 22...
Страница 68: ...FabiaTech Corporation 62...
Страница 86: ...FabiaTech Corporation 80 Appendix Dimension...