Where to go from here
Erik Friesen
Posts: 1,071
Here is my delimma. For the past 6 months or so in my off time I have been working with designing a handheld construction data input device. I have spent a bit of time getting the propeller to do HID class USB based on BradC's work. Suddenly I realize the pid/vid pairs are no longer available to buy. Some may say, "use ftdi". That is not a direction I wish to take for ease of use, price, and install reasons.
My project uses about 80 percent of the 32k eeprom. I am using a 128x64 lcd, quantum touch chip, a pic16f688, a 4k fram and a 64k eeprom. I need to be able to store about 32 projects that are 256 bytes each. I don't need floating point but I need to work with numbers that can range to 16bits and above.
Supposing I migrate to a PIC, what line do you suppose could do the above reasonably?
Would converting the code be a mountain?
How about writing an entire project, including usb, in assembly?
Supposing I stick with the prop, what are the chances that parallax would ever jump on the usb thing?( with a vid/pid program like microchips ) (based on veiled references to usb capabilities)
My project uses about 80 percent of the 32k eeprom. I am using a 128x64 lcd, quantum touch chip, a pic16f688, a 4k fram and a 64k eeprom. I need to be able to store about 32 projects that are 256 bytes each. I don't need floating point but I need to work with numbers that can range to 16bits and above.
Supposing I migrate to a PIC, what line do you suppose could do the above reasonably?
Would converting the code be a mountain?
How about writing an entire project, including usb, in assembly?
Supposing I stick with the prop, what are the chances that parallax would ever jump on the usb thing?( with a vid/pid program like microchips ) (based on veiled references to usb capabilities)
Comments
If it's a commercial product the cost of an official VID doesn't seem that prohibitive ($2K), especially compared to the cost and effort of moving to Microchip having gone this far.
Plus, if no one else is selling PID/VID blocks; there's an opportunity for you to do so.
did you ask this company ?
www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&category_id=20&option=com_phpshop&Itemid=1
best regards
Stefan
No, there isn't. The reason nobody is selling them anymore is it contravenes the terms in which they license you a block. They have leant on everyone who _was_ selling them and they've all gone quiet.
The only way it is legit for you to sublicense blocks is if you write a USB stack, then you can sell a PID with a copy of your stack.
They do this with the AVR usb stack and seem to get away with it.
(I did manage to get 5 before they put a stop to it all though, so when I'm done with the stuff I'm working on I'll get back to the USB thing)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
I don't know much about USB-Drivers.
In my former job i came across this software
www.jungo.com/st/windriver_usb_pci_driver_development_software.html
with which it seems to be easy to create your own USB-driver (USB-stack ?)
2000 Dollars are quite a lot. I Don't know the prices of this software.
And I'm curious about what is the reason that an FTDI-Chip is NOT a way to go for you ?
You wrote something about a HID-device. I would like to know what it does and how it works.
If this questions are to private or this is your buisness-secret - of course - I accept if you say nothing about it
best regards
Stefan
Perhaps you could switch the PIC16F88 for one of th PIC18s with USB and use that as a USB interface chip? Then you would have the benefit of it being USB Full Speed (11mbit) instead of low speed (1.5mbit), and you would be compliant with the specs (Remember that BradC's driver is noncompliant). Also, Microchip have a PID sublicensing program for people using their chips.
2 Very valid points.. Yep, my driver exceeds timing specifications (it's actually far more compliant than any other uC software stack out there, but none the less its not compliant), and yep if you use a PIC you can license a PID for cheaps..
the mcselec link is still live, why not just get in there and buy some up before they shut it down [noparse];)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
I have considered that. It is not a bad idea. It would mean a major reshuffling on my pcb however.
I am still tempting myself with a single chip solution.
I'll answer part of your question with a question. How many people do you see on this website asking for assistance with their programmers that aren't working because of some obscure driver reason? Does the typical construction guy have the experience that the beginner propeller user has?
When you plug in a keyboard or a mouse it works with no headaches. It is an HID class usb device. For my device to work on your computer you only need two things. My program.exe, and my device. Thats it. No outside drivers to load.
hm - if it just needs Program.EXE why not using a standard USB-2-RS232 adapter ?
This adapter will have USB PID/VID.
something like this
elmicro.com/de/ft232r.html
or any kind of plug with USB and DSUB9-connector
First I thought it should work with ANY kind of application like a mouse
With the standard USB-2-RS232 adapter the Program.EXE checks the virtual COM-Port
and the delivering of the devicedata to the Windows-Application
is managed by Program.EXE via sending windows-messages
best regards
Stefan
It would be easy enough to test out. You may even be able to get some advice and information from FTDI since it's in their best interest for their chip to work in simple circumstances without their custom driver.
$2.50 a pop for a microchip 2550 isn't too bad though. I think a person could whip up a serial to Hid pretty quick.
I may be misunderstanding the above but I meant my own vb program.
Once you get a taste of the HID though you don't feel like going back because of the ease of transferring data.
yes of course your own VB program
I'm not familiar with VB. I used to code in delphi.
With delphi it is no problem at all to send from one application to another things like
"move mouse 324 steps up 500 steps left"
"doubleclick left mousebutton"
"send keyboard-character "Z"
and there are even several ways to do this with different priorities and different paths along message-cues
VB is a microsoft-programming language and I guess it should be able to use all bugs - oh oops i wanted to say FEATURES of windows
including sending keyboard and mouse eventmessages
best regards
Stefan
so where is the problem to use a serial connection with a standard USB-2-serial adapter ?
Stefan
Another thing is that I am wanting to charge my batteries from the usb port. There are certain protocols that need to be followed that typical usb2serials don't take care of.
With a VB application???
It may have changed in newer versions, but I had so much problems to release a working .EXE made with VB5, that I gave up to program in VB. On every computer which I tried some other DLLs were wrong or missed, this OCX conflicts with an already installed, a new DLL overwrites an older an another Application does not work anymore, and so on...
Installing an USB driver is a childsplay for a user, compared with a VB application. You put in the USB device, Windows search for a driver, you direct it to the INF file, and that was it.
Andy
Have you tried installing an unsigned *.inf lately?
It may be showing my ignorance here but when does a *.exe require a dll?
Which language are you using, Ariba?
I think PowerBasic and RealBasic have a similar concept, but I don't really know theme.
About DLLs: these are dynamic function Libraries, and some VB functions and Controls use theme instead of including static libraries into the EXE. In VB5, if you include a Fileselect dialogue, then you need the CMDIALOG.OCX which accesses functions of the CMDIALOG.DLL (names are not exact). When you develope the program you have all this files installed with the IDE. But on other computers they can be missed, and if you install theme, they can overwrite earlier or later versions.
But with VB.NET it's different. I think all the library functions are in the NET-framework. But is this better? The user of your application needs to install the .NET framework, and certainly the right version...
>"Have you tried installing an unsigned *.inf lately?"
Only on XP, and yes, unexperienced users may be scared by the Warnings. Don't know how it is on VISTA.
Andy
Most VB's need MSVBVMxx.DLL, MSVCRT.DLL and a whole host of others, VB .Net / Express needs
the .Net framework, usually 2.0, sometimes 1.0 and I expect 3.0 and 3.5 will become prevalent.
Then there's any .OCX's plus DLL's etc which they may require.
I've not had many problems when delivering VB6 appliactions as proper Setup.Exe installations
but it takes effort to get it right and the problems Ariba highlight are always lurking around a
corner. Ship an application .Exe file by itself and hope a system has all the prerequisites and
expect a flood of complaints and reports of less than useful error messages.
Take Paxis's PropViewer which should have worked out of the box but had problems on some
systems. That's not criticism, that's just what happens and it's hard to test for all possible end-user
configurations.
I haven't got as far as setting up a setup.exe but when I do I'll send my dad (who operates a computer repair shop in north CA) a copy and let him try it on a few machines.
How do these programs access the input and output reports from an HID Ariba?
Post Edited (Erik Friesen) : 9/15/2008 2:56:32 PM GMT
Wikipedia doesn't either.
I'm glad I don't have this problem[noparse]:)[/noparse]
What I have gleaned from this is that I can't just buy a PID/VID and tell you guys not to worry about it... if you need it I have it...right?
Rich
That's as good as reason as any and a lot better than some.. There are other languages which
don't require .DLL or .OCX and are completely self-contained .EXE files, but if they don't allow
you to do what you need to do then they aren't really much use. They're also no longer entirely
self-contained as soon as one accesses the Windows API which I expect any USB utilising code
will have to.
I use PowerBasic PB/CC for command line utilities but never got to grips with the Windows
version and still prefer VB6. I love the idea of .Net but hate VB .Net, it just makes things which
were so easy so hard. I could buckle down and learn it ( or C# ) but I cannot find the will power
to do that - and the VB6 to VB .Net converter works fine as long as one designs with that step in
mind.
Not entirely sure Jan would like being referred to as "Mr"..[noparse];)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
VB.net is frustrating because of the seemingly obscure reasons why what works here won't work there if the variables aren't set up perfectly. The ease of manipulating bytes words and longs is not available to you along with other issues. However the ease of setting up your graphical interface is nice.
Let me rephrase that.. Jan .. no better still
http://www.spock.com/Jan-Axelson
[noparse]:)[/noparse]
I've done my USB stuff in ObjectPascal. That way I can run it on Windows, Linux and MacOS. I had to set up a separate interface class for windows (little pain for lots of gain), but doing it this way means all my stuff is already cross platform. No .inf required [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
I used LIBUSB for communication with USB devices, but only rudimentary. The nice thing is that LIBUSB exists for Windows and Linux, and you have only a little DLL to include. I think also HID shoud be possible with LIBUSB.
Andy
LibUSB is how I do HID on Linux and MacOS. I avoided it on Windows as I could use the native API and not have to install the LibUSB driver (thus having to write the interface class for Windows HID).
I've been playing with the native HID layer on MacOS, but it's just not very flexible.
Most Linux distros have LibUSB installed by default, so it's a bit of a no-brainer provided you have your udev permissions set up correctly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!