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 CCS Technical Support

USB vs RS232

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



Joined: 17 Nov 2009
Posts: 50

View user's profile Send private message

USB vs RS232
PostPosted: Fri Dec 25, 2009 11:47 am     Reply with quote

Hi !

Due lack of experience I'm having difficulties choosing between USB and RS232. I hope You can help me out.


Project(devise) is a stand alone regulator with some user interface.

Q1: What will happen if connection between devise and laptop PC is made (plugged in) If it is RS 232 a popup window will appear and numbers from devise will start running? For PC usually no drivers needed no matter which OS is running ? But no laptop got RS 232 or RS 485 so converter is needed.

Q2: What will happen if connection between devise and laptop PC is made (plugged in) If it is USB. Microchip drivers are needed and ... more is needed maybe ? ...? What about different PC Operating systems? Can low experienced user handle this kind of tasks?


Any other ways how to connect PIC mcu to a laptop PC ?
Is there chance to use LAN or DSL socket to do RS 232 job ?

The connection between device does happen not very often... 2 or 3 times. For sure it is needed for prototype devise but for final devise it is meant to be as problem solver (as user have feature to see what happened during work-flow of devise).

For sure You have done more and seen so much more that me. What is Your opinion on this matter. Is there a need for USB for final project.



Thank you in advance !
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Fri Dec 25, 2009 12:50 pm     Reply with quote

Your easiest answer to occasional configuration is RS232. RS232 is the simplest and most common way to give a user access to workings on a microcontroller.

Even if a laptop doesn't come with an RS232 port, for about $30, a USB->RS232 adapter is easy to find.

Doing USB on the PIC immediately makes everything harder than with simply using RS232. You have to have a USB "stack" running on the PIC and this increases code size and complexity.

Ethernet/TCP-IP have the same factors. Really cool - but really complex.

Best Regards,

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Fri Dec 25, 2009 12:52 pm     Reply with quote

google:
USB FTDI SERIAL parts Like UM232R are your friend.

also EDGEPORT converters for PC
MiniMe



Joined: 17 Nov 2009
Posts: 50

View user's profile Send private message

PostPosted: Fri Dec 25, 2009 2:38 pm     Reply with quote

Thank you !

Replies been really useful.


Very Happy
"USB on the PIC immediately makes everything harder "
I'm intrigued ... maybe you could tell me more ... How much more complex. Wink What are the problems I may face later. What is the main difference between UART and USB communication ( delay, principle complexity ? )


--I've been looking at the example ex_usb_serial. Is this what I'm looking for?
--Is there a Serial to USB "part" that I can just add to a project PCB speed is not important.



Can I integrate USB feature as the last one on pic18Fxx50 part (my case could be 18F14K50 )


Again thank you !
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Fri Dec 25, 2009 3:55 pm     Reply with quote

I could say it like this:

Imagine doing serial over TCP/IP? Sound simple? Of course not!

(I actually wrote a TCP/IP to RS232 bridge for someone recently)

RS232 (as we all know and love) is defined simply as some voltages over a wire clocked in a defined way -- and we have transfer of information (data) from one point to another.

Simple.

USB on the other hand (or WiFi or TCP/IP with Ethernet or PPP or who knows what) is a whole protocol intended to have all sorts of hosts talking over a shared bus (something that typical RS232 is not) signalling all sorts of states, transferring data...

it's a much bigger onion with some busy layers added. (just think of the drivers needed that RS232 needs much less of)

All this for setting a few configs by a user. Not worth it. :D

Spiffy-Neato? -- sure.. but definitely more time/work and hassle.

When RS232 is broken, most of the time you can peek into the problem with a scope or home-made test gear with extra COM ports...

USB -- a lot harder to see into without an analyzer. (You can find free ones... but you need to know a lot more about USB to interpret what's going on)

Regards,

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
MiniMe



Joined: 17 Nov 2009
Posts: 50

View user's profile Send private message

PostPosted: Fri Dec 25, 2009 4:31 pm     Reply with quote

Reply, You made, taught me everything I wanted to know in a way easy to understand. You helped me and saved very big amount of my time. Wink


Thank you once more.
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