Advantech UNO-1170E user manual Appendix B Programming the Watchdog Timer

Page 52

Appendix B Programming the Watchdog Timer

Below are samples of code for controlling the Watchdog Timer function.

-----------------------------------------------------------------------------------

Enter the extended function mode, interruptible double-write

-----------------------------------------------------------------------------------

MOV DX,2EH

MOV AL,87H OUT DX,AL OUT DX,AL

-----------------------------------------------------------------------------

Configured logical device 8, configuration register CRF6

-----------------------------------------------------------------------------

MOV DX,2EH

MOV AL,2BH OUT DX,AL MOV DX,2FH IN AL,DX AND AL.OEFH;Setbit 4=0 Pin 89=WDTO OUT DX,AL MOV DX,2EH

MOV AL,07H; point to Logical Device Number Reg. OUT DX,AL MOV DX,2FH

MOV AL,08H; select logical device 8 OUT DX,AL; MOV DX,2EH

MOV AL,30H;Set watch dog activate or inactivate

OUT DX,AL MOV DX,2FH

MOV AL,01H; 01:activate 00:inactivate OUT DX,AL; MOV DX,2EH

MOV AL,F5H; Setting counter unit is second

OUT DX,AL MOV DX,2FH MOV AL,00H OUT DX,AL; MOV DX,2EH MOV AL,F6H OUT DX,AL MOV DX,2FH

MOV AL,05H; Set 5 seconds

OUT DX,AL

;------------------------------------------

; Exit extended function mode

;------------------------------------------

MOV DX,2EH

MOV AL,AAH OUT DX,AL

UNO-1170 User Manual

44

Image 52
Contents UNO-1170/1170E Copyright Notice Acknowledgements Product Warranty 2 years Technical Support and Assistance FCC Class aPacking List Safety Instructions Safety Precaution Static Electricity Contents Appendix Programming the Watchdog Timer UNO-1170 Overview Hardware Specifications IntroductionSafety Precautions Relative humidity 95% @ 40CChassis Dimensions UNO-1170 SeriesUNO-1170E Chassis Dimensions Page Hardware Functionality UNO-1170 Peripherals UNO-1170 Front ViewUNO-1170E Front View COM1~COM2 RS-232 Interfaces COM3 RS-232/422/485 InterfacesJumper Setting for RS-422/485 Interface Default Setting 4 RS-232/422/485 SelectionTerminal Resistor Setup for RS-422/485 LAN Ethernet Connector Power ConnectorLED Indicators PS/2 Keyboard and Mouse ConnectorUniversal Serial Bus Connectors VGA VGA Display ConnectorReset Reset Button Battery Backup SramAudio LED and Buzzer for System DiagnosisProgrammable LED Control Bit 14 PCI/104+ Connectors UNO-1170E only RS-422/485 Jumper SettingsPage Initial Setup CompactFlash Card Installation Page USB Keypro and Keypro Bracket Installation Power Connection Chassis GroundingPC/104+ Card Installation UNO-1170E Page Page Hard Drive installation UNO-1170E Page Bios Setup and System Assignments DIN-rail Mounting SetupWallmounting Setup System Settings and Pin Assignments Appendix a System Settings and Pin Assignments System I/O Address & Interrupt AssignmentsTable A.2 UNO-1170 Interrupt Assignment Board Connectors and Jumpers Figure A.1 Connector & Jumper Locations TopTable A.3 Connectors & Jumpers Table A.4 Connectors & Jumpers UNO-1170E RS-232 Serial Port COM1~COM2 Ethernet RJ-45 Connector LAN1~LAN2 RS-232/422/485 Serial Port COM3Power Screw Terminal CN8 PS/2 Keyboard and Mouse Connector CN10VGA Display Connector CN15 USB Connector CN13Display Memory Sata Data Connector CN17 Page Programming the Watchdog Timer Appendix B Programming the Watchdog Timer