Skip navigation links - Goto navigation bar

IOCTL in VVIO.sys

Table of contents - Design - Not only electronics - Mail - IT

VVIO.sys is a device driver for Windows NT, 2000 and Xp for simple use of hardware I have designed and published on http://www.vincenzov.net. This is first device driver I have written using Microsoft DDK and is part of VVIO project.

VVIO.sys is incompatible with Windows 95, 98 and Me but similar functions are provided by VVIO.dll.

Source code is available and you can use it as example in order to write your-own windows device driver. In order to do that task is required a suitable C compiler (only VisualC?), the windows DDK (download it free of charge from the MicroSoft site) and just a little time in order to read the documentation and to resolve some little problems.

VVIO_IOCTL_SLOWDOWN

Slow down I/O operation by adding un-useful write cycles; this function is required with high speed PCI LPT and slower external hardware as opto-isolated or I2C devices.

Output Buffer -
Input Buffer word16 default value "0" mean higher speed. "1" double I/O time, "2" treble  and so on. Higher value add others "wait states" and values over "3" should be too slow

VVIO_IOCTL_VERSION

Return device driver version

Output Buffer word16 Version: eight most significant bit (OutBuffer >> 8)
Revision: eight lest significant bit (OutBuffer & 0x00FF)
Input Buffer -

VVIO_IOCTL_MAX147_INIZIALIZABUS

Power-on mini-datalogger circuit and set-up some internal variables.

Output Buffer int16 If minor than 0, means error (see VVIOerror.h)
Input Buffer word16[0] LPT number (i.e. "1" for lpt1). Theoretical this should be a "random" number in 0... 5 range but this isn't a advisable choice
word16[1] LPT hardware address (i.e. 0x278, 0x378, 0xD000...)

VVIO_IOCTL_MAX147_GETDATA

Read a sample from a mini-datalogger channel.

Output Buffer int16 If in range 0 to 4095, value from ADC.
If minor than 0, error code (see VVIOerror.h)
Input Buffer word16[0] LPT number used with VVIO_IOCTL_MAX147_INIZIALIZABUS
word16[1] channel where read; values from 0 to 7

VVIO_IOCTL_MAX147_GETSAMPLES

Read eight samples from all mini-datalogger channels.

Output Buffer int16[0]...
int16[7]
If in range 0 to 4095, value from ADC.
If minor than 0, error code (see VVIOerror.h)
Input Buffer word16 LPT number used with VVIO_IOCTL_MAX147_INIZIALIZABUS

VVIO_IOCTL_4094_INIZIALIZE

Set up hardware and internal variables for a generic circuit based on iso-buffer.

Output Buffer int16 If minor than 0, means error (see VVIOerror.h)
Input Buffer word16[0] LPT number (i.e. "1" for lpt1). Theoretical this should be a "random" number in 0... 5 range but this isn't a advisable choice
word16[1] LPT hardware address (i.e. 0x278, 0x378, 0xD000...)

VVIO_IOCTL_4094_WRITE

Write a 16 bit word to a generic hardware based on iso-buffer.

Output Buffer int16 If minor than 0, means error (see VVIOerror.h)
Input Buffer word16[0] LPT number used with VVIO_IOCTL_4094_INIZIALIZE
word16[1] channel where to write data. Values from 1 to 6
word16[2] 16 bits data to write
word16[3] if equals to "1", function writes data immediately, otherwise only internal variables are updated ad effective write to hardware is delayed to next VVIO_IOCTL_4094_WRITE use. If no write to hardware is performed, execution speed is higher.

For samples about IOCTL use you can see VVIO.dll  code . This DLL is not required in order to use the device driver but, probably, your life will be easiest using it.

Before the use the driver it must be installed:


All the files in VVIO project are contained in VVIO.tgz compressed file.

license The use license
basicVVxx.x Source files
DLL\ The DLL for windows
SYS\ The device driver for windows NT / 2000 / XP

These circuits are supported from VVIO project:

The documentation is available to the following pages


IT - Home page - Table of contents - Privacy policy - E-mail

XHTML 1.0 Strict - CSS 3