Is there a way to perform serial communication using c?
I have an RS232 output from a AD converter, i was wondering if any one knows of links or even ways of interacting with the serial port.
Thank!
Is there a way to perform serial communication using c?
I have an RS232 output from a AD converter, i was wondering if any one knows of links or even ways of interacting with the serial port.
Thank!
On what platform?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
windows xp
i have found termio.h and bios.h but i will take any advice or direction you can give
This sounds pretty intense
This article assumes a familiarity with the fundamentals of multiple threading and synchronization in Win32. In addition, a basic understanding of the Win32 heap functions is useful to fully comprehend the memory management methods used by the Multithreaded TTY (MTTTY) sample included with this article.
This site might be interesting:Is there a way to perform serial communication using c?
I have an RS232 output from a AD converter, i was wondering if any one knows of links or even ways of interacting with the serial port.
http://www.beyondlogic.org/
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
so that means using win32 is better than using bios.h etc... the MSDN article is very good. im enjoying it so far
Actually, bios.h is probably better than the "direct IO port approach", but it's still going to end up with a fair bit of overhead, since the BIOS call performs a software interrupt, the NTVDM (which is the part of the Windows kernel that deals with DOS applications) will intercept the sw interrupt, and look at the various register values to figure out what it means, then translate that to a call to the relevant Win32 file operation, wait for that to finish and return the result back through NTVDM into your applicaiton.
In the case of a direct port access, the story is slightly more complex, because the NTVDM keeps track of the port state, simulating the serial port and then performing the same Win32 file operations to actually access the port. So it's pretty much the same.
And in the end, you still end up in the same Win32 API function - but you went across the road so that you could get to the shop that is on your side of the road.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.