Download Print this page

Aaeon SBC-410 Manual page 72

Half-size 486 all-in-one cpu card with cache

Advertisement

#include<stdio.h> #include<dos.h> #include<conio> #in-
clude
<time.h> #include<graphics.h> void mydelay(void);
/* MAIN PROGRAM */ void main (void) {
unsigned int
clrscr();
gotoxy(15, 6);printf("AAEON TECHNOLOGY, INC.");
gotoxy(15, 7);printf("WATCHDOG TIMER TEST & DEMO
PROGRAM");
gotoxy(15, 9);printf("Please setup watchdog delay
time:(2 Sec-30 Sec)");
/* Set watchdog timer time-out interval */
scanf("%2d",&dog);
out interval (Sec) */
dog=dog/2;
to designated Hex */
dog=15-dog;
outportb (0x443,dog);
/* Setup screen display format */
gotoxy(15,11);printf("Now enable watchdog!");
gotoxy(15,12);printf("You can put keyboard reset or
disable watchdog.");
gotoxy(15,13);printf("
gotoxy(15,14);printf("
gotoxy(15,15);printf("
/* Read key pressed */
while(1){
enable
* /
64 SBC-410 User's Manual
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
dog=0
run_time=0;
char inkey;
/* Input watchdog timer time-
/* Convert time-out interval
if(kbhit()){
inkey=getch();
switch(inkey){
case '1': /* Reset Watchdog timer */
case '2': /* Disable Watchdog timer
/* Enable watchdog timer */
[1]. Reset watchdog.");
[2]. Disable watchdog.");
[3]. Return to O.S.");
gotoxy(15,11);printf("Now
watchdog timer!");
outportb(0x443,dog);
run_time=0;
break;
gotoxy(15,12);printf("Now
disable watchdog timer!");
outportb (0x80,dog);
return;

Advertisement

loading