System Installation
ROBO-6710/6730VLA User’s Manual
3-6
The related Control Registers of WDT are all included in the following sample
program that is written in C language. User can fill a non-zero value into the Time-
out Value
Register to enable/refresh WDT. System will be reset after the Time-out
Value to be counted down to zero. Or user can directly fill a zero value into Time-out
Value Register to disable WDT immediately. To ensure a successful accessing to the
content of desired Control Register, the sequence of following program codes should
be step-by-step run again when each register is accessed.
Additionally, there are maximum 2 seconds of counting tolerance that should be
considered into user’ application program. For more information about WDT, please
refer to Winbond W83627HF data sheet.
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.
// Enter Extended Function Mode
outp(0x002E, 0x87);
outp(0x002E, 0x87);
// Assign Pin 89 to be a WDTO
outp(0x002E, 0x2B);
outp(0x002F, inp(0x002F) & 0xEF);
// Select Logic Device 8
outp(0x002E, 0x07);
outp(0x002F, 0x08);
// Active Logic Device 8
outp(0x002E, 0x30);
outp(0x002F, 0x01);
// Select Count Mode
outp(0x002E, 0xF5);
outp(0x002F, (inp(0x002F) & 0xF7) | (
Count-mode Register
& 0x08));
// Specify Time-out Value
outp(0x002E, 0xF6);
outp(0x002F,
Time-out Value Register
);
// Disable WDT reset by keyboard/mouse interrupts
outp(0x002E, 0xF7);
outp(0x002F, 0x00);
// Exit Extended Function Mode
outp(0x002E, 0xAA);