Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C++ interface to hardware

Status
Not open for further replies.

mcklsn

Programmer
Mar 16, 2003
40
0
0
US
I need to write some code in Visual Studio which interfaces directly with the serial, parallel, and keyboard ports of the PC. I have many years of experience doing this in assembley language in embedded systems, but when I try to understand what the Microsoft C++ programmers have provided to allow me to do this on the PC, I feel like I'm trying to read Sanskrit. I've looked in MSDN and the stuff reminds me of the old IBM manuals we used to get; they were great for reference if you already had an understanding of what you were doing, but if you didn't..... Is there any place I can go to get a basic explanation of the use of the various I/O calls (readfile, writefile, openfile, closefile, etc.) with reference to their use with the hardware and not just disk files? Please help. I feel like I'm drowning.
Thanks for any help you can give.
 
Read the stuff about CreateFile(), WriteFile() and ReadFile() API's. "COM1" or "LPT1" as file names should be used. Dont know about the keyboard. I had to do with it some years ago, as I remember, there are some good techniques like overlapped I/O or something.
You probably could try to write subroutines in assembler as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top