User`s manual

ENDAT-2794A USERS MANUAL
UNICORN COMPUTER CORP.
20
2-4. Watch Dog Timer
Watch dog Timer (WDT) is a special design for system monitoring to secure the
system work normally. WDT has an independent clock from the oscillator and could
set time and clear/refresh WDT counter function. When time is up, WDT will send
hardware RESET signal to reset system.
Timeout Value Range
-1 to 255
-Second or Minute
Sample code (using TurboC/C++ 3.0):
2-5. Digital I/O
Pin define:
J5: DIGITAL I/O Pin Header (2 x 7 with 2.0mm)
Pin No. Function Pin No. Function
1 +5V 2 +5V
3 DIO-O0 4 DIO-I0
5 DIO-O1 6 DIO-I1
7 GND 8 GND
9 DIO-O2 10 DIO-I2
11 DIO-O3 12 DIO-I3
13 +3.3V 14 +3.3V
Voltage tolerance: +/- 5% with 0V to +5V.
outportb(0x4e,0x87); //Unlock register
outportb(0x4e,0x87); //Unlock register
outportb(0x4e,0x07); //Set Logic Device number pointer
outportb(0x4f,0x07); //Set Logic Device number
outportb(0x4e,0xF5);
outportb(0x4f,0x40);
outportb(0x4e,0xF6);
outportb(0x4f,0x00);//0-7 Bit :Time out value for watch dog timer
outportb(0x4e,0xF5);
outportb(0x4f,0x20);//Bit 5:If this bit is set to 1, the counting of watch dog time is enabled (bit
1:0 are select output pulse width of RESET signal: 0 for 1 ms, 1 for 25 ms, 2 for 125ms and 3 for
5 seconds)