Creative Video Blaster II Driver
Introduction
This is the interesting bit of our code for interfacing a Mitsubishi M16C/62 microcontroller and a Video Blaster II. The code is pretty generic and is almost completely non platform-specific.
You can get it here.
Points
The camera documentation is vague in places. It also makes use of undefined (or at least as far as we could find) constant values which are only available in the various driver sources available.
Most of the data for developing this driver came from http://webcam.sourceforge.net.
The driver code here has simply been removed from our project, it is all in the correct order but will almost certainly not compile on its own - it is only for demonstration purposes.
The negative state of all the port names has been ignored. For example, the pin ACK is normally defined as being active low. In the code shown, if the macro ECP_ACK_ON is used then the line will go high (i.e. +5V). If the macro ECP_ACK_OFF is used then the line will go low (i.e. +0V). This applies to all pins.
Our camera was very sensitive to the power supply on our device. It crashed, pretty arbitrarily, on a regular basis. If it was given a clean power supply we couldn't make it crash at all. Most crashes could be solved by going back to low power mode and returning to high power.