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.

How can connect serial port usb adapter with PC using C

Status
Not open for further replies.

lingaraj

Newbie level 1
Joined
Aug 9, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
chennai
Activity points
1,292
Hello friends....
I have to connect 89c52 micro controller with PC using serial port to usb adapter. Now i can saw the received data in hyper terminal mode but How can i store received data in PC as a file anybody can help me?
i want program in C language... Anybody have source code means please send me.
 

Hi lingaraj,

Are you familiar to C? Windows or Linux?
There are few ways of doing it. In one of them, your C program will have to handle the entire communication with your device, replacing the Hyper Terminal. In other words, your C program will do what hyper terminal does. Then you'll be able to store whatever your device send to PC.
The website link eXnol post is a good start. First, answer the questions so I can found out how to help you.

Regards
 

For storing data in computer you need to write a small application.

You can write that application with VB, VC or any other language.
I would suggest delphi.
 

if you are planning to use Visual Studio or one of the free Visual Express editions such as Visual Express C++, C# or VB they come with a SerialPort component. Open the Toolbox and look under Components. SerialPort allows you to send and receive characters via a serial COM port (including USB to serial converters)
 

On the hyper terminal it self have one option to capture log....that also you can use to store the data that you read.....it is there on the top tab.... Similary hyper teminal there is freeware called as teraterm which is also good and come with same facility

Good Luck
 

look at this post for C# solution. https://www.edaboard.com/threads/235185/ Much quicker to write an application in C# compare to C or C++ in my opinion.

To write into a file use TextWriter or StreamWriter. There are plenty of examples in the internet. If you come into problems with cross-thread, invoke is the solution just in case you stumble into this problem with C# and if decided to use C#.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top