B&B Electronics ATRWDT, ATXWDT manual Operation Communicating with the WDT

Page 11

Chapter 3: OPERATION

Communicating with the WDT

The WDT uses a four-bit latch to start and stop the timers and set the timeout period.

Regardless of the mode of operation of the WDT, a "1" must be written to the least significant bit of the latch to start the timers. Writing a "0" to the least significant bit of the latch at any time will stop the timers. Note that since the least significant bit is used to start and stop the counters, any even number written to the latch will result in the counters being turned off.

The remaining three bits of the latch are used to select one of eight timeout periods. Table 3 shows the possible timeouts.

Table 3. WDT Timeouts

Binary

Hex

Approximate

Latch

Latch

Timeout

Value

Value

(seconds)

0001

1

0.5

0011

3

2

0101

5

6

0111

7

14

1001

9

30

1011

B

126

1101

D

254

1111

F

510

To use the WDT from your program, the latch value corresponding to the desired timeout must be periodically written to the latch. After the counters are started, they are reset every time the WDT is addressed. As long as the WDT is addressed before the end of the selected timeout period, no reset will occur. To do this from a BASIC program, place an OUT <WDT address>, <latch value> somewhere in a reoccurring loop. Each time the OUT statement is executed, the WDT counters are reset and begin counting again. To disable the WDT, place an OUT <WDT address>, <0> in your program. Be certain that this statement is executed whenever your program is terminated.

Documentation Number ATxWDT-1303

9

B&B Electronics Mfg Co – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104 B&B Electronics Ltd – Westlink Comm. Pk – Oranmore, Galway, Ireland – Ph +353 91-792444 – Fax +353 91-792445

Image 11
Contents PC Watchdog Timer Card CE Table of Contents General Information Introduction FeaturesSpecifications Address Switch Setup Setup and Installation InspectionATRWDT/ATXWDT PCB Silk Screen 200 Address Switches S1 Position BusWeight Hex Weight Connection DecimalInstallation Relay SetupConnecting the Atrwdt Motherboard Reset Option Installing the Software Connecting the ATX Reset Option for the AtxwdtDocumentation Number ATxWDT-1303 Operation Communicating with the WDT Registers PinoutsOutput Schematic Windows NT and Windows SoftwareExisting DOS Programs WindowsChanging the I/O Port Address Disk CachingParameters IoPortAddress=0x0200 IoPortCount=0x0001 BBPCWDTShutdown Command ReferenceBBPCWDTStartup Value hex Timeout BBPCWDTResetAs Long, value As Byte As Byte BBPCWDTReadRegisterBool BBPCWDTReadRegisterHANDLE hDev BYTE* valueSdlc Appendix a Hardware I/O MapsParallel printer on monochrome adapter Map of AT Class MachinesDo While INKEY$ = Appendix B QuickBASIC ExampleDeclaration of Conformity Appendix C Declaration of Conformity Statement