Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

USB port interfacing or serial port interfacing: which one is better and easier?

Status
Not open for further replies.

dashkil

Member level 2
Joined
Mar 3, 2012
Messages
45
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,620
I want to interface my PC to microcontroller, which one will be better and easier: Is it serial or USB?

Most people suggest me serial port interfacing, they says it is easier but most current model PC does not have serial port!

I want information about this and other relative information such as which MIC better for such communication, what studies should i do for such communication.
 

Most USB interfaces emulates a virtual serial port
 

Serial is easier of course. If you dont have RS232 port on your pc, you can use USB to serial convertor or buy expansion card to RS232 port.

You can make your USB to RS232 :

usb-uart.gif
 
The main issue I have with using USB is that the connection needs 'keeping alive' by the microcontroller - otherwise the PC will drop the device. If you are using a smaller MCU that can't multitask, it's easy to run out of both program space and end up losing your USB connection without careful coding.

The RS232-USB converters mentioned already look after it all for you so that the MCU can concentrate on more important matters. Much easier.

I'll only use 'real' USB if my project warrants it, like needing a higher data rate, acting as a more complicated peripheral than a simple serial port allows (like keyboard/mouse emulators, or real custom devices)

Note that I'm just an amateur though, and so my view is biased accordingly.
 

Or You can use PIC with integrated USB interface such PIC18F2450, PIC18F2455, PIC18F2550, PIC18F4450, PIC18F4455, ....


**broken link removed**
 

They still suffer from the drawback of needing keep-alive signals every millisecond to prevent the PC from dropping the connection. They are relatively easy to use though.

I like the 18F4553 because of its 12-bit ADC.
 

If You need complete USB to RS232 with PCB and drivers I will send You.

Its pico variant and works like charm.
 

Many thanks, i truly appreciate ur suggestion and information about this matter, Yes i need it, u mentioned about PIC-18F..., but now i am working with AT89S51,
Is it adorable for such communication?

Which one will be better buying a USB to serial converter, designing a converter CKT u posted.
 

Better to buy if is cheap, in my country about 10-12eur, but I make it for 5eur. I implement this DIY direct in device case what I made. From device box I have just USB port, all circuits are inside.

Here is project:
 

Attachments

  • USB to RS232 FT232RL.rar
    3.9 MB · Views: 116
Some question arouse
1) If i used USB to RS232 converter then the code should be written for USB or Serial ?
2)What if i will write a program for serial then use a opposite converter RS232 to USB for fast data transmission ?
 

Some question arouse
1) If i used USB to RS232 converter then the code should be written for USB or Serial ?
2)What if i will write a program for serial then use a opposite converter RS232 to USB for fast data transmission ?

With this you get virtual serial port on pc, and you write software for serial port. This emulates serial port on PC over USB.
 

Some question arouse
1) If i used USB to RS232 converter then the code should be written for USB or Serial ?
2)What if i will write a program for serial (u mentioned) then use a opposite converter RS232 to USB for fast data transmission ?
3) Also AT89S51 or PIC18F.... which one, because i have already interface LCD with AT89S51, can i use such as (functional block diagram)


PC-----PIC----AT89S51------LCD
 

Answers:

1) Write for serial port.
2) You must try, I didnt try that, but should work, there is RS232 to USB conversion devices. And used software is writen for USB.
3) You can use what you like with LCD and PC. I working very often with 89S51 and 89S52 in SMD TQFP package to make pico variants, I cant see DIP with my eyes, its big and require lots of space, its like spectrum or C64 tech time. :smile:

Additional :
PIC18F2550, PIC4550,.... have builtin USB support.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top