PDA

View Full Version : USB Electrical Layout?



wdmagic
- 20th January 2013, 21:07
I'm trying to layout my circuit board for a 18F4550 with USB, I have a USB B connector, but I have a question. I assumed that i just need to tie D+ and D- to those pins on the PIC and tie the USB +/- to 5V Supply, However there is a Vusb Pin That I'm not sure what its for.

Researching USB with this PIC online results in a myriad of answers.
Some articles say you have to pull the D pins high
Some sites have the Vusb pin tied to a capacitor to ground
http://digilander.libero.it/Naimah81/USB/easy_usb.jpg

I will be using VB 2010, to program the interface. Found this article that may help
http://www.protonbasic.co.uk/showthread.php/64745-18F4550-USB-to-visual-Basic-2010-ADC-project

I found a artile that I am reading on now
http://www.picbasic.co.uk/forum/showthread.php?t=16036

what is the Vsub? Is there a rule for the Capacitor value? Do I need resistors attached to the D+/- Pins? Do I need to seperate USB+ from PIC+ with something like a 10 ohm resistor to protect against voltage differances (so PIC VDD = 4.5 and PC USB = 5, then there is a .5volt difference, adding a 10ohm resistor protects circuit).

wdmagic
- 20th January 2013, 21:43
also, several articles show different Crystal frequencys, but one article stated USB requires a 48mhz crystal, I need to know what crystal I need.

gadelhas
- 21st January 2013, 00:13
also, several articles show different Crystal frequencys, but one article stated USB requires a 48mhz crystal, I need to know what crystal I need.

- About the Oscillator
Datasheet Page 23, Section 2 and page 30 Section 2.3

- Answer about the Pull Up Resistors
Datasheet Page 169, Section 17.2.2.3 and 17.2.2.4

- About the capacitor;
Datasheet Page 170, Section 17.2.2.8

You may also read this 3 Wiki articles;
http://www.picbasic.co.uk/forum/content.php?r=377-usb

Hope it helps!

rsocor01
- 11th March 2013, 12:04
(so PIC VDD = 4.5 and PC USB = 5, then there is a .5volt difference, adding a 10ohm resistor protects circuit).

No, use a 5V regulator for the PIC.

6890