Problem with enumeration and EasyHID


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Posts
    14

    Default Problem with enumeration and EasyHID

    Hi, I'm using a pic18f2550 with picbasic pro and easyhid.

    I get the files generated from easyhid to compile correctly. The problem is that when I plug in the usb cable, the computer never enumerates the pic, no new hardware found box on windows.

    I connected the pins correctly, i think, just as the schematic suggests on the easyhid website. I'm just trying to code something where it will send the a/d values from an RA pin to the pc.

    Any suggestions or tips?
    Thanks in advance

  2. #2
    skimask's Avatar
    skimask Guest

    Cool

    Quote Originally Posted by jizyjuice View Post
    Hi, I'm using a pic18f2550 with picbasic pro and easyhid.

    I get the files generated from easyhid to compile correctly. The problem is that when I plug in the usb cable, the computer never enumerates the pic, no new hardware found box on windows.

    I connected the pins correctly, i think, just as the schematic suggests on the easyhid website. I'm just trying to code something where it will send the a/d values from an RA pin to the pc.

    Any suggestions or tips?
    Thanks in advance
    Those that read this are supposed to help you figure out your code problems because we can all guess exactly how you have written your code. Am I correct in this assumption?


    Post some code!!!

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

    Default

    Steve

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

  4. #4
    Join Date
    Apr 2007
    Posts
    14

    Default

    Heres the code that Easy HID created. I set up an led to see where the code stops at. It seems to stop after
    USBOut 1, USBBuffer, USBBufferCount, DoUSBOut ' if bus available, . I guess this is because I dont have any code right now to send data, but I was more concerned with the pc recognizing the pic.

    If usbinit is called, doesnt the pc enumerate the usb device? It never shows that a hid device is connected. Is there something I am missing to get the pc to recognize this device?!



    DEFINE OSC 48
    DEFINE LOADER_USED 1

    USBBufferSizeMax con 8 ' maximum buffer size
    USBBufferSizeTX con 8 ' input
    USBBufferSizeRX con 8 ' output

    ' the USB buffer...
    USBBuffer Var Byte[USBBufferSizeMax]
    USBBufferCount Var Byte

    ' ************************************************** **********
    ' * 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 DoUSBOut
    goto ProgramStart


    ' ************************************************** **********
    ' * wait for USB interface to attach *
    ' ************************************************** **********

    DoUSBOut:
    USBBufferCount = USBBufferSizeTX ' TX buffer size
    USBService ' keep connection alive
    USBOut 1, USBBuffer, USBBufferCount, DoUSBOut ' if bus available, transmit data
    return

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    That's not the "Whole" code that easyHID created.

    You've deleted some things that are very important.

    If you just want to see it enumerate, change the main loop to this...
    Code:
    ProgramStart: 
       USBService           ' keep connection alive
    goto ProgramStart
    But that will neither send or receive any data.
    This also assumes you've setup your Configs properly.

    DT

  6. #6
    Join Date
    Apr 2007
    Posts
    14

    Default

    Oh, I took out the code for receiving data from the pc to the pic. I just want to communicate to the pc side.

    All the configs are what easyhid has set up. I will try just polling serviceusb and see if that can get the pic to enumerate. Thanks

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