How to make RS232 interface in C/C++?

Status
Not open for further replies.

cdbular

Junior Member level 1
Joined
Aug 9, 2004
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
101
How to make RS232 interface in C/C++?
 

Hi,
there are many functions (APIs) that help you in this using windows. In old days you had to make a system call.
B R M
 

Dear cdbular,
For making RS-232 communication using C/C++ I suggest you the book "C Programmer`s Guide To Serial Communication" By CAMPBELL. This is a ultimate book I think. You will find lot of info. for serial communication. Also lot of code written in C/C++.

Regards.
 

see
http://www.lvr.com[/url]
 

cdbular said:
How to make RS232 interface in C/C++?

assuming you're doing MFC in Windows, you can google "MFC serial port"
or any thing similar..
lots of short tutorials for you.
 

This and more abour Rs-232 is explained in the book :
Serial port Complete !
Available at our ebook forum.
 

hi,

if u r using VC++ then try following link

**broken link removed**

u will get code for windows

else if u r doing in c then u can search for BIOSCOM in ur compilers help
 

This is a simple code. If u have a serial cable and you connect the Pin No. 2 and 3 together.... which are actually trans and receive.... than u can run this and check.

It sends a number or character(1 byte only) and receives it and displays it.
have fun...
 

in matlab there is a function "serial" which couldbe used to communicate with rs232
any one have used this function please
 

hi,
there is a book "serial port complete" which will help you clear most of your doubts regarding serial port.
 

can you tell where can i find e-copy of this book
 

and please, always do a search before asking a question
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…