Use r’ s M a nual
{
outp(SIO_CONFIG_INDEX,0 xAA);
}
void SetLDN(int LDN)
{
outp(SIO_CONFIG_INDEX, 0 x07);
outp(SIO_CONFIG_DATA, LDN);
}
voi d m a in ()
{
int value = 0;
UnlockSIO();
SetLDN(0x08);
//Enable WDT
outp(SIO_CONFIG_INDEX,0 x30);
outp(SIO_CONFIG_DATA,0x01);
//Set Timer unit(0xF0 bit3(0: 1sec, 1: 60 sec) of watchdog timer by setting
this bit)
outp(SIO_CONFIG_INDEX,0 xF0);
value=inp(SIO_CONFIG_DATA);
outp(SIO_CONFIG_DATA,(value & 0xF7));//set unit sec.
//Set Timer Value(0xF1 Time of watchdog timer)
outp(SIO_CONFIG_INDEX,0 xF1);
outp(SIO_CONFIG_DATA,0x14);//s et to 20 s ec (0x14)
LockSIO();
}