Go Back   CodingForums.com > :: Computing & Sciences > Computer/PC discussions

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-10-2012, 02:32 PM   PM User | #1
jrdoter66
New to the CF scene

 
Join Date: Sep 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jrdoter66 is an unknown quantity at this point
C++ Builder and USB<->RS232

I am trying to make an application with C++Builder which communicates with a PIC16F877A which has a RS232 interface. Unfortunately my computer only has USB ports so I have bought a USB to RS232 converter cable.
Well I am a complete beginner to C++ Builder so really at this point I don't even know it will be possible to do this... Any help and advice would be really appreciated. ies
jrdoter66 is offline   Reply With Quote
Old 09-19-2012, 02:58 PM   PM User | #2
dorrot
New to the CF scene

 
Join Date: Sep 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
dorrot is an unknown quantity at this point
I see no problem you have to face in your setup. The PC SW will know nothing about nature of RS232 port it will use. It can be a real RS232 or Virtual one via USB adapter unless you are using real time bit banging with pins of RS232 port. If you are just sending data bytes there should be no difference between UART based or Virtual COM port.
I still do not get what is the task and what is the final goal of your project?
Is it communicating with PIC from PC via RS232?
In this case why should it be C++ Builder and why should you write any SoftWare at all? Here is the easier way:
http://www.xdimax.com/sub20/sub20.html
This board is USB to RS232 (and SPI,I2C,...) adapter.
You connect it to the PC USB port and take it's RS232 output and connect it to PIC.
SUB-20 software has a GUI utility to send and receive data via RS232
BTW there is a chance you will not need PIC at all. Look over SUB-20 interfaces and perhaps it will totally suite your needs.
All of the interfaces are controlled via GUI application.
dorrot is offline   Reply With Quote
Old 09-20-2012, 05:38 AM   PM User | #3
nehadas87
New Coder

 
Join Date: Jun 2011
Location: India
Posts: 23
Thanks: 1
Thanked 1 Time in 1 Post
nehadas87 is an unknown quantity at this point
The driver for the USB device should give you the API needed to talk to the serial device transparently? I mean, with the device installed, just talk in C++ as if you did have an actual rs232 port. Make your first code initialize a COM port, 1 through 4, until you get a positive response, when successful, push some data and look for it on the port or grab some data from the port.
nehadas87 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:58 AM.


Advertisement
Log in to turn off these ads.