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.

Program in C to read data from a serial port.

Status
Not open for further replies.

Daniz40

Member level 3
Joined
Jan 12, 2006
Messages
57
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
Islamabad
Activity points
1,818
Dear All,

I want a code that reads data from a serial port.
Any help in this regard would be helpful
Thanks
 

Try 'beyondlogic.org' for info and sample code.
 

microsoft has provided an activex control for serial communication called MSCOMM .
you can use it in your program.
 

If you want to do that job in A DOS mode, you will use the DOS or BIOS interrupts for serial port handling.
 

Hey all
I was having the similar query as posted by Daniz40.
I used the example of inportb command as given in help of turboC and supplied data to serial port by using a microcontroller. But it displayed the default 0x0 as the data read.

Can someone identify the problem here.

Regards
tronix
 

go here: **broken link removed**, search there,you will find a sample code which write to and read from serial port. It is very easy. I have used it but Unfortunately I don't know where it is now. if you have problem using it contact me.
 

See Terraterm source code.
 

Hey all
Thanks for suggestions. I found the code on beyondlogic.org and its working perfect.

**broken link removed**

Regards and Thanks
tronix
 

tronix said:
Hey all
I was having the similar query as posted by Daniz40.
I used the example of inportb command as given in help of turboC and supplied data to serial port by using a microcontroller. But it displayed the default 0x0 as the data read.

Can someone identify the problem here.

Regards
tronix

Newer versions of Windows don't allow direct register writting.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top