Appendix B Watchdog Timer Sample Code - Quanmax QBOX-1010 User Manual

0.6-liter fanless box pc with intel atom processor n270
Table of Contents

Advertisement

WatchDog Timer Sample Code
//============================================
//QBOX-1010 DOS watchdog sample program
//Please compile with Turbo C 3.0 to utilized the program
//============================================
int main()
{
//Initialized the WDT program
outp(0x2e,0x87);
outp(0x2e,0x01);
outp(0x2e,0x55);
outp(0x2e,0x55);
//Setting Logical Device Number to 0x07
outp(0x2e,0x07);
outp(0x2f,0x07);
//Set Timer Value(0x73 is LSB while 0x74 is MSB)
outp(0x2e,0x73);
outp(0x2f,0x14);//set to 20 sec (0x14)
//Set Timer Unit to Second/Minute(Bit 7 equal to 1 is second/0 is minute)
//Enable WDT (Bit 6 equal to 1 is enable/0 is disable)
outp(0x2e,0x72);
outp(0x2f,0xd0);//The unit is set as second
return 0;
}
QBOX-1010 User's Manual
Appendix B
36
Appendix B

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the QBOX-1010 and is the answer not in the manual?

Questions and answers

Table of Contents