• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

How to write data with HID

Started by TRudolphi, October 03, 2008, 12:24:56 pm

Previous topic - Next topic

TRudolphi

I have the Demo version of nrComm and want to read / write data to my PIC
HID device. I tried with success the hiddemo example but I cannot figure out
how to write data to my PIC circuit. :'(

Could you give an example how to write some data?

Thanks

Roman Novgorodov

Hello

You can use the following method:

TnrHID.WriteReport(Buffer, Sz);

where Buffer is pointer to byte array and Sz is size of this array.
The first byte of array should contain the ID of report.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

Microvision

First of all thanks to Roman Novgorodov for the good work on nrComm Lib, keep up the god spirit!

I'm planning on using the nrComm Lib in an borland or CodeGear application using USB communication with a USB HID device.
In my seatrch on the web I have found the following helpful links:

Info on USB (and HID):
The reference: http://www.lvr.com/hidpage.htm
The overview: http://www.usbmadesimple.co.uk/index.html

Info on a hardware USB HID device (including source C code):
As USB HID device I’m using: Keil MCBSTM32 evaluation board, for info: http://www.keil.com/arm/mcbstm32/
I run the Keil MCBSTM32 HID demo firmware on the evaluation board, for info: http://www.keil.com/download/docs/361.asp 

Info on a PC (Win XP, CodeGear C++) HID client application:
Take a look at the source code:
Project: usbhidioc.cpp
Version: 2.0
Date: 12/20/00
by Jan Axelson (jan@lvr.com)
It can be found at:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1960 or http://www.lvr.com/files/
Some of the early releases are written for Borland C++ Version 6 and some later releases for Visual C++

For testing and sniffing your USB client app. take a look at: http://www.lvr.com/hidpage.htm and look for the work of: Robert Marquardt (HIDTEST (including source (Delphi)) and SimpleHIDWrite).

I thing the learning curve for USB is a little step but after a couple of days of hard work I begin to see the light.

Good luck coding

Cheers
Microvision


Roman Novgorodov

Hello

Thank you for detail information.
We are using MSDN and DDK information in our job generally.
I hope it will be useful for us and all guys who develop the HID solutions.

And thanks for warm words :-)

Roman
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

beck6

Hello, I have a similar problem with the USB circuit. Can you solve it now?