Shop OBEX P1 Docs P2 Docs Learn Events
Where to go from here — Parallax Forums

Where to go from here

Erik FriesenErik Friesen Posts: 1,071
edited 2008-09-15 15:16 in Propeller 1
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)

Comments

  • hippyhippy Posts: 1,981
    edited 2008-09-13 21:23
    Are VID/PID really not available individual or in small blocks these days ?

    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.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-09-14 02:20
    As near as I can tell the USB forum has put a stop to this practice. It is a grief of mind to me because not long ago they were still available. I know I could cough up $2000 but without knowing the market potential of my invention I hesitate.
  • BradCBradC Posts: 2,601
    edited 2008-09-14 06:22
    hippy said...
    Are VID/PID really not available individual or in small blocks these days ?

    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.

    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!
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-09-14 07:20
    hello,

    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
  • OwenSOwenS Posts: 173
    edited 2008-09-14 10:45
    Erik,

    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.
  • BradCBradC Posts: 2,601
    edited 2008-09-14 10:51
    OwenS said...
    Erik,

    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!
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-09-14 21:14
    I think Ill try the mcs.

    OwenS said...
    Perhaps you could switch the PIC16F88 for one of th PIC18s with USB and use that as a USB interface chip?

    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.
    StephanL38 said...
    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.

    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.
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-09-14 21:43
    Hello Erik,

    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
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-14 21:45
    On the other hand, the main reasons people have trouble with USB to serial adapters is that Parallax uses the handshake lines and has fairly tight timing of the serial data. I think you'll find that the default Windows drivers will work well enough if you don't use the handshake lines, just serial receive and transmit and if you keep the timing fairly loose.

    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.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-09-14 21:55
    If ftdi had a hid chip Id consider it. As it is they still require an inf file I think.

    $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.
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-09-14 22:29
    Hello Erik,

    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 wink.gif of windows
    including sending keyboard and mouse eventmessages

    best regards

    Stefan
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-09-14 22:45
    It is actually easier than that because once you set up your buffers you simply send or receive them and the buffers are synced between computer and device. There is no mouse or keyboard interaction. You are only using the hid driver to get and receive the info. If you want windows to see the device like a keyboard or mouse you have to put that into the descriptors.
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-09-14 23:01
    aha,

    so where is the problem to use a serial connection with a standard USB-2-serial adapter ?

    Stefan
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-09-14 23:11
    All cdc class drivers have to have external driver files. I want absolutely no problems, and ease of use. Plus, pennys quickly add up in a project in a way that is suprising.

    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.
  • AribaAriba Posts: 2,687
    edited 2008-09-15 00:04
    Erik Friesen said...
    ... I want absolutely no problems, and ease of use ...

    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
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-09-15 00:28
    I am using the free vb.net. I haven't tried it on other computers so it may be you are right. On mine it works just fine.

    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?
  • AribaAriba Posts: 2,687
    edited 2008-09-15 01:31
    I use PureBasic now. It is not as easy as VB to program, but it produces very little and fast applications without any runtime or framework . And there are versions for Windows, Linux and MacOS (but programming platform independent is not as easy as it should be).
    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
  • hippyhippy Posts: 1,981
    edited 2008-09-15 01:34
    Erik Friesen said...
    It may be showing my ignorance here but when does a *.exe require a dll?

    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.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-09-15 02:05
    I do appreciate you all cluing me in on these issues. I tend to program in phases and don't always look into all these details at first. This is actually my first visual programming experience. The main reason I chose visual basic was because Mr. Jan Axelson has prewritten routines for the HID class that are easy to integrate. I'm not real keen on the .net framework needing to be installed.

    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
  • rjo_rjo_ Posts: 1,825
    edited 2008-09-15 02:57
    I have dutifully read this entire thread and can duly report that I don't have a clue what you guys are talking about...

    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
  • hippyhippy Posts: 1,981
    edited 2008-09-15 04:39
    Erik Friesen said...
    The main reason I chose visual basic was because Mr. Axelson has prewritten routines for the HID class that are easy to integrate.

    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.
  • BradCBradC Posts: 2,601
    edited 2008-09-15 11:25
    Erik Friesen said...
    because Mr. Axelson

    Not entirely sure Jan would like being referred to as "Mr"..[noparse];)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Pull my finger!
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-09-15 11:38
    Couldn't remember his first name as of writing that[noparse]:)[/noparse]

    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.
  • BradCBradC Posts: 2,601
    edited 2008-09-15 14:00
    Erik Friesen said...
    Couldn't remember his first name as of writing that[noparse]:)[/noparse]

    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!
  • AribaAriba Posts: 2,687
    edited 2008-09-15 14:43
    I have no experience with HID. In PureBasic you have direct access to all Windows-API functions, and you can load DLLS and work with their functions. So if you find a DLL which provides HID access, you can use this, else you need to program it by yourself with API functions (very hard).
    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
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-09-15 14:50
    Whoops. Hats off to a lady that can write a book like that.
  • BradCBradC Posts: 2,601
    edited 2008-09-15 15:16
    Ariba said...
    I have no experience with HID. In PureBasic you have direct access to all Windows-API functions, and you can load DLLS and work with their functions. So if you find a DLL which provides HID access, you can use this, else you need to program it by yourself with API functions (very hard).
    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!
Sign In or Register to comment.