background image

Documentation Number ATxWDT-1303

13

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

Chapter 4: SOFTWARE

The software shipped with the ATRWDT and ATXWDT includes

example software for Windows 3.11, Windows 95 and Windows NT
written for Borland C++ 5.01, Microsoft Visual C++ 4.0 and Microsoft
Visual BASIC 4.0. Also included is a Windows NT 4.0 device driver.

Windows NT and Windows 95

Windows NT restricts access to the I/O ports of the computer to

device drivers, so a simple OUT command cannot be used to
communicate with the watchdog timer. A device driver, for use with
Windows NT 4.0 or later, is included with the watchdog timer
software to allow access to the watchdog timer under Windows NT.
A dynamic-link library (DLL) is included to hide the details of
communicating with this device driver. These commands are
explained in the Command Reference section of this chapter.

Windows 95 is less restrictive than Windows NT on the access

of the computer’s I/O ports. A simple

OUTP

command can be used in

Borland C++ or Microsoft Visual C++ to communicate with the
watchdog timer. However, using the DLL will allow the same
program to run under both Windows 95 and Windows NT. Visual
BASIC does not have a command to access the I/O ports of the
computer, so the DLL must be used. A Visual BASIC program must
include definitions for the routines in the DLL in order to call them.
The file, PCWDT.BAS, contains definitions for these function and
can be included in the Visual BASIC project by selecting A

DD

F

ILE

under the F

ILE

menu.

In a Borland C++ or Microsoft Visual C++ program, each module

calling the watchdog timer routines must include the file, PCWDT.H.
This file contains the definitions for the functions in the DLL. The file,
BBPCWDT.LIB, must be included in the project to inform the linker
that it is using a DLL. Note that the BBPCWDT.LIB file for Borland
C++ and Microsoft Visual C++ are not the same, so they are not
interchangeable. A console mode program, written in C, is provided
to demonstrate the use of the DLL functions. Both Borland C++ and
Microsoft Visual C++ project files are included to make it easier to
recompile the example program. The file, MKIMPLIB.BAT, is
provided as an example of how to create the import library,
BBPCWDT.LIB. It may be necessary to recreate the import library if
the application is not compiled with Borland C++ version 5.01 or
Microsoft Visual C++ version 4.0.

Содержание PC Watchdog Timer Card ATRWDT

Страница 1: ...A of domestic and imported parts by International Headquarters B B Electronics Mfg Co Inc 707 Dayton Road P O Box 1040 Ottawa IL 61350 USA Phone 815 433 5100 General Fax 815 433 5105 Home Page www bb...

Страница 2: ...ELAY SETUP 5 INSTALLATION 5 CONNECTING THE ATRWDT MOTHERBOARD RESET OPTION 6 CONNECTING THE ATX RESET OPTION FOR THE ATXWDT 7 INSTALLING THE SOFTWARE 7 CHAPTER 3 OPERATION 9 COMMUNICATING WITH THE WDT...

Страница 3: ...rboard to reset the computer where as the ATXWDT uses the ATX power supply to turn off the computer then turn it back on 10 seconds later A form C relay output is also provided on both models to reset...

Страница 4: ...be in perfect electrical and mechanical condition upon receipt Remove the card from its protective packaging Handle the card only by its edges being careful not to touch the gold connection fingers Sa...

Страница 5: ...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 Figur...

Страница 6: ...it is important that no other device in the host computer use that address Table 2 is a list of frequently unused I O addresses In most cases the WDT can be set to one of these addresses Table 2 Freq...

Страница 7: ...ent the switch address 1 s represent an OFF switch 0 s represent an ON switch Relay Setup The jumper labeled RELAY NORMALLY provides two ways for the external reset to be configured With the jumper in...

Страница 8: ...T switch to reboot the host computer The polarity of the RESET JMPR is indicated on the ATRWDT PCB but in most cases not on the motherboard or reset switch If you are unsure of how to connect the ATRW...

Страница 9: ...onnector to disconnect the power cable from the motherboard 3 Set the Jumper to ON OFF or ALWAYS ON 4 Plug the 20 pin connector of the jumper wire into the motherboard s power connector 5 Plug the 3 p...

Страница 10: ...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 contains a historic description of the product Th...

Страница 11: ...ned off The remaining three bits of the latch are used to select one of eight timeout periods Table 3 shows the possible timeouts To use the WDT from your program the latch value corresponding to the...

Страница 12: ...bit is the reset flag It will be a 1 when the ATRWDT resets the computer and a 0 if the computer has not been reset by the ATRWDT This bit will be cleared if the computer is turned off or after the b...

Страница 13: ...1303 11 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 79244...

Страница 14: ...crosoft Visual C to communicate with the watchdog timer However using the DLL will allow the same program to run under both Windows 95 and Windows NT Visual BASIC does not have a command to access the...

Страница 15: ...immediately but any program that is using the watchdog timer when the change is made must be restarted for the changes to take effect Disk Caching Both Windows NT and Windows 95 use disk caching to sp...

Страница 16: ...arameter IoPortAddress The default value for IoPortAddress is 0x0200 hexadecimal 200 This value must match the settings of the jumper switches on the watchdog timer The format of the PCWDT INI file is...

Страница 17: ...ws NT version of this function establishes communications with the PCWDT device driver The Windows 3 11 95 version of this function just returns a handle that is used with the other functions in this...

Страница 18: ...BOOL BBPCWDT_Reset HANDLE hDev BYTE bResetValue BASIC Syntax Function BBPCWDTReset ByVal hDev As Long ByVal bResetValue As Byte As Byte Remarks hDev is the handle to the watchdog timer that was retur...

Страница 19: ...792445 BBPCWDT_ReadRegister Purpose Read the value of the reset register C Syntax BOOL BBPCWDT_ReadRegister HANDLE hDev BYTE value BASIC Syntax Function BBPCWDTShutdown ByVal hDev As Long value As Byt...

Страница 20: ...Class Machines 000 00F DMA controller 8237A 020 021 Interrupt controller 8259A 040 043 timer 8253 060 063 PPI 8255A 080 083 DMA page register 74LS612 0A0 0AF NMI non maskable interrupt 200 20F game po...

Страница 21: ...40 05F timer 8254 060 06F Keyboard 8042 070 07F NMI non maskable interrupt CMOS RAM 080 09F DMA page register 74LS612 0A0 0BF Interrupt controller 2 8259A 0C0 0DF DMA controller 2 8237A 0F0 0FF 80287...

Страница 22: ...R RESET INPUT jumper is in the CODE position PCWDTaddress H300 hex address chosen for the PCWDT LatchValue H7 hex latch value chosen in this case about a 16 second timeout Main loop of your program DO...

Страница 23: ...Appendix C Declaration of Conformity Statement DECLARATION OF CONFORMITY Manufacturer s Name B B Electronics Manufacturing Company Manufacturer s Address P O Box 1040 707 Dayton Road Ottawa IL 61350 U...

Отзывы: