Logo Banner

Velleman K8000 - [NT programming]

Using the K8000 on Windows NT/XP/VISTA/7

Here is the problem: the standard DLL files that comes with the K8000 aren't working on Windows NT/2000/XP/Vista. This basically means your card is useless under one of these platforms: trying to run a K8000-based program would just result in a crash of the software.

Cause of the problems

Actually the problem is not really caused by a bug. It is caused by the way a NT-based Windows handles the computer's I/O ports: Under older versions of Windows, say Windows 95, all ports could be accessed without restrictions. Unfortunately NT based systems have a very strict control over its ports.

To be able to control ports you need a device driver: they have a higher access level than standard applications. You could try to write your own driver but this is rather complicated.

The cause of your problems is not really a bug, it's just the way NT handles the I/O (input/output) ports. Where you can access all ports under Windows 98, Windows NT has a strict control over its I/O ports. You need to write a device driver, if you want to access I/O ports (because device drivers have a higher I/O access level than user mode applications). I tried finding more information on writing my own device driver, but it turned out nowhere. So, were there any existing device drivers?

Are there existing drivers?

I did some research on device drivers. First I discovered the 'NTPort Library', a driver that is created by ZealSoft. It works great but it isn't free. So I searched a little further to see if there are no free alternatives. Luckily there are! I discovered a site with the "DriverLinx PortIO Driver". This driver is completely free and has no restrictions on the usage. It needs to be installed through a setup wizard.

Starting to use DriverLinx

To get DriverLinx working for my K8000 the K8000 library had to be adapted. This required some serious modifications to the original VB code. Not all of the existing code has to be modified: only the code inside the K8000.bas (for VB projects) library. I have ported the old library from Velleman into a DriverLinx-compatible library. Download the k8000.bas.

Implementing DriverLinx to your applications

The following steps should be taken to start a K8000 project that uses the DriverLinx PortIO driver.

  1. download DriverLinx
  2. install DriverLinx by clicking the setup and following the instructions. rebooting can be needed!
  3. download the modified visual basic 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
    

Game Over

Unfortunately a new problem arose: DriverLinx is a 32-bit driver. Many new computers uses a 64-bit operating system: DriverLinx doesn't work on it. The developer of DriverLinx has no plans to build a 64-bit driver. I found the paying ZealSoft driver I tried before is 64-bit compatible. It cost only 35$ but I am not going to pay money for it as I rarely use my K8000 nowadays.

Copyright ©1998-2012 Vanderhaegen Bart - last modified: August 28, 2011