easyHID question


Closed Thread
Results 1 to 40 of 49

Hybrid View

  1. #1

    Default easyHID question

    Hi !

    Could somebody kindly say, if the use of easyHID is as easy to use as it seems to be, please? Or more precisely, should the outcome work straight away, I mean should the PC say ding-dong when you plug your PIC18F4550 to it and when you unplug it would say dong-ding?

    The easyHID generates USBProject.pbp (+5 other files) that are compiled with PBP 2.50b via MicroCode Studio v3.0.0.5 and programmed with meProg, melabs programmer v.4.22 (hardware: melabs U2 programmer). I have moved the generated files to the C:\PBP-folder. On the PC side is the VB-software, but that seems not to be play any role yet...

    The generated PIC code does not say ding-dong when plugged, and of course not either dong-ding when unplugged. It does not say anything else either or show any text. You can not either see any changes in control panel/system/hardware/DeviceManager/USB. However if you do it two times (plug/unplug) you need to boot the PC because the used USB-port will be out of order after this until a boot. It's kind of turned off, or invisible. This is kind of strange thing because USB should be rather robust, shouldn't it?

    Without USB (USBin etc) PIC works just fine. So the problem lies on the USB side, but where?

    The USB connector pins are connected as they shall be:
    1=+5V, 2=D-, 3=D+ and 4=gnd.
    D- connected to pin 23 and D+ to 24 in series with 22 ohms resistors.

    The programmer configuration is:
    PLL prescaler "/3 (12MHz)"
    System Clock Postscaler "96MHz PLL/2"
    USB Clock "HSPLL"

    and in the beginning of the generated basic code there are
    DEFINE OSC 48
    DEFINE LOADER_USED 1

    I'm confused with no clue how to proceed from this point. Have tried to look around this thread but haven't found any help.

    Anybody, any ideas what could be wrong?
    Could somebody point out some info somewhere or perhaps say straight away what one could or should do in this situation.

    Please help, any help will be appreciated.

    Regards
    Key

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

    Default

    What value capacitor do you have on Vusb (pin 18)?

    Are you powering the PIC from the USB power or External power?

    I've never seen 22 ohm resistors used before. Normally it's direct wired to the pin.
    DT

  3. #3

    Default

    Quote Originally Posted by Darrel Taylor View Post
    What value capacitor do you have on Vusb (pin 18)?

    Are you powering the PIC from the USB power or External power?

    I've never seen 22 ohm resistors used before. Normally it's direct wired to the pin.

    the capacitor on Vusb is 100nF

    the power comes from an external source, and as said, it works just fine without the USB...

    the 22 ohm resistors are only to give a small additional protection, they should not be harmful for the real work... There is also a SN65220DVB circuit swallowing bigger voltages, for real transient high voltage protection.
    Why use condoms if you are sure?

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

    Default

    If you are using an external power supply, you should not connect the +5 volts to Pin 1 of the USB connector.
    Not sure if you meant that in post #1 USB connections.

    If you do, it will cause an over current condition, and the USB port will shut-down.

    The capacitor should be at least .22uF (220nF).
    It may still work with 100nF, but it may also be unstable.

    DT

  5. #5

    Default

    Quote Originally Posted by Darrel Taylor View Post
    If you are using an external power supply, you should not connect the +5 volts to Pin 1 of the USB connector.
    Not sure if you meant that in post #1 USB connections.

    If you do, it will cause an over current condition, and the USB port will shut-down.

    The capacitor should be at least .22uF (220nF).
    It may still work with 100nF, but it may also be unstable.
    I have a schematic that is surely a working system where I can see all the same things (100nF, 22ohm). However I will change the Vusb=100nF to bigger one day, soon... just to be more on the safe side...

    The +5V is not connected to USB port, instead USB-connector.1 is connected to PIC portB.5 (pin 38) so the software can detect when the USB cable is connected. There could also perhaps be an USB interrupt possibility, but I thought this would be simpler looked from the program side, on change interrupt or perhaps just polling, ... let's see said the blind man ...

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

    Default

    220nF is the value recommended in the datasheet.
    17.2.2.8 Internal Regulator

    The PIC18FX455/X550 devices have a built-in 3.3V regulator
    to provide power to the internal transceiver and
    provide a source for the internal/external pull-ups. An
    external 220 nF (±20%) capacitor is required for stability.
    The 22 ohms should be fine. I've just never seen them before. Your reference to the SN65220 helped with that problem.

    Ok on the +5V.
    I prefer to detect the plugged status in a USB interrupt, because it tells you when it's communicating with the computer. The way you have it, it only detects if it's plugged into a port or hub. But that's not going to help the problem at this point.

    There are several things that can go wrong here, we'll just have to work through it.

    You mentioned before ...
    > The programmer configuration is: ...

    Are you setting the config's manually in the programmer's software?
    If so, is the VREGEN bit enabled? (Turns on the 3.3v regulator)

    I assume you've blinked an LED somewhere to verify the oscillator is running at the correct speed.
    On these chips, if the main oscillator isn't working, it can switch over to the internal oscillator at a different freq.
    DT

Similar Threads

  1. USB and EasyHID Problems
    By Rob in forum USB
    Replies: 8
    Last Post: - 6th January 2007, 18:19
  2. Please answer my first question
    By John_001 in forum Off Topic
    Replies: 1
    Last Post: - 15th September 2006, 06:49
  3. HIDMakerFS versus EasyHID
    By Demon in forum USB
    Replies: 4
    Last Post: - 15th August 2006, 08:01
  4. EasyHID VB help with multiple HID's
    By pfinfrock in forum USB
    Replies: 1
    Last Post: - 6th October 2005, 19:16
  5. Replies: 0
    Last Post: - 5th September 2005, 09:09

Members who have read this thread : 0

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