C++ Builder and USB<->RS232

Reply

  #1  
Old 11-10-11, 02:02 AM
Hardsoft's Avatar
Member
Thread Starter
Join Date: May 2011
Location: usa
Posts: 1
Received 0 Votes on 0 Posts
C++ Builder and USB<->RS232

Hi 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.
 
Sponsored Links
  #2  
Old 11-10-11, 05:40 AM
Member
Join Date: Feb 2006
Location: USA
Posts: 6,549
Received 3 Votes on 3 Posts
Device

Just in case I am not the only one who does not know: what is this?

communicates with a PIC16F877A
 
  #3  
Old 11-10-11, 03:32 PM
Member
Join Date: Jan 2011
Location: United States
Posts: 2,446
Received 0 Votes on 0 Posts
Hi Wirepuller I didn't know what this is either but they call it an enhanced flash micro controller. Actually I still don't know what this is but I found documentation about it in pdf format. It is 234 pages long though and very technical here is the link though if you are curious http://ww1.microchip.com/downloads/e...Doc/39582b.pdf . I know it boggles my mind and is something too advanced for me. I wish you luck though Hardsoft and there are guys here with very advanced knowledge who come here who can help you with this. Have a nice day and a great holiday!
 
  #4  
Old 11-11-11, 04:27 AM
Member
Join Date: Apr 2007
Location: Near Buffalo, NY
Posts: 4,239
Received 0 Votes on 0 Posts
The USB to RS232 converter should work with the microcontroller because the PIC uses only three wires (tx, rx, gnd). Many converters don't work if the device uses CTS, RTS, etc.
 
  #5  
Old 11-11-11, 04:55 AM
Member
Join Date: May 2008
Location: USA
Posts: 1,086
Received 0 Votes on 0 Posts
It may depend on the loader your using. I tried using an older loader just the other day in the same situation and it would not communicate with the adaptor. then I used a CCS loader and it worked fine. I don't know why it made a difference,but if it does not load the program with your loader you may want to try a different one. By the way, what compiler are you using? Just curios I just started using C++ about a month ago.
 
  #6  
Old 11-13-11, 02:04 AM
Member
Join Date: Nov 2011
Location: usa
Posts: 1
Received 0 Votes on 0 Posts
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:

( url removed )

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.
 

Last edited by Rick Johnston; 11-14-11 at 03:19 AM. Reason: Remove url
  #7  
Old 11-13-11, 06:45 AM
Member
Join Date: May 2008
Location: USA
Posts: 1,086
Received 0 Votes on 0 Posts
Just FYI, PIC is a progammable IC. C++ is a program language. I just happen to use the ICs at work.
 
Reply

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Thread Tools
Search this Thread
Display Modes
 
Ask a Question
Question Title:
Description:
Your question will be posted in: