Appendix
48
EC71813CLD2NA SERIES
val |=0x40;
outportb(DATA_PORT, val);
b.
Configure
WDT
to interrupt mode
outportb(INDEX_PORT,0x72)
outportb(DATA_PORT,IRQ_ NO); /*Please replace the constant IRQ_NO with
the interrupt number need to be used. The available range of the interrupt
number has been listed in the beginning of this chapter*/
outportb(INDEX_PORT,0X72);
int val=inportb(DATA_PORT);
val&=0xBF;
outportb(DATA_PORT, val);
(3)
Configure
WDT
to time by minute or second:
a.
Time by minute:
val &=0x7f;
outportb(INDEX_PORT, 0x72);
outportb(DATA_PORT,
val);
b.
Time by second:
val |=0x80;
outportb(INDEX_PORT
,
0x72);
outportb(DATA_PORT,
val);
(4)
Enable/disable
WDT
a.
Enable WDT:
outportb(INDEX_PORT,0x73);
outportb(DATA_PORT,TIME_OUT_VALUE); /*Please replace the constant
TIME_OUT_VALUE with the unit number of timeout value (0x01 ~ 0xFF)*/
b.
Disable WDT:
outportb(INDEX_PORT,0xf6);
outportb(DATA_PORT,0x00);