![background image](http://html1.mh-extra.com/html/premio/vio-100-pc100-j1900-series/vio-100-pc100-j1900-series_user-manual_1596727104.webp)
VIO-100(200)-PC100-
J1900 | User’s Manual
104
WDT Sample Code
Sample Code:
Set watchdog timer to 30 seconds
AddrPort =0x4e;
DataPort=0x4f;
SIO_UNLOCK_VALUE=0x87;
SIO_LOCK_VALUE=0xaa;
WATCHDOG_LDN=0x07;
WDT_ UNIT=0x60; // 0x60=sec, 0x68=min, 0x40=disable watchdog timer
WDT_TIMER= 30;
// Set watchdog timer to 30 seconds
// enable config mode, switch WDT configuration
WriteByte(AddrPort, SIO_UNLOCK_VALUE);
usleep(4000); //delay
WriteByte(AddrPort, SIO_UNLOCK_VALUE);
WriteByte(AddrPort, 0x07);
WriteByte(DataPort, WATCHDOG_LDN);
// activate wdt
WriteByte(AddrPort, 0x30);
data=ReadByte(DataPort);
data=data|0x01;
WriteByte(DataPort, data);
// set timer value
WriteByte(AddrPort, 0xf6);
WriteByte(DataPort, WDT_TIMER);
// set unit
WriteByte(AddrPort, 0xf5);
WriteByte(DataPort, WDT_UNIT);
// enable reset
WriteByte(AddrPort, 0xfa);
data=ReadByte(DataPort);
data=data|0x01;
WriteByte(DataPort, data);
// close config mode
WriteByte(AddrPort, SIO_LOCK_VALUE);
Appendix
–
WDT & GPIO
Summary of Contents for VIO-100-PC100-J1900 Series
Page 1: ...USER S MANUAL VIO 100 PC100 J1900 Series VIO 200 PC100 J1900 Series Industrial Panel PCs...
Page 14: ...Chapter 1 Product Introductions...
Page 45: ...Chapter 2 Switches and Connectors...
Page 61: ...Chapter 3 Front Panel Controls...
Page 66: ...Chapter 4 System Setup...
Page 82: ...Chapter 5 BIOS Setup...
Page 103: ...Appendix WDT GPIO Mounting Guide...
Page 110: ...All Rights Reserved VIO 100 200 PC100 J1900 User s Manual...