PIC 18F4550 and usb interfacing

Thread Starter

varunme

Joined Sep 29, 2011
60
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




I am using 20MHz crystal and LVP off
 
Last edited:

t06afre

Joined May 11, 2009
5,934
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!!!
 

Thread Starter

varunme

Joined Sep 29, 2011
60
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
 

ErnieM

Joined Apr 24, 2011
8,377
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:






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.

Rich (BB code):
/** CONFIGURATION **************************************************/
#if defined(PICDEM_FS_USB)      // Configuration bits for PICDEM FS USB Demo Board (based on PIC18F4550)
        #pragma config PLLDIV   = 5         // (20 MHz crystal on PICDEM FS USB board)
        #if (USB_SPEED_OPTION == USB_FULL_SPEED)
            #pragma config CPUDIV   = OSC1_PLL2  
        #else
            #pragma config CPUDIV   = OSC3_PLL4   
        #endif
        #pragma config USBDIV   = 2         // Clock source from 96MHz PLL/2
        #pragma config FOSC     = HSPLL_HS
        #pragma config FCMEN    = OFF
        #pragma config IESO     = OFF
        #pragma config PWRT     = OFF
        #pragma config BOR      = ON
        #pragma config BORV     = 3
        #pragma config VREGEN   = ON      //USB Voltage Regulator
        #pragma config WDT      = OFF
        #pragma config WDTPS    = 32768
        #pragma config MCLRE    = ON
        #pragma config LPT1OSC  = OFF
        #pragma config PBADEN   = OFF
//      #pragma config CCP2MX   = ON
        #pragma config STVREN   = ON
        #pragma config LVP      = OFF
//      #pragma config ICPRT    = OFF       // Dedicated In-Circuit Debug/Programming
        #pragma config XINST    = OFF       // Extended Instruction Set
        #pragma config CP0      = OFF
        #pragma config CP1      = OFF
//      #pragma config CP2      = OFF
//      #pragma config CP3      = OFF
        #pragma config CPB      = OFF
//      #pragma config CPD      = OFF
        #pragma config WRT0     = OFF
        #pragma config WRT1     = OFF
//      #pragma config WRT2     = OFF
//      #pragma config WRT3     = OFF
        #pragma config WRTB     = OFF       // Boot Block Write Protection
        #pragma config WRTC     = OFF
//      #pragma config WRTD     = OFF
        #pragma config EBTR0    = OFF
        #pragma config EBTR1    = OFF
//      #pragma config EBTR2    = OFF
//      #pragma config EBTR3    = OFF
        #pragma config EBTRB    = OFF
 

Thread Starter

varunme

Joined Sep 29, 2011
60
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
 

ErnieM

Joined Apr 24, 2011
8,377
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).
 
Top