View previous topic :: View next topic |
Author |
Message |
aaea
Joined: 11 Jan 2010 Posts: 8
|
Fastest Data Transfer |
Posted: Tue Jan 19, 2010 12:41 am |
|
|
Hi
I am using the PIC18F2550. I was wondering what is the fastest that data can be transferred using RS232 (I am using a 12MHz Xtal)?
Alternatively, using USB, what is the fastest that data can be transferred to a PC?
Thank you in advance.
a. |
|
|
PICoHolic
Joined: 04 Jan 2005 Posts: 224
|
|
Posted: Tue Jan 19, 2010 10:17 am |
|
|
RS232: 250 KBaud is considered fast.
USB 2.0: 12Mbit |
|
|
collink
Joined: 08 Jan 2010 Posts: 137 Location: Michigan
|
|
Posted: Tue Jan 19, 2010 10:31 am |
|
|
Yeah, keep in mind that usb2 is 480MBit so the 12MBit is just because of the pic clock. A 40Mhz clock would be 40MBit. |
|
|
Rohit de Sa
Joined: 09 Nov 2007 Posts: 282 Location: India
|
|
Posted: Tue Jan 19, 2010 10:33 am |
|
|
No, actually PICoHolic is right. PICs support only low speed and full speed USB, ie 1Mbps and 12Mbps. 480Mbps is high speed USB.
Rohit |
|
|
Rohit de Sa
Joined: 09 Nov 2007 Posts: 282 Location: India
|
|
Posted: Tue Jan 19, 2010 10:41 am |
|
|
collink wrote: | A 40Mhz clock would be 40MBit. | You changed your post a just as I was posting Anyway, 40MHz clock does not mean 40Mbits. The 18F4550 can run at 48MHz. Its instruction cycle is (48/4)=12MHz.
The USB clock of the '4550 runs at 48MHz for full speed USB, and at 6MHz for low speed USB.
Rohit |
|
|
Ttelmah Guest
|
|
Posted: Tue Jan 19, 2010 11:09 am |
|
|
On RS232, allowable distance falls with speed.
People 'get away' with pushing this, but operation at rates above 57600bps, requires well designed drivers, cables, and care.
RS485, 422 etc., are 'better' standards for high rates.
There is significant overhead on USB, and most of the time, you will _not_ get the full 'bus capacity'. So though the PIC can drive the bus at 12MHz, you will be 'lucky' to get a throughput much beyond perhaps 3-400KB/sec.
Realistically, you will be lucky to be able to supply data at even this rate, from most sources....
Best Wishes |
|
|
collink
Joined: 08 Jan 2010 Posts: 137 Location: Michigan
|
|
Posted: Tue Jan 19, 2010 11:16 am |
|
|
Rohit de Sa wrote: | collink wrote: | A 40Mhz clock would be 40MBit. | You changed your post a just as I was posting Anyway, 40MHz clock does not mean 40Mbits. The 18F4550 can run at 48MHz. Its instruction cycle is (48/4)=12MHz.
|
Yes, you are right. I'm too used to processors which do generally fit the "one cycle, one instruction" rule. |
|
|
|