 |
Visual C++.NET Simple Console Project (Windows) |
MCC technical support has created a Visual C++.NET simple console
project for our ASCII-interface I2C Bus host adapters. This project
includes a Visual Studio 2005 solution file, project files, source code
file, and ASCII iPort Class Library assembly files that can be use by programmers
as the basis for custom applications.
Supported MCC ASCII-interface I2C Bus Adapters:
Project Features:
-
Simple, easy to understand.
-
Small amount of code.
-
Linear programming style, no separate event handlers.
-
Includes error handling.
Project Requirements:
-
A supported MCC ASCII-interface I2C Bus adapter (See Above).
-
Visual Studio 2005 or newer, Express, Standard, or Professional Edition.
-
MS .NET version 2 or greater (included with Visual Studio 2005).
Project Installation and Use Instructions:
-
Download the sample project (CPPASCII01.ZIP,
35KB).
-
This project is distributed in compressed form (.ZIP). You will need to
"extract", or “unzip” the compressed files into a new project folder using
Windows Explorer (Select File, Right Click, Extract All), PKUnzip, or other
compressed file extraction software.
-
Run Visual Studio 2005. Within Visual Studio click "File | Open Project…,"
then Browse to the new project folder.
-
Within the project folder you will see a file with the .sln extension.
This is the Visual Studio 2005 “solution” file for the project. Select
this file and click “Open”.
-
Once the project opens, you can view the source code by double clicking
on the source filename in the “solution explorer” window on the right hand
side of the screen. You will also see a reference to the ASCIIiPortLib.dll
Class Library file. This library file provides constructors, methods, properties,
and events used to access the MCC ASCII-interface I2C Bus adapter.
-
Browse through the source code until you find a line that includes a call
to “iPort.Open(…)” This call contains a reference to “com1”. Change this
to the serial port connected to your I2C Bus adapter.
-
In Visual Studio's main window click “Debug | Start Debugging” to start
the program.
-
Congratulations! You have just built a Visual C++.NET application for an
ASCII-interface I2C Bus adapter.
Programmer's Reference:
Revision Report:
20-JAN-07 Initial release.
15-MAY-07 Improve user interface.
Can't find the answer to your question here? Then e-mail your question
to us at support@mcc-us.com
I2C is just a mouse click away TM