Maker Pro
Maker Pro

Crystal clock and USB operation

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Hi all,
I am using a PIC18F4520 microcontroller to use USB.

I wanted to ask how the what crystal value I need to operate the USB at 480Mbits/s and 5Gbits/s.

Is there a simple calculation that can help me?

Thanks in advance
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
You can use any crystal you like because the PIC18F4520 doesn't have a USB controller onboard. Therefore you need an external USB controller and you follow the datasheet of that external controller to determine the required crystal.

Is there a simple calculation that can help me?
YEs: max. clock speed of the PIC18F4520 is 40 MHz (32 MHz using the internal PLL), so 480 Mbit/s is impossible to achieve (you'd need 240 MHz at least for this) and 5 Gbit(s is way out of reach. It's all in the datasheet.
 
Last edited:

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
You can use any crystal you like because the PIC18F4520 doesn't have a USB controller onboard. Therefore you need an external USB controller and you follow the datasheet of that external controller to determine the required crystal.


YEs: max. clock speed of the PIC18F4520 is 40 MHz (32 MHz using the internal PLL), so 480 Mbit/s is impossible to achieve (you'd need 240 MHz at least for this) and 5 Gbit(s is way out of reach. It's all in the datasheet.
Hi
Thanks for your reply. Please could you explain why I would need a 240MHz crystal to achieve 480Mbits/s? I do not know and any help would be appreciated.
Just a question, if I used a PIC 18F14K50, could I achieve the speeds of 480Mbits/s and 5Gbits/s with an external crystal.
Please could you explain in simple terms the calculation of clock frequency to achieve these speeds, thanks.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,880
Joined
Jun 21, 2012
Messages
4,880
@Rajinder: Visit this page for information on how to implement a USB 2.0 interface. PICs might have been suitable for the original USB 1.0 standard (1.5 Mbps low-speed and 12 Mbps high-speed), but any PIC is waaay too slow for USB 2, much less USB 3, data transfer rates. You need a USB controller, not a PIC to act as your host.

With regard to your post #3, please download and read the information at the link I provided. Also read and employ the advice given by @bertus in his "signature line" included at the end of each of his posts. Please don't remain ignorant.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
Please could you explain in simple terms the calculation of clock frequency to achieve these speeds, thanks.
The minimum clock requirements come from the basic facts of serial communication: If you transmit one bit per clock edge, you can at max. transmit 2 bits per clock cycle (disregarding higher coding schemes that can transmit more than one bit per clock edge). So 480 Mbit/s translates to 240 MHz.
This will be the minimum requirement. Everything else depends on the construction of the serial communication circuit. The datasheet of the controller will explain how to proceed.
 
Top