18F4550 Not Recognised


Closed Thread
Results 1 to 40 of 41

Hybrid View

  1. #1
    Funky Gibbon's Avatar
    Funky Gibbon Guest

    Default 18F4550 Not Recognised

    Hi all,

    Am i right in thinking D+ on pic connects to D+ on PC and D- to D-, i downloaded the mouse example from microchips site but whenever i plug my f4550 into PC usb the pc says usb device not recognised or might be malfunctioning, i wondered if maybe i got d+ and d- the wrong way round or would it not detect any device at all then, The mouse example comes with the ocs clock set to 48mhz, im useing 20mhz clock so naturally i changed it to 20 but it still does'nt work with either setting.
    can someone throw light on the subject?

    Thanks
    Shaun

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

    Default

    i don't feel that 20MHZ clock will be fast enough to provide any USB communication. 40MHZ would work so, you can even use a 10MHZ crystal and set the HSPLL to on. That way, it 'should' work.

    But is PLL work great and bug free for that... i can't tell.
    Steve

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

  3. #3
    Funky Gibbon's Avatar
    Funky Gibbon Guest

    Default

    Hi Steve,

    I've been using 18F452's so this 18F4550 is all new to me, you think 20mhz is too slow? you could be right, should i dump the crystal and use the internal osc, i think i saw in the settings that it had an internal osc, i've built a new dev board just for this controller as the pinout is slightly different to the F452, i've still kept a max232 on the board for serial comms.
    I've been looking at the Bootloader for the F452, do you think it would be possible to make it function on the FR4550 with some adjustment, like i said the F4550 is new to me so forgive me if im talking cr*p

    Shaun

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405

    Default

    A 20MHz crystal is fine as long as you set the proper config word options.

    Below are my config settings for the 18F4550 from my 18F4550.INC file in my
    PBP directory. I have edited the default settings in this PBP header file for
    the 18F4550 to be compatible with the Microchip USB boot-loader.
    Code:
            NOLIST
        ifdef PM_USED
            LIST
            "Error: PM does not support this device.  Use MPASM."
            NOLIST
        else
            LIST
            LIST p = 18F4550, r = dec, w = -311, f = inhx32
            INCLUDE "P18F4550.INC"	; MPASM  Header
            CONFIG PLLDIV=5,CPUDIV=OSC1_PLL2,USBDIV=2,FOSC=HSPLL_HS,FCMEM=OFF,IESO=OFF
    	CONFIG VREGEN=ON,CCP2MX=ON,WDT=OFF,WDTPS=32768,PBADEN=OFF,PWRT=OFF,MCLRE=ON
    	CONFIG LPT1OSC=OFF,BOR=ON,BORV=2,STVREN=ON,LVP=OFF,ICPRT=OFF,XINST=OFF,DEBUG=OFF
    	CONFIG WRTB=ON
            NOLIST
        endif
            LIST
    EEPROM_START	EQU	0F00000h
    BLOCK_SIZE	EQU	32
    PLLDIV=5 ' This sets the PLL Postscaler to divide the primary osc input by 5
    providing 4MHz to the 96MHz PLL. The 96MHz PLL input must always be 4MHz
    as shown in the data sheet.

    CPUDIV=OSC1_PLL2 ' This sets the PLL Postscaler to divide the 96MHz PLL
    output by 2 providing a 48MHz clock to the CPU.

    USBDIV=2 ' This divides the 96MHz PLL output by 2 providing 48MHz to the
    USB core.

    FOSC=HSPLL_HS ' This enables HSPLL for high-speed crystal/resonator.

    If you plan to use the Microchip USB boot-loader with PBP, then insert this in
    the top section of your code;

    DEFINE OSC 48 ' 20MHz crystal with HSPLL enabled = 48MHz
    DEFINE RESET_ORG 800h ' Reset Vector = 800h When Using Microchip USB Boot-Loader
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Funky Gibbon's Avatar
    Funky Gibbon Guest

    Default

    Thanks Bruce, i shall give it a try and let you know what happens

    Shaun

  6. #6
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Check Vusb capacitor

    Funky,

    How did you make out? When I took my device from the development board to a circuit board, I had similar problems. As Bruce mentioned, a 20Mhz crystal will work good. In fact, I use a 20Mhz resonator on all of my devices because they are subject to more shock and seem to be a bit more reliable. Anyhow, I have found that if the capacitor value is not correct, you will get this error message. Check the cap on Vusb and use something that is more than 400nF. Once I changed this capacitor on Vusb, everything worked great.

    Good Luck,

    Chris

  7. #7
    Funky Gibbon's Avatar
    Funky Gibbon Guest

    Default

    Thanks to all for their surgestions, im not ignoring anyone, i will post results as they happen, im a bit tied down with work and stuff right now

  8. #8
    Funky Gibbon's Avatar
    Funky Gibbon Guest

    Default

    Well the update is that the chip is now working, not having a >400nf cap lying around i stuck a 330pf in Vusb instead, it's running Microchips, Mouse in a circle demo, looking at the datasheet i would not have expected that one cap to make any difference being where it is situated, but i was wrong,
    Thanks to all for your help

    Shaun

  9. #9
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154

    Default

    Hi,

    There is a capacitor connected to Vusb in figure 17.10 on page 184 of the datasheet for the PIC 18F4550.

    But I can't find any reference to the recommended value, where did you guys come up with 400nF? And how much more than 400nF can we go?

    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!

  10. #10
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154

    Default

    Ok, I found another thread where Melanie mentions 17.2.2.8:

    "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."

    I don't know why people are mentionning 400nF when the datasheet states 220nF, give or take 20%. Either way, I don't have capacitors in this range so I'm stuck for now.

    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!

  11. #11
    Join Date
    Jan 2009
    Location
    Duluth, MN USA
    Posts
    2

    Default Odd observation

    The thread here is a few years old but I have been seeing something with the 18F4550 that I would like others to review.

    I am very new to experimenting with USB and PICs but have a number of excellent tools to help me learn. I run Pic Basic Pro 2.50, HIDmaker, have the book USB complete, write in VB 6.0, use a Melabs U2 programmer, and have the Melabs LAB-XUSB experimental board and a number of PICPROTO-USB prototyping boards populated with 18F4550's.

    My preliminary test program worked well on the Lab-XUSB board but I noticed intermittent USB on the Picproto-USB boards. Realized from other discussions that the Vusb capacitor to ground was important but even with the proper capacitor the USB would connect and disconnect continuously every few seconds.

    I found that I could eliminate this connection problem by changing one setting in the configuration. The setting is "Low Voltage Programming". If enabled I would have problems and disabled it works great.

    This seems a little odd to me and would like to know if others can repeat this and shed some light on this subject.

    I have reproduced this with 5 different boards and 5 different 18F4550's.

    Bruce
    Duluth, MN

    I scoped out the power and when looking at Vusb I noticed it was cycling high and low (actually dropping slowly and returning high faster). My connects occurred when the voltage returned high but after dropping to around 3 volts would disconnect.

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

    Default

    This is always nice when we have the code (and schematic) to evaluate any kind of potential issue.

    BUT leaving Low-Programming mode enabled is a sure way to have some issue one day or another... unless you don't use this pin and set it to GND via a pull-down resistor.

    This rule apply to all PIC with Low-Voltage programming mode.
    Steve

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

  13. #13
    Join Date
    Jan 2009
    Location
    Duluth, MN USA
    Posts
    2

    Default

    Thanks for the reply. I will have to read up on the low voltage programming. I must be thinking it was different than it is. I always have the same comment you do (where is the schematic and code you are having trouble with), not so much here on this forum but on most groups I belong to. So much good advice here but also so many details to pay attention to.

    Bruce

Similar Threads

  1. 18f4550 usb problem.. so im getting crazy..
    By MeSaKu in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th May 2009, 22:03
  2. 18F4550 to 18F2550
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th September 2007, 23:13
  3. USB Programmer for 18F4550 PICs
    By Kamikaze47 in forum USB
    Replies: 8
    Last Post: - 21st August 2007, 16:29
  4. EasyHID 18f4550 - DEVICE NOT RECOGNISED?
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd July 2007, 23:54
  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