I have already mentioned the content about C, C++, connecting with PC Port. It’s not too hard. It’s hard at graphics that we write to put together with using, especially program ran on DOS. In this present, programming as Visual is populating because it can be GUI conveniently and not too hard. So, I try to use Microsoft Visual Basic 6 that is in Microsoft Visual Studio 6, for function and step of programming code for connecting port is not much because wizard program of MS VC++6, is created all for us.

In this program, we will use file conio.h that is include file for using function _outp() and _inp()

In this section, I will do as explanation with pictures (Visual Learning), controlling with messages and the arrange of number shown because if you write explanation as the last contexts, you will be hard to understand.

1. Open the new project of MS VC++ 6

 

2. Go to Step1MFC AppWizard dialogue.

 

3. Go to the last Step MFC AppWizard

4. Create GUI form and edit, give the name, add Value to Combo, etc.

5. Edit language of alphabet for controls in form.

6. Create Event Select to control Combo box.

 

 

7. Create Event Click to control Check box.

8. Set variable to control Combo box.

 

9. Set variable to control Check box.

 

 

 

10. Set variable to control Edit box.

 

 

11. Set file Include “conio.h”, Number of port address and variable.

12. Write code to control working of the new port in each Event that is already created.

This is program that is run by choosing port A of Card I/O 8255.


The learning outcome of this article

  1. To know how to program by Microsoft Visual C++ to control I/O Parallel Port’s working.
  2. To know how to apply GUI for programming because it’s easy and convenient for using.
  3. To know how to use by programming by Include File from using conio.h.
  4. To know how to use wizard of MS VC++6 to manage Event and variable of control.