Appendix
- 44 -
CPC-1814CLD5NA-N
oldval &= 0xfe;
outportb(DATA_PORT, oldval);
b.
Configure WDT to interrupt mode
oldval
|=
0x01;
outportb(DATA_PORT,
oldval);
outportb(INDEX_PORT,0xf7);
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*/
(3)
Configure WDT to time by minute/second:
a.
Time by minute:
outportb(INDEX_PORT,0xf5);
outportb(DATA_PORT,0x08);
b.
Time by second:
outportb(INDEX_PORT,0xf5);
outportb(DATA_PORT,0x00);
(4)
Enable/Disable
WDT
a.
Enable WDT:
outportb(INDEX_PORT,0xf6);
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);