EasyHID and USB for Newbies??


Closed Thread
Results 1 to 40 of 69

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    interfacing a PIC to a pc is still easy.. the main problem is still that you have to keep the connection by send data to PC every 10mSec or so. Not so much problem but in some case, it's a pain. some conventionnal PIC and a RS232 to USB ic is still cheap and save the day when timing is critical.

    But i'm still new in USB, there's so much things to learn before be comfortable with everything. Yeah it's more complicated than just USBIN, USBOUT, USBINIT, and USBSERVICE.. Jan Axelson's book is more than enough.

    I use Visual C++, Visual Basic 6 and , beurk Delphi, so i'd never use the VB Express as now, it should have what you need. Case not, i guess you can use the API or DLL (i don't remind) of HID maker and play 'round it.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172

    Default

    I had tried with VB Express but had quickly ditched it for VB6 from EBay. There were several things about VB Express; it lacks several features like Package Deployment which I require. I don't remember all the other reasons why I dropped it, but I "REALLY" didn't like it.

    Check out EBay for VB6, there were several cheap auctions for the academic versions of VB6. I ended up getting the full corporate version for just a bit more, with all the manuals and tutorials.


    Here's a NEW package for $125USD:
    http://cgi.ebay.ca/ws/eBayISAPI.dll?...m=160004563299

    This kit includes:
    *Microsoft Visual Basic 6.0 Learning Edition
    *Learn Microsoft Visual Basic 6.0 Now
    *Microsoft Visual Basic 6.0 step by step
    *Microsoft Visual Basic 6.0 Programmer's Guide
    *The MSDN Library on two CD-ROMs


    Some more learning editions:
    http://cgi.ebay.ca/ws/eBayISAPI.dll?...m=250004751173
    http://cgi.ebay.ca/ws/eBayISAPI.dll?...m=160005627793


    Here's a professional edition:
    http://cgi.ebay.ca/ws/eBayISAPI.dll?...m=300005730012

    The action includes:
    Microsoft Visual Basic 6.0 Professional Edition. One CD in Original Case.
    Microsoft Visual Studio 6.0 Service Pack 5.0 One CD in a jewled case.
    MS MSDN Libray-Visual Studio 6.0. 2 CDs in the original case.
    MS Visual Studio 6.0 PLUS PACK. 4 CDs in the original case.
    These are the full functional sets, not educational settings or demos.

    Good luck!

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    94

    Default Easy Hid Problems

    Hi,

    I suspect a lot of you that have posted on this thread are subscribed to it. I'm having problems with Easy HID and have posted a new subject. Obviously a lot of you guys have used it and I'm wondering what I'm doing wrong. Please chack my post out - it's driving me mad:

    http://www.picbasic.co.uk/forum/showthread.php?t=4304

    I am ONLY having problems with the PIC program on compile

    Thanks a lot

    Rob

  4. #4
    skimask's Avatar
    skimask Guest

    Default VB6 vs. VB Express

    I just got an started using VB Express. Yes, it's a bit different, but it works great. You do have to learn a new way of writing things, but it's "the new way of doing things" according to Micro$oft.

    If you use the "Upgrade Wizard", you can take your older VB6 type programs and import them into VB Express without much problem at all. VB Express uses a bunch of compatibility files to make it work with the old code just fine. Took me about 2 minutes to get an old serial port program with with VB Express...and the price was right too...
    JDG

  5. #5
    bigbear's Avatar
    bigbear Guest

    Default

    I am working to convert the VB file from easyHID to a REALBASIC file. I am almost there but need some help. Anyone here do anywork in realbasic? You can check out the thread here:

    http://forums.realsoftware.com/viewt...b170185ab69b24

    I will post the files for anyone who wants them when the conversion is done. Advantage of RB is it compiles into Windows, Mac OS, and Linix. Not sure if the app will work in non windows apps, but I'll find out. Looks like it should work.

  6. #6
    bigbear's Avatar
    bigbear Guest

    Default

    Also ordered free samples from microchip! Great deal!!!!!

  7. #7
    bigbear's Avatar
    bigbear Guest

    Default

    Do you guys recommend PicBasic or PIcbasic PRO? I know pro is better, but do I need it?

  8. #8
    Join Date
    Apr 2008
    Posts
    3

    Unhappy

    Like a lot of you I’m just starting to migrate some of my applications to USB. I’ve tried to us EasyHID to help me get started. I’ve read threw this post and it makes sense what I’m reading. My problem is that when I try to compile the PBP file it creates I get the compilation error

    ERROR: Macro USBINIT? not found in macro file.
    ERROR: Macro USBSERVICE? not found in macro file.
    ERROR: Macro USBIN?CBBL not found in macro file.
    ERROR: Macro USBOUT?CBBL not found in macro file.

    I’ve seen several posts’ that ask this question and I haven’t seen a good answer to what is causing it and how to fix it. I suspect it has to do with directory structure.

    I’m using MCSP 3.0.0.5 and PBP 2.47.
    PIC18F4550

    Please help,

  9. #9
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    94

    Default

    Hi mjwaldner,

    Using Microcode Studio, make sure you have the correct chip selected, 18F4550. The editor sometimes defaults to a different IC when you open it - this has caught me out a couple of times!

    Make sure that all the files that were generated by EasyHID are in the same folder as the file you are trying to compile - see attached image

    Let us know how you get on

    Cheers

    Rob
    Attached Images Attached Images  

  10. #10
    Join Date
    Apr 2008
    Posts
    3

    Red face

    Thanks Rob,
    I started over form scratch and it worked this time. I must have moved something to the wrong directory.
    My next question is. Should the computer recognize the USB device and try to install it automatically? I understand that I will need to work on the PC software to make it work but when I plug the USB cable into the PC nothing happens. It doesn’t try to install. I haven’t modified the software the Easy HID created. I just programmed it to the PIC 18F4550. Is there more code needed to initialize it.
    I’m just taking baby steps threw this. Any information is helpful.
    Thanks
    Matt

  11. #11
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    In case it have already worked and if you haven't change the PID, VID and all other settings, if you plug the device you're not going to have any bubbles on the task bar.

    If you want some, you'll need to uninstall the device. That's pretty easy to do with USBDeview
    http://www.nirsoft.net/utils/usb_devices_view.html
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  12. #12
    Join Date
    Apr 2008
    Posts
    3

    Default

    I found out what was going wrong. It was a hardware problem. I did not turn on the USB Voltage Regulator in the melabs programmer. So now my PC is recognizing the USB HID.
    The problem I’m having now is that I can’t seem to get any data from the PIC to the VB.Net application. My VB application is recognizing that the device is plugged in or unplugged but nothing else. The application never seems to jump into the OnRead event.
    I must be missing something. What tells the VB aplication to jump to the OnRead event?

    Any suggestions.
    Thanks,
    Matthew

    This is what I have.
    Code:
     
    VB.Net----------------------------------------------------------------
        '*****************************************************************
        ' on read event...
        '*****************************************************************
        Public Sub OnRead(ByVal pHandle As Integer)
    
            ' read the data (don't forget, pass the whole array)...
            If hidRead(pHandle, BufferIn(0)) Then
                ' ** YOUR CODE HERE **
                ' first byte is the report ID, e.g. BufferIn(0)
                ' the other bytes are the data from the microcontrolller...
                TextBox1.Text = Chr(Val(BufferIn(1)))
            End If
        End Sub
    
    PICB----------------------------------------------------------------------
    
    ' ************************************************************
    ' * main program loop - remember, you must keep the USB      *
    ' * connection alive with a call to USBService every couple  *
    ' * of milliseconds or so...                                 *
    ' ************************************************************
    usbinit ' initialise USB...
    ProgramStart: 
       gosub DoUSBIn
    USBBuffer(0)=32
    USBBuffer(1)=16
       gosub DoUSBOut
       goto ProgramStart

  13. #13
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    Comment out the GOSUB DoUSBIn and see if works better.

    I suggest you to have a look on USBDemo.
    http://www.picbasic.co.uk/forum/showthread.php?t=5418

    Maybe this one too
    http://www.picbasic.co.uk/forum/showthread.php?t=6463&
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  2. EasyHID max usb buffer size
    By jizyjuice in forum USB
    Replies: 4
    Last Post: - 29th November 2007, 05:12
  3. Speed of USB EasyHID and Time problem
    By sjohansson in forum USB
    Replies: 10
    Last Post: - 18th January 2007, 22:21
  4. USB and EasyHID Problems
    By Rob in forum USB
    Replies: 8
    Last Post: - 6th January 2007, 18:19
  5. USB PIC without USB Connection
    By Tissy in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th December 2005, 17:39

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts