Demo Program - Aaeon SBC-350A User Manual

Half-size all-in-one 386sx-40 cpu card
Hide thumbs Also See for SBC-350A:
Table of Contents

Advertisement

Delay Time
(Hex)
0 ~ 2
2 ~ 4
4 ~ 6
6 ~ 8
8 ~ 10
10 ~ 12
12 ~ 14
14 ~ 16
The following demo program illustrates the programming steps
required to enable, set the time-out interval and disable the
watchdog timer.
#include<stdio.h> #include<dos.h> #include <conio.h> #include
<time.h> #include<graphics.h> void mydelay(void);
/* MAIN PROGRAM */ void main(void) {
unsigned int
char inkey;
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 */
Value (Hex)
E
D
C
B
A
9
8
7
dog=0,
run_time=0;
/* Input watchdog timer time-
/* Convert time-out interval
/* Enable watchdog timer */
[1].Reset watchdog.");
[2].Disable watchdog.");
[3].Return to O.S.");
Appendix A Programming the watchdog timer
Delay Time
16 ~ 18
18 ~ 20
20 ~ 22
22 ~ 24
24 ~ 26
26 ~ 28
28 ~ 30
Value
6
5
4
3
2
1
0
39

Advertisement

Table of Contents
loading

Table of Contents