HID_Data with Delphi...

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
dzairo
Rank 1
Rank 1
Posts: 35
Joined: Wed Sep 22, 2010 3:31 pm

HID_Data with Delphi...

Post by dzairo » Sun Oct 24, 2010 11:48 am

Hi all.
I read this post http://forums.obdev.at/viewtopic.php?f=8&t=3748 where some user iphi write so have
worked HID_data demo with Delphi.
Have any one this source or can contact me iphi sevc @ post at sk .
I'm too interesting to use any HID project with Delhi
I create project for UART-CDC project - read RFID chip, use small I2C LCD and some button . for control use standard serial port (after install driver) set speed 600bps and work.
But I want make own application with out of install driver ..

regards

dzairo
Rank 1
Rank 1
Posts: 35
Joined: Wed Sep 22, 2010 3:31 pm

Re: HID_Data with Delphi...

Post by dzairo » Wed Oct 27, 2010 8:17 pm

no one use delphi with Hid?
help pls with this
regarst

maxi
Rank 3
Rank 3
Posts: 122
Joined: Fri Jul 24, 2009 6:13 pm

Re: HID_Data with Delphi...

Post by maxi » Wed Oct 27, 2010 10:04 pm

Perhaps you will get a better reply on the Delphi forums. Working example code has been provided which can be compiled under MinGW or even MSVC (with a few tweaks). The biggest problem I think you will face is finding a compatible version of the Driver Delevopment Kit (DDK) required to compile the HID-tool executable.

dzairo
Rank 1
Rank 1
Posts: 35
Joined: Wed Sep 22, 2010 3:31 pm

Re: HID_Data with Delphi...

Post by dzairo » Thu Oct 28, 2010 9:20 am

Hi maxi.
More user write on this forum so use any V-USB example with jvHidControllerClass for Delphi.
But no more information can find.
On jvHid is more example .
If use this example then can find and see information for all HID devices connected in System (VID , PID, serial number ...)
but how use it for read and write data in to MCU ????
If try example posted from this forum no one work good.
On this forum are users what can help but I don't have contact to send email. Just nick on this forum.
Maybe it's not hard just don't know from where start.

regards

maxi
Rank 3
Rank 3
Posts: 122
Joined: Fri Jul 24, 2009 6:13 pm

Re: HID_Data with Delphi...

Post by maxi » Thu Oct 28, 2010 10:45 pm

dzairo wrote:On jvHid is more example .
If use this example then can find and see information for all HID devices connected in System (VID , PID, serial number ...)
but how use it for read and write data in to MCU ????

Is there not also an example of how to read/write? I do not use Delphi myself nor do I have any knowledge of the jvHidController class but a quick google tells me it's part of the JEDI Visual Component Library http://jvcl.delphi-jedi.org/. Looks like it comes with plenty of examples and documentation. As far a the jvHid is concerned a v-usb hid device should behave the same as any other usb hid device.

dzairo
Rank 1
Rank 1
Posts: 35
Joined: Wed Sep 22, 2010 3:31 pm

Re: HID_Data with Delphi...

Post by dzairo » Fri Oct 29, 2010 9:43 am

maxi.
I use this component. if use any example then show you all HID device on system and if click on info button then show VID and PID number , serial number .... .
there is place for enter ID number report and button read and write and it's all. But how can I read data from mcu and send???
there just had not understood thing which is crucial in use, and here I do not know

regards

Valeron
Posts: 7
Joined: Wed Aug 11, 2010 6:04 am
Contact:

Re: HID_Data with Delphi...

Post by Valeron » Sat Oct 30, 2010 8:23 pm

on event "OnEnumerate"

Code: Select all

...
if (HidDev.Attributes.VendorID=VID) and (HidDev.Attributes.ProductID=PID) then begin
   Dev:=HidDev; //Global variable
   eDev.Text:=Dev.ProductName; //my label
   Dev.CheckOut;
 end;
...



on event "ButtonClick"

Code: Select all

var Raw:array[0..9] of byte; //length of Raw must be = Dev.Caps.OutputReportByteLength 
Writed:Cardinal;
...
if Dev=nil then exit;
Raw[0]:=$01; //Your Report ID, i use 0x01
Raw[1]:= ...... // your data
Raw[xx]:=...
Dev.WriteFile(Raw[0],Dev.Caps.OutputReportByteLength,Writed);
...

Dev.Caps.OutputReportByteLength - length of output report descriptor
Now I make an USB-application, if you have a questions, call ICQ 454817422

Post Reply