USB HID is slower than often using PIC18f2550


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2009
    Posts
    30

    Default USB HID is slower than often using PIC18f2550

    Hi all,

    I was working on USB HID and CDC last weeks with successful applications using 18f2550.

    I made alot of codes and tested them on breadboard.

    yesterday, i made a prototype PCB for my pic 18f2550.

    the problem is that, i find that my labtop takes more time to recognize my HID device.

    when i was using breadboards, my labtop recognize PIC almost instantly. but now it takes about 10 seconds to see it(every time i plugg it , not only the first time). i tried to change the usb capacitor to 470nf insread of 220nf. but nothing changes.

    the program works fine. HID device is ok and communicates will with pc. but i need to know why is it slower to be recognized now? provided that i didnt change any component when i moved from breadboard to PCB.

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


    Did you find this post helpful? Yes | No

    Default

    Are you powering your circuit from the USB ports +5V?
    If so, it's likely the delay is in your reset circuit on MCLR.

    Quite often people will put a capacitor on MCLR, thinking it will be more stable and not reset.
    But instead it just adds several seconds to the power-up reset time.

    MCLR is usually a Schmitt Trigger input, so the capacitor has to charge to over 4V before it releases the PIC from "RESET".

    If you have a cap there, try removing it.
    DT

  3. #3
    Join Date
    Oct 2009
    Posts
    30


    Did you find this post helpful? Yes | No

    Default

    Yes i m using USB rail to power up my MCU. but i dont use a capacitor on MCLR.

    I only use a 4k7 resistor connected to USB (+5v) supply.

    the strange thing is as i said before, i m using the same circuit i tested on breadboard where it was working fast without any delay on power up.

    i double checked crystal capacitors ( 4MHz with 22p farads) they are as stated in the datasheet.

    i also checked the voltage coming out from USB, it was 5.6v

    the MCLR pin comes to 5.5 volts instantly after attach it to usb as i m using only 4k7 resistor without any capacitor.

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


    Did you find this post helpful? Yes | No

    Default

    Well, if it is truely the exact same circuit, and exact same program ...
    About the only difference between a breadboard and a PCB is the extra capacitance inherent in the breadboard.

    Do you have at least one 0.1uF capacitor between VDD and VSS close to the PIC?
    And maybe a 10uF cap close to the USB port?
    Is "Low Voltage Programming" disabled in the configs?
    Is IESO disabled?
    Is it the exact same crystal? Parallel or series cut?
    DT

  5. #5
    Join Date
    Oct 2009
    Posts
    30


    Did you find this post helpful? Yes | No

    Default

    thx darrel,

    I already have 100nf ceramic capacitor between vdd and vss so close to PIC.

    LVP disabled, IESO disabled

    i have 100nf close to used connector.

    the crystal is the same. i dont know if it is parallel or series cut. but i know it is connected parallel with two filtering capacitors 22p at each leg. it is connected as in datasheet.

    any idea whats going on?

    i ll try to use 10uf close to usb ( even i think its a huge capacitance as much as USB port is concerned) and i ll see if it will solve the problem

    see u tomorrow, thx darrel

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Do you have a capacitor between VUSB and VSS? What value?

    Can you post the schematic and/or the board layout?
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Oct 2009
    Posts
    30


    Did you find this post helpful? Yes | No

    Default

    yes, i have mentioned that in the first post.

    i have a 220nf capacitor on Vusb. i changed that to 470nf, still nothing changed

    here is simple schematic for basic connections

    Name:  Capture.JPG
Views: 1416
Size:  119.9 KB

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