USB function for a PIC18F255x

Discussion in 'The Projects Forum' started by KansaiRobot, Jun 30, 2015.

  1. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    318
    5
    Hello and thanks always

    I would appreciate your help on a problem I have
    I have succesfully programmed a board containing a PIC18F2553 with 20MHz crystal and 22pF capacitors in it
    [​IMG]
    now I am trying to do the same with a PIC 18F2550 but this time I will be building my board.
    First trying it on a breadboard I am using a 24MHz crystal
    http://pdf1.alldatasheet.com/datasheet-pdf/view/70113/KSS/HC-49U-S.html

    with either 18pF or 20pF capacitors.

    I of course, according to the datasheet changed the PLLDIV settings from 5 (for 20MHz) to 6 (24MHz) so that the PLL part gets the required 4MHz.

    The thing is that the PC does not recognize this as a USB device. First it was recognized as an "unknown device"
    Now it doesnt even recognize there is something attached to it...

    At first I thought maybe the crystal in the breadboard was not working well, but I programmed a non-USB program in the pIC and it worked well (although much faster than my previous internal oscillator experience)

    Any possible help on this will be greatly appreciated.
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    The hardware sounds fine.Does anything appear in device manager? That is where you will see any USB slaves, even those improperly installed.

    Back when I was making PICs into USB devices I would notice Windows do some strange things like store the device properties in the registry so it would not display subsequent changes I had made.

    My workaround was to change the PID every time I would write new info into it. I have no idea how to flush that from the registry, perhaps a rollback would work.
     
    Last edited: Jul 1, 2015
  3. KansaiRobot

    Thread Starter Active Member

    Jan 15, 2010
    318
    5
    at first "unknown device" appeared in the device manager...
    now nothing appears at all...

    UPDATE:For some reason it started working now...
    I think a breadboard with bad connections and using 18pf (I changed to 20pf)could be the cause

    I am going to try now on a soldered perfboard
     
    Last edited: Jul 2, 2015
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    Excellent, congratulations on getting it to connect.

    I doubt the value of those caps mattered, I've never been too concerned with the exact value on a prototype and never had any oscillator issues. Depending on which type of breadboard you use you can get many pf's just from that.

    Try not to change anything but the board when you go soldered: keep the circuit and the software the same.

    That is a good general rule to follow: only do and test a single change whenever possible.
     
    ebeowulf17 likes this.
  5. ebeowulf17

    Active Member

    Aug 12, 2014
    678
    79
    Wish I could "like" this multiple times! It drives me crazy when people change multiple variables at once, then arbitrarily decide which variable is responsible for the change in results.

    Note, this is not meant to be negative commentary against the OP/TS at all, but rather an expression of my frustration with this issue in my work life.
     
  6. ep.hobbyiest

    Member

    Aug 26, 2014
    91
    0
    hi,
    you can download the filename as usbdeview.zip. u can google it. This will erase the usb related info. so evry time system will install the drivers.
     
  7. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    764
    In Win XP at least, as Administrator, you can con go to Control panel /System /Hardware /Device Manager and expand "USB Controllers". Once there, deploy "View" and click on "Show hidden devices".

    That will also display those not currently connected, greyed out. Right click on the ones you want to unistanll. Control your enthusiasm. Been there.

    Additional comments

    a) I used the 18F4550 (beefier 18F2550) with USB software by Brad Minch. It works out of the box.

    b) I am still using a breadboard maybe some 20 years old (they called it protoboard, ACE brand IIRC). Even with micros running with a 40MHz clock, they never failed to start. After all, those MHz run inside the micro and never through the board. But, switching transistors with 2 usec period, better soldered on a perfboard. Been there twice.

    If I may ask, are you native Japanese or foreigner living there? My last time at Japan was around 28 years ago.

    Buena suerte. :)
     
Loading...