Microsoft UNO-3074 user manual Appendix B Programming the Watchdog Timer

Page 80

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-3074 User Manual

70

Image 80 Contents
UNO-3074 Support CopyrightAcknowledgements Product Warranty 2 years Declaration of Conformity FCC Class a Technical Support and AssistanceSafety Instructions Safety Precaution Static Electricity Contents Chapter Initial Setup Appendix Programming the Watchdog Timer Page Overview Introduction Open Architecture Designed for AutomationFront Access Connections An Industry-Proven DesignOff-the-shelf Universal PCI Extensions Designed to Fit Into Control CabinetsPopular Operating Systems and Rapid Application Development Onboard DI/O for Counter, Alarm/Event HandlingFlexible Networking Options Hardware Specifications Battery Backup RAM 512 KB ChipsetCPU RS-232 SpeedTwo 16-bit Counters/Timers Ch Isolated Digital Input DI0~DI3Ch Isolated Digital Output DO0~DO3 Anti-ShockSafety Precautions Power Supply 16 ~ 36 VDCPower Consumption 24 W Typical Chassis Size WxHxDChassis Dimensions Chassis Dimensions for CeleronM 1GHzChassis for Pentium 1.8GHz or Faster CPU Accessories Packing ListHardware Functionality Front Panel of UNO-3074 RS-232 Interface COM1~COM2 RS-232/422/485 Interface COM3~COM41 16C550 UARTs with 16-byte Fifo Standard 2 RS-422/485 Detection4 RS-232/422/485 Selection 5 RS-485 Auto Flow/RS-422 Master/Slave SelectionVector address for share IRQ 1D0H 6 IRQ, I/O Address and Transmission Rate SettingAuto Flow & RS-422 Slave/Masters IRQ Setting via Switch 1 at SW3 Transmission Rate Switch 2 at SW3LAN Ethernet Connector Onboard Isolated Digital InputTermination Resistor JP6 Pin AssignmentsDigital Input Connector Signal Description Isolated InputsInterrupt Function of the DI Signals IRQ LevelInterrupt Control Register Interrupt Control Register Bit MapInterrupt Flag Bit Interrupt Enable Control FunctionInterrupt Triggering Edge Control Digital Output Connector Signals Onboard Isolated Digital OutputIsolated Outputs Power On Configuration10 Digital Output Power On Configuration Isolated Digital Output Connection 11 Counter/Timer Control Register Bit Map Onboard Isolated Counter/TimerCounter/Timer Control Register Counter 0 Function Block Counter 1 Function Block4 32-bit Counter Function Block CTR32Set=1 Counter Clock SourceCounter Internal Clock Counter Gate SourceCounter Output Destination Counter Interrupt Flag14 Counter Gate Source Control Bit 15 Counter Output Destination Control Bit17 32-bit Counter Control Bit Power InputCascaded 32-bit Counter 12 LED Locations to Monitor Power Input 18 Power Register Bit Map LED and Buzzer for System Diagnosis19 LED & Buzzer Control Register 20 Programmable LED Control BitUSB Connector PS/2 Keyboard and Mouse ConnectorPcmcia PC Card Slot 21 Programmable Buzzer Control BitPage Make sure the IRQ of Pcmcia device is VGA Display Connector Page Battery Backup Sram 14 LED Location for Battery BackupOutput voltage 3 VDC Reset ButtonLithium Battery Specification Initial Setup Connecting Power Inserting a CompactFlash CardJP2 on mainboard refer to Figures A.3 JP1 on daughterboard refer to Figure A.4Installing a Hard Disk Correct way is shown by the first figure belowPage Page Page IDE Connector CN1 and CN2 Installing a PCI-bus Card 1st Anti-Vibration Rubber2nd PCI-bus Card Installation Installing Power Cable Mounting UNO-3074UNO-3074 Improper Installation UNO-3074 Mounting CautionUNO-3074 Correct Installation Bios Setup and System Assignments Page System Settings and Pin Assignments System I/O Address and Interrupt Assignments Table A.1 UNO-3074 System I/O PortTable A.2 UNO-3074 Interrupt Assignments Interrupt No Interrupt SourceBoard Connectors and Jumpers Figure A.1 Backplane Connector & JumpersFigure A.3 Mainboard Connector & Jumpers Front Figure A.4 Daughter Connector & Jumpers Front Figure A.5 Daughter Connector & Jumpers Back Table A.3 Connector and Jumper Descriptions Table A.4 Connector and Jumper DescriptionsTable A.5 Connector & Jumper Descriptions SW1UNO-3074 Control Register Table A.6 UNO-3074 Control RegisterRS-232 Standard Serial Port COM1~COM2 Table A.7 RS-232 Serial Port Pin AssignsEthernet RJ-45 Connector LAN1~LAN2 Table A.9 Ethernet RJ-45 Connector Pin AssignsRS-232/422/485 Serial Port COM3~COM4 Table A.8 RS-232/422/485 Serial Port Pin AssignsPower Screw Terminal PWR Table A.10 Power Connector Pin AssignmentsPS/2 Keyboard and Mouse Connector USB Connector USB1~USB4Table A.11 Keyboard & Mouse Connector Pins Table A.12 USB Connector Pin Assignments Table A.13 VGA Adaptor Cable Pin Assignmen Page Programming the Watchdog Timer Appendix B Programming the Watchdog Timer