Solved

Serial Port Communication in 16-bit Borland C

Posted on 2004-10-04
3
928 Views
Last Modified: 2012-06-21
I currently in stage of developing a dos based program that could replace our current windows based terminal emulator program. This program is capable to send & receive character in ASCII format and view the data in command line. This program is targetted to provide communication between PC and external electronic device via serial port. I need to program in Borland C since this program will link with other subroutines in this format.
Example communication is :

User send command "C 1" ( i.e C-space-1 )

and the external device will respond with :

<< GRIPS >>

[GRIPS] Interrupt Disable
[GRIPS] Wait Disable
OK

#======================================#
Diag>
#======================================#
[GRIPS                      ] -> [OK]
 +-[REGISTER(IC501)         ] -> o

>>Diag

if the external devices is fail, no respond will be received.

Communication protocol will use COM1 with 38400 baud, No parity, 8 data bits & 1 stop bits.

I am relatively new in port communication within Borland C environment. Hopefully I can get example in order to complete this program.
0
Comment
Question by:eazrul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Expert Comment

by:Amritpal Singh
ID: 12224107
plz have a look at the following link

http://www.traverse.com/people/poinsett/bcbcomm.html

i hope it'll be of any help
0
 
LVL 6

Expert Comment

by:Amritpal Singh
ID: 12224116
0
 
LVL 9

Accepted Solution

by:
ankuratvb earned 500 total points
ID: 12227750
You can use bioscom() from TurboC's library:
See:
http://www.experts-exchange.com/Programming/Programming_Languages/C/Q_10030385.html

OR

Check these sites out,they've got very easy to follow,detailed tutorials on serial port programming in 16 bit:

www.beyondlogic.org
www.lvr.com/serport.htm

http://www.experts-exchange.com/Programming/Programming_Languages/C/Q_20794926.html

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Suggested Courses

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question