Page 1 of 1

host software

Posted: Fri Dec 02, 2011 12:33 pm
by Peter Chaffe
Hi Guys new to this forum,,,

Did a good search of the forum but couldn't find much on windows host control software!
Ok I want to write a host gui program to control something, servo, or an led on/off would do...
That is a pc program (A switch or slider would do) to control an avr with on/off led or servo.

Nearly all the projects here send data from avr to host, I have built several of these successfully using v-usb and read up on some books, namely USB by example, that one had host code example in VB6 and C++, I tried the vb6 for starters but too many issues to describe here, although I'm still working on them.
USB Complete, looks an excellent reference book but well over the top for what I wanted to play with (basically slow speed hid, simple commands).

Can anyone point me to a tutorial example that actually works?
I see that Frank Zhao controls a servo from a pc, although I think he uses .NET which I would prefer not to use, although that's the type of thing I'm looking for...

If anyone else is interested then I don't mind sharing project info, full code etc, The experiment is only to further understand the basics of USB communication with avr's...

Re: host software

Posted: Fri Dec 02, 2011 2:22 pm
by Daid
There are quite a few examples of reading/writing data to USB-HID devices. To name an example, BootloadHID: http://www.obdev.at/products/vusb/bootloadhid.html

Re: host software

Posted: Fri Dec 02, 2011 10:27 pm
by Peter Chaffe
Thanks Daid,

Think I have enough info to proceed now!

Re: host software

Posted: Thu Dec 29, 2011 7:53 pm
by ardiansyah_mrit
you can use delphi to build a user interface for your GUI to control ON/OFF LED or other
that is very simple using libusb...

Re: host software

Posted: Fri Dec 30, 2011 12:24 am
by Peter Chaffe
Got a couple versions working now thanks!

Got IGOR Plug working but realised it is strictly 32bit only, so unless someone has the capability to update to 64bit then it looks like its obsolete!
LibUsb seems to be the system of choice, have it working on xp 32 bit and w7 64 bit.

Controlled the powerSwitch command line exe from a dialog, using various languages and it works (although admittedly a lousey approach)
Now trying to compile powerSwitch source in devC, compiling with no errors but a long list of linker errors...

Re: host software

Posted: Fri Dec 30, 2011 3:52 am
by ardiansyah_mrit
if you using usb to serial you can see igorplug as example, but if you want to make usb to other you can use delphi with libusb.pas as library of usb. it has include any you need, it support whith type transfer of usb like control tranfer or other..
it's easy to use.

Re: host software

Posted: Sat Dec 31, 2011 2:28 am
by Peter Chaffe
Thanks for the tip!
After a few hours trying, have got it up and running in Delphi...
just need to clean up the code a bit now!