PIC 18F4550 and usb interfacing

Discussion in 'Embedded Systems and Microcontrollers' started by varunme, Oct 9, 2011.

  1. varunme

    Thread Starter Member

    Sep 29, 2011
    59
    0
    in my flashing software , these are the options available for editing the fuses , what are the correct values for fuses for interfacing 18F4550 as generic HID device ? , am with these for about 1month , kindly someone help me
    below is my screen shots


    [​IMG]

    I am using 20MHz crystal and LVP off
     
    Last edited: Oct 9, 2011
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    The Fuse bits are set in the C code. Do not change them.
    THEN I CLICKED ON YOUR PICTURE I GOT A POPUP FOR SOME ADULT/XRATED DODGY DATING SITE. PLEASE DO NOT USE THAT KIND OF IMAGEHOST. OK!!!
     
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
  4. upand_at_them

    Active Member

    May 15, 2010
    246
    29
    varunme, Post your circuit.
     
  5. varunme

    Thread Starter Member

    Sep 29, 2011
    59
    0
  6. varunme

    Thread Starter Member

    Sep 29, 2011
    59
    0
    in this board all firmwares are working except for the usb one , when the pic programmed with usb firmware when connected to usb , it says usb disc not recognized and shows a VID and PID 0000
     
  7. varunme

    Thread Starter Member

    Sep 29, 2011
    59
    0
    Last edited: Oct 14, 2011
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    Using ImageShack you can copy the code from the direct link and paste into that icon of the mountain & sun on the advanced page and ember your picture:


    [​IMG]



    Microchip has some excellent example programs in their Microchip Applications Library. I copied some code for a PIC18F4550 based project for you. No guarantee this will work for you but it may be close.

    Code ( (Unknown Language)):
    1. /** CONFIGURATION **************************************************/
    2. #if defined(PICDEM_FS_USB)      // Configuration bits for PICDEM FS USB Demo Board (based on PIC18F4550)
    3.         #pragma config PLLDIV   = 5         // (20 MHz crystal on PICDEM FS USB board)
    4.         #if (USB_SPEED_OPTION == USB_FULL_SPEED)
    5.             #pragma config CPUDIV   = OSC1_PLL2  
    6.         #else
    7.             #pragma config CPUDIV   = OSC3_PLL4  
    8.         #endif
    9.         #pragma config USBDIV   = 2         // Clock source from 96MHz PLL/2
    10.         #pragma config FOSC     = HSPLL_HS
    11.         #pragma config FCMEN    = OFF
    12.         #pragma config IESO     = OFF
    13.         #pragma config PWRT     = OFF
    14.         #pragma config BOR      = ON
    15.         #pragma config BORV     = 3
    16.         #pragma config VREGEN   = ON      //USB Voltage Regulator
    17.         #pragma config WDT      = OFF
    18.         #pragma config WDTPS    = 32768
    19.         #pragma config MCLRE    = ON
    20.         #pragma config LPT1OSC  = OFF
    21.         #pragma config PBADEN   = OFF
    22. //      #pragma config CCP2MX   = ON
    23.         #pragma config STVREN   = ON
    24.         #pragma config LVP      = OFF
    25. //      #pragma config ICPRT    = OFF       // Dedicated In-Circuit Debug/Programming
    26.         #pragma config XINST    = OFF       // Extended Instruction Set
    27.         #pragma config CP0      = OFF
    28.         #pragma config CP1      = OFF
    29. //      #pragma config CP2      = OFF
    30. //      #pragma config CP3      = OFF
    31.         #pragma config CPB      = OFF
    32. //      #pragma config CPD      = OFF
    33.         #pragma config WRT0     = OFF
    34.         #pragma config WRT1     = OFF
    35. //      #pragma config WRT2     = OFF
    36. //      #pragma config WRT3     = OFF
    37.         #pragma config WRTB     = OFF       // Boot Block Write Protection
    38.         #pragma config WRTC     = OFF
    39. //      #pragma config WRTD     = OFF
    40.         #pragma config EBTR0    = OFF
    41.         #pragma config EBTR1    = OFF
    42. //      #pragma config EBTR2    = OFF
    43. //      #pragma config EBTR3    = OFF
    44.         #pragma config EBTRB    = OFF
    45.  
    46.  
     
  9. varunme

    Thread Starter Member

    Sep 29, 2011
    59
    0
    The question is not with the fuse settings in the compiler , its about the burner software , so i included the screenshot of the burner software
     
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    No, that's a screen shot of the config settings.
     
  11. varunme

    Thread Starter Member

    Sep 29, 2011
    59
    0
    yes , please verify the config settings available for the CPUDIV , the one for 20Mhz is not available as a dropdown menu
     
  12. upand_at_them

    Active Member

    May 15, 2010
    246
    29
    FWIW, the CPUDIV I'm using for my 18F2455 USB test project is "DIV/2 wPLL, DIV/1"
     
    varunme likes this.
  13. varunme

    Thread Starter Member

    Sep 29, 2011
    59
    0
    which oscillator are you using , 20Mhz ?
     
  14. upand_at_them

    Active Member

    May 15, 2010
    246
    29
    Yes, 20MHz.
     
  15. varunme

    Thread Starter Member

    Sep 29, 2011
    59
    0
    I think ,my problem is with my progammer , its microburn
     
  16. nigelwright7557

    Senior Member

    May 10, 2008
    487
    71
    Buy a Microchip programmer, if Microchip cant get it right then no one can.

    I use a PICSTART but there are other options these days. The picstart is updateable to latest PICs.
     
  17. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    PicKits can also do in circuit debugging. PicKit 2 is faster then PicKit 3 but 3 covers the newer devices (even the 32's). I have 3 of the 2's, haven't got a 3 yet (I don't need it as I have an ICD3).
     
  18. varunme

    Thread Starter Member

    Sep 29, 2011
    59
    0
    I too going to buy pickit 3 , the ICD3 is costlier than pickit 3 isnt it ?
     
  19. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    The ICD3 is significantly more expensive then either PicKit.
     
Loading...