System Installation
WADE-8021 User’s Manual
3-5
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 ITE IT8728F data sheet.
WDT Control Command Example
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#defineSIO_Port 0x2E
#define SIO_Port2 0x4E
#define GPIO_LDN 0x07
void Enter_IT872x_SIO() {
outportb(SIO_Port, 0x87);
outportb(SIO_Port, 0x01);
outportb(SIO_Port, 0x55);
outportb(SIO_Port, 0x55);
}
void Set_LDN(unsigned char LDN) {
outportb(SIO_Port, 0x07);
outportb(S1, LDN);
printf("LDN=%x\n", LDN);
}
void Set_Register(unsigned char offset, unsigned char value) {
outportb(SIO_Port, offset);
outportb(S1, value);
printf("Write offset:%x = %x\n", offset, value);
}
int main(void) {
printf("test string\n");
Enter_IT872x_SIO();
Set_LDN(GPIO_LDN);
Set_Register(0x72, 0xC0);
Set_Register(0x73, 0x05);
printf("System will reset in 5 seconds\n");
return 0;
}