Logo Banner

Velleman K8000 - [DriverLinx Driver]

K8000 and the DriverLinx PortIO Driver

Introduction

All K8000 software on my website is written in Visual Basic 5.0. You also need to install a driver called DriverLinx PortIO Driver. This driver provides a DLL that can access the hardware I/O ports.

Information

Unfortunately the K8000 DriverLinx PortIO Driver doesn't work on 64 bit versions of Windows.

Some K8000 history

When I first started coding for the Velleman K8000, the support by Velleman was limited. They provided a Visual Basic module (K8000.bas) with functions to access the K8000, and a DLL file called inpout32.dll. Unfortunately this DLL file only worked on Windows 95 or 98. It didn't work on higher versions (Windows 2000, NT, XP, ...).

The reason it didn't work was not a bug, but the way these system are handling the I/O (input/output) ports on your computer: Windows 95 and 98 allowed a direct access to these ports, but the higher versions of Windows have a strict control over these ports. No direct access is allowed from user mode applications: you need a device driver. These drivers have a higher I/O access level than user mode applications.

I started searching for an alternative and found the freeware DriverLinx PortIO Driver. This driver was a replacement for the inpout32.dll but there was a catch: I had to modify the complete K8000.bas module.

Using DriverLinx and the K8000.bas

The following steps should be taken to start a Visual Basic 5.0 project that uses the DriverLinx PortIO driver:

  1. download DriverLinx
  2. install DriverLinx by clicking the setup and following the instructions.
  3. download the modified visual basic k8000.bas module
  4. start a new "standard EXE" visual basic project
  5. add the module k8000.bas to your project

Now, you need to add some extra code to the Form's code window (see below). When you execute the project, I/O channel 1 will light up.

    Private Sub Form_Load()
      'call main routine in the k8000.bas module
      main
      
      'define I/O's as output, and set channel 1
      ConfigAllIOasOutput
      SetIOchannel 1
    End Sub
    

Nowadays Velleman support

In the present time, the K8000 comes with a K8D.DLL file. It contains all functions that were in the original K8000.bas file. This DLL file also works on the higher versions of Windows.

Actually the older solution has some advantages over this new K8D.DLL: You can easily alter the K8000.bas file to add support for other I2C chips. For example: you could connect a high-precision A/D converter to the I2C bus of your K8000 card. You only have to add a function in the K8000.bas to read this chip. This is not possible when you use the K8D.DLL solution.

I will not modify my existing K8000 applications to be used with the K8D.DLL file. There is no point in doing that, as the applications are written in a very old programming environment (Visual Basic 5).

Copyright ©1998-2017 Vanderhaegen Bart - last modified: August 24, 2013