THIS LIBRARY DOES NOT WORK WITH WINDOWS NT® AT THE PRESENT TIME (this includes Windows 2000, XP, 2003, Vista)
How to get it working
Copy the dll, iodll.dll to C:\WINDOWS\SYSTEM.
Open VisualBASIC® and create a new module. Insert the following as required:
If using a standard I/O board fitted to the ISA bus, use these:
Declare Function IOin Lib "iodll" Alias "ReadPort" (Port As Integer)
Declare Function IOout Lib "iodll" Alias "WritePort" (Port As Integer, OutByte As Integer)
If using an 8-bit parallel port device, use these:
Declare Function IOParin Lib "iodll" Alias "ReadPPortA" (Port As Integer)
Declare Function IOParout Lib "iodll" Alias "WritePPortA" (Port As Integer, OutByte As Integer)
The Long answer
The DLL supplied, iodll.dll, was written in C++ as this language provides the appropriate calls to allow direct I/O access. Windows NT® delibratly prevents user programs (i.e. applications written in VB or VC++ for that matter) from performing direct I/O access as spurious signals can cause a crash, damage data etc. Therefore this library will only work with Windows® 95/98.
By copying the file to C:\WINDOWS\SYSTEM, you allow all programs on your system to find the required DLL without the need to replicate the library into every directory for every program you make. It also allows you to easily update the file as required.
About the routines
There are four routines supplied. Two directly echo 16-bit I/O to the appropriate device, two send 8-bit I/O in succession to the parallel port, designed to interface with an/a Elecuter/Cool Vid standard parallel port device.
The "read" routines take digital input from the outside world; the "write" routines send digital data to the outside world. Using these routines, you can perform all required functions using your I/O tranceiver.
The Parallel Port I/O routines were initially built in VB software from the two basic routines, however by performing all functions in one C++ routine, overall speed is greatly increased.
The port is the system address that the CPU must use to select your I/O device. In the case of the parallel port, this is the BASE ADDRESS of your parallel port. This is the lowest number of the ADDRESS RANGE allocated to the parallel port. You can find out what this is using the System applet in Control Panel, selecting Device Manager, then looking under Resources from the "Printer Port" under Ports.
You can use Device Manager to allocate an I/O address to your ISA card too. Chose Computer (top) and select "Input/Output I/O" to find a gap. Then select the "Reserve Resources" tab and I/O again. Click add and select the lowest and highest addresses for your card. If you followed my example, you should reserve 0300 to 0303 for example as A1 and A0 are not used, your card can be accessed using any of these addresses (this is different from the parallel port device). In order to follow convention you should use 0300 for the first card, 0304 for the second and so on, but these are not always available. I currently use 0340-035F for my cards as my network card uses 0300-031F and my MIDI adaptor (part of sound card) 0330-0331. You may find yourself in a similar situation.
Install your card AFTER you have entered these details into device manager otherwise Windows® may allocate the I/O board addresses to another card which may prevent Windows® from starting.
After restarting your computer, copying the DLL and running VB, you can now access your card. In the port field, enter the address for the card, e.g. if it is at 0340, enter &H340 in the Port field. You must use the &H as these are hexdecimal numbers. If you do not, your system may crash (which is one reason why Windows NT® bans such spurious I/O activity!).
Thank you for using Elecuter products. Please use the feedback form on the web site (www.elecuter.co.uk) and tell us what you think.
Trademarks are the property of their respective owner.