CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Fastest Data Transfer

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
aaea



Joined: 11 Jan 2010
Posts: 8

View user's profile Send private message

Fastest Data Transfer
PostPosted: Tue Jan 19, 2010 12:41 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jan 19, 2010 10:17 am     Reply with quote

RS232: 250 KBaud is considered fast.
USB 2.0: 12Mbit
collink



Joined: 08 Jan 2010
Posts: 137
Location: Michigan

View user's profile Send private message Visit poster's website

PostPosted: Tue Jan 19, 2010 10:31 am     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Tue Jan 19, 2010 10:33 am     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Tue Jan 19, 2010 10:41 am     Reply with quote

collink wrote:
A 40Mhz clock would be 40MBit.
You changed your post a just as I was posting Razz 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







PostPosted: Tue Jan 19, 2010 11:09 am     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Tue Jan 19, 2010 11:16 am     Reply with quote

Rohit de Sa wrote:
collink wrote:
A 40Mhz clock would be 40MBit.
You changed your post a just as I was posting Razz 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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group