Appendix B
63
ECX-BW00 User’s Manual
{
outp(SIO_CONFIG_INDEX,0xAA);
}
void SetLDN(int LDN)
{
outp(SIO_CONFIG_INDEX, 0x07);
outp(SIO_CONFIG_DATA, LDN);
}
void main()
{
int value = 0;
UnlockSIO();
SetLDN(0x08);
//Enable WDT
outp(SIO_CONFIG_INDEX,0x30);
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,0xF0);
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,0xF1);
outp(SIO_CONFIG_DATA,0x14);//set to 20 sec (0x14)
LockSIO();
}