Velleman support
BlitzMax Forums/BlitzMax Programming/Velleman support
| ||
| I have just added code to support the velleman vm110 usb interface board. http://www.maplin.co.uk/Module.aspx?C=Newsletter&U=06P11-2toys&ModuleNo=42857&T=461694 Specifications: 5 digital inputs (0= ground, 1= open) (on board test buttons provided) 2 analogue inputs with attenuation and amplification option (internal test +5V provided) 8 digital open collector output switches (max. 50V/100mA) (on board LED indication) 2 analogue outputs 0 to 5V, output resistance 1K5Ω PWM 0 to 100% open collector outputs max 100mA/40V (on board LED indication) General conversion time 20ms per command Power supply through USB approx. 70mA Dimensions 145 x 88 x 20mm Diagnostic software with DLL included
Global DllHandle:Int=LoadLibraryA("K8055D_C.DLL")
Global ClearAllAnalog()"Win32"=GetProcAddress( DllHandle, "_ClearAllAnalog@0" )
Global ClearAllDigital()"Win32"=GetProcAddress( DllHandle, "_ClearAllDigital@0" )
Global ClearAnalogChannel( Channel:Int )"Win32"=GetProcAddress( DllHandle,"_ClearAnalogChannel@4" )
Global ClearDigitalChannel( Channel:Int )"Win32"=GetProcAddress( DllHandle,"_ClearDigitalChannel@4" )
Global CloseDevice()"Win32"=GetProcAddress( DllHandle, "_CloseDevice@0" )
Global OpenDevice:Int( CardAddress:Int )"Win32"=GetProcAddress( DllHandle, "_OpenDevice@4" )
Global OutputAllAnalog( Data1:Int , Data2:Int )"Win32"=GetProcAddress( DllHandle,"_OutputAllAnalog@8" )
Global OutputAnalogChannel( Channel:Int , Data:Int )"Win32"=GetProcAddress( DllHandle,"_OutputAnalogChannel@8" )
Global ReadAllAnalog( Data1:Int Ptr, Data2:Int Ptr )"Win32"=GetProcAddress( DllHandle,"_ReadAllAnalog@8" )
Global ReadAllDigital:Int()"Win32" = GetProcAddress( DllHandle,"_ReadAllDigital@0" )
Global ReadAnalogChannel:Int( Channel:Int )"Win32"=GetProcAddress( DllHandle,"_ReadAnalogChannel@4" )
Global ReadCounter:Int( CounterNr:Int )"Win32"=GetProcAddress( DllHandle,"_ReadCounter@4" )
Global ReadDigitalChannel:Int( Channel:Int )"Win32"=GetProcAddress( DllHandle,"_ReadDigitalChannel@4" )
Global ResetCounter( CounterNr:Int )"Win32"=GetProcAddress( DllHandle,"_ResetCounter@4" )
Global SearchDevices:Int()"Win32"=GetProcAddress( DllHandle, "_SearchDevices@0" )
Global SetAllAnalog()"Win32"=GetProcAddress( DllHandle,"_SetAllAnalog@0" )
Global SetAllDigital()"Win32"=GetProcAddress( DllHandle,"_SetAllDigital@0" )
Global SetAnalogChannel( Channel:Int )"Win32"=GetProcAddress( DllHandle,"_SetAnalogChannel@4" )
Global SetCounterDebounceTime( CounterNr:Int, DebounceTime:Int )"Win32"=GetProcAddress( DllHandle,"_SetCounterDebounceTime@8" )
Global SetCurrentDevice:Int( CardAddress:Int )"Win32"=GetProcAddress( DllHandle, "_SetCurrentDevice@4" )
Global SetDigitalChannel( Channel:Int )"Win32"=GetProcAddress( DllHandle,"_SetDigitalChannel@4" )
Global Version()"Win32"=GetProcAddress( DllHandle,"_Version@0" )
Global WriteAllDigital( Data:Int )"Win32"=GetProcAddress( DllHandle,"_WriteAllDigital@4")
|
| ||
| Looks useful, thanks Nigel! I have a couple questions. Does the "20ms conversion time between commands" mean that I can only sample data every 20 milliseconds? Also, (and I guess this relates to the first question) do you know what the max frequency of the analog input is? I'm looking for a device like this with a high frequency analog input (possibly up to 40Khz). |
| ||
| @TeaVirus, I believe the 20ms refers to the time taken for the device to recognise the command. You could email info@... for more info or check out his website for more info: http://www.re-applications.be/ You dont say what sort of ADC you are looking for how many channels etc.. this can affect the sample rat. |