Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Solved]18F4550 and USB not recognized

Status
Not open for further replies.

raffel0

Newbie level 4
Newbie level 4
Joined
Aug 10, 2009
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,335
usb not recognized

Hi all, I am trying to interface my 18F4550 pic to the usb but I am getting "Usb not recognized" message

The connection scheme is equal to the help of the mikroC:

easy_usb.jpg


Notice: D- and D+ pins are wrong and I linked D- to RC4 and D+ to RC5.

The capacitor in series with the 8mhz oscillator are 22pF each

I am using the following flags in the project:

Code:
Value0=_PLLDIV_2_1L = $00F9 (pll divide by 2)
Value1=_CPUDIV_OSC1_PLL2_1L = $00E7 (cpudiv divide by 2, so cpu is at 48mhz)
Value2=_USBDIV_2_1L = $00FF (active, so usb is at 48mhz)
Value3=_FOSC_HS_1H = $00FC (hs active)
Value4=_FOSC_HSPLL_HS_1H = $00FE (hs active with pll)

Value5=_FCMEM_OFF_1H = $00BF
Value6=_IESO_OFF_1H = $007F
Value7=_PWRT_ON_2L = $00FE
Value8=_BOR_ON_2L = $00FF
Value9=_BORV_43_2L = $00EF
Value10=_VREGEN_ON_2L = $00FF
Value11=_WDT_OFF_2H = $00FE
Value12=_WDTPS_256_2H = $00F1
Value13=_MCLRE_ON_3H = $00FF
Value14=_LPT1OSC_OFF_3H = $00FB
Value15=_PBADEN_ON_3H = $00FF
Value16=_CCP2MX_ON_3H = $00FF
Value17=_STVREN_ON_4L = $00FF
Value18=_LVP_OFF_4L = $00FB
Value19=_XINST_OFF_4L = $00BF
Value20=_DEBUG_OFF_4L = $00FF

What may be wrong with my project?
 

18f4550 pull up

check these H/W tricks again:
- D+ and D- are connected in a right way and not exchanged.
- connect 470 nf tantalum decoupling capacitor to pin 18, it should be tantalum not electrolytic.
- use a decoupling capacitor 100 uf between circuit Vcc and ground.
- check USB PLL configuration.
- don't forget the pull-up resistor on pin 1 (MCLR).
- connect all Vdd and Vss pins in the microcontroller (i mean pins 11,12,30,31 so far i remember, return to the datasheet).

good luck :)
 

    raffel0

    Points: 2
    Helpful Answer Positive Rating
18f4550 rc4

Triplechecked D- and D+, put the exact capacitor to decouple the power suplly, put the tantalium capacitor at pin18 Vusb, put a 8mhz oscillator and two capacitors (dunno what value is right, i tried with 22pF, imho this is the problem) and set pll appropriate, usbdiv too to get 48mhz for usb, put a pull-up resistor at MCLR and linked the other power pins too.

Device unrecognized. Maybe the problem is in the capacitors? I have not found a 20Mhz oscillator or I had tried with it too

Added after 19 minutes:

I am showing the entire circuit with physical connections, maybe someone will be able to locate the error:

**broken link removed**
**broken link removed**
P.s. click on the imageshack images twice to get full size and read minicomments

The error is always the same: device unrecognized
 

usb capacitor nf pic 18f4550

Is your firmware USB ready ?

It's not only the configuration, you should have a USB routine on it.
 

    raffel0

    Points: 2
    Helpful Answer Positive Rating
device name on 18f4550

I just used the code provided in the mikroC example, I'll post it here:

Code:
unsigned char RD_len;

unsigned short userWR_buffer[64];
unsigned short userRD_buffer[64];


void interrupt()
{
  Hid_InterruptProc();

}


void Init_Main()
{
  //--------------------------------------
	// Disable all interrupts
	//--------------------------------------
 INTCON2 = 0xF5;
	INTCON3 = 0xC0;
	RCON.IPEN = 0;                          // Disable Priority Levels on interrupts
	PIE1 = 0;
	PIE2 = 0;
	PIR1 = 0;
	PIR2 = 0;

	ADCON1 |= 0x0F;                         // Configure all ports with analog function as digital

  TRISA = 0xFF;
	TRISB = 0xFF;
	TRISC = 0xFF;
	TRISD = 0x00;
	TRISE = 0x07;

	LATA = 0;
	LATB = 0;
	LATC = 0;
	LATD = 0;
	LATE = 0;



//useless on 18F4550
	//--------------------------------------
	// Enable PLL !!!
	//--------------------------------------
	//PLLEN = 1;
	//Delay_mS(5);



}


void main()
{
     Init_Main();
            
    HID_Enable(userRD_buffer, userWR_buffer);
         
     Delay_mS(1000);
     Delay_mS(1000);
     
          while(1){

          RD_len = HID_Read();

                 //do something

                }
  HID_Disable();
}
 

hs-1000 not recognized

why using two different load capacitor values with the crystal?
you can try microchip usb framework v2.4, there are plenty of projects in it and you will find projects dedicated to 18F4550 under the name "PICDEM" board.
check this link:
**broken link removed**

good luck :)
 

    raffel0

    Points: 2
    Helpful Answer Positive Rating
18f4550 not recognized

I have to thank you all, the device now is correctly recognized and installed as HID Device.

The problem was that I horribly screwed the device up with a 12V discharge from my selfmade power supplier (indeed not so stabilized)

Thank you all for your kindness and time. If someone have my same problem please contact me, I'll try to help you.
 

same problem in my circuit i try tomake thermometer use with usb but when i connect the circuit i see unrecognize device warning is it possible to help me?
 

check the precautions above we posted, I think you will find the solution in one of them.
 

i read all of them but i couldn t find i try to make usb controll thermometer each connectin is right but when i connect the computer said unrecognize device warning i show the driver but the computer said there is no more new driver update for this device first i dont know if i load the driver how can i erase second if were load the driver how can i check?
 

check this link, try to use firmware available from the "Microchip USB framework" package:
**broken link removed**
 

what will i download or take from this site i've MCHPFSUSB v2.3 but i dont know how can i use them another problem is i have one driver file but is it true or not i dont know name is mchpcdc.inf i dont know pls help me and i will load the project

or you can download from here

**broken link removed**
 

with every firmware (project) in microchip USB framework you will find the *.inf files relevant to this project, example CDC Basic demo project, you will find the drivers of the CDC inside the file.
to use them install MPLAB IDE and C18 compiler, get the API's from the help of the "microchip USB framework", in "CDC Basic demo" project in the "main.c" file you can add any ports or regsiters configuration the "main()" and the application code in "ProcessIO()", may other projects are the same but im not sure.
also you should know that HID projects and Mass storage you won't find drivers or *.inf files for them....why?
cause they are already identified inside the windows OS driver files, so they will be defined automatically.
good luck
 

so i have the driver but if i have the drive why my circuit cant acceot this file and i have another question input power pin of usb socet i have 1 cap 470nf 100v is it normal value or not?
 

its normal value but use tantalum capacitor, don't use electrolytic one.
 

Thanks for show the schematics. After weeks of work, finally the 18F4550 works with the USB!!! Solution: put the condensator of 470nF in pin VUSB.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top