System Installation
WADE-8041 User’s Manual
3-5
There are two PNP I/O port addresses that can be used to configure WDT,
1) 0x2E:EFIR (Extended Function Index Register, for identifying CR index number)
2) 0x2F:EFDR (Extended Function Data Register, for accessing desired CR)
Below are some example codes, which demonstrate the use of WDT.
//Step1. Enter W83627HG configuration registers mode:
outportb(0x2E, 0x87);
outportb(0x2E, 0x87);
//* Step2. Pin89 to be WDTO
outportb(0x2E, 0x2b);
outportb(0x2E + 1, 0x04);
//* Step3. Select logic device 8:
outportb(0x2E, 0x07);
outportb(0x2E + 1, 0x08);
//* Step4. Config WDT using second to be unit:
outportb(0x2E, 0xf5);
outportb(0x2E + 1, 0x00);
//* Step5. Set WDT time-out time:
outportb(0x2E, 0xf6);
outportb(0x2E + 1, time_out);
//* Step6. Exit configuration registers mode:
outportb(0x2E, 0xaa);
----------------------------------------------------------------------------------------------------------------
Watch dog timer fulfill under DOS Debug mode
(1) Example: Watch dog timer count down by "second"
o 2e,87
o 2e,87
o 2e,07
o 2f,08 ; select logic device 8
o 2e,30
o 2f,01 ; default active
o 2e,f5
o 2f,00 ; select timer by "second"
o 2e,f6
o 2f,14 ; Ex: timer=20 seconds; 00 = Watch dog timer time out disabled