High Level Programming with C++ and Digital Interfacing [A Simple Laboratory Experiment]

Essay by TwiStaUniversity, Bachelor'sA, March 2003

download word file, 2 pages 4.7

Downloaded 59 times

Laboratory Experiment 1:

High Level Programming with C++ and Digital Interfacing


The prospect of interfacing a physical digital device with the use of software, and affecting the output of software with a physical digital device was investigated. The computers were fitted with ports which were connected to a digital device, which were not part of the computer itself. Software on the computer was used to test weather or not the digital device could be manipulated through the use of the software to denote a string of bits which represent an ASCII character.


The aims of this experiment were:

*To introduce the concept of programming in a high level language and its compilation.

*To investigate the representation of text characters by binary ASCII codes.

*To introduce digital interfacing to hardware through software.


Conventional computers are digital machines in which information to be processed, as well as the instructions themselves for the processing, are represented by binary codes.

These binary codes are string of 1's and 0's, for example; 0110 1101. It would be extremely difficult to write programs in binary code. It is more convenient to write programs in high level programming languages that are more readable for people, but can be converted to binary code for the computer to understand.


For this experiment the computer was connected to a panel of eight switches and eight LEDs. The LEDs to provide the output from the computer and the switches to provide the input to the computer.

Each LED had a corresponding switch below it on the panel. Each individual switch and LED represented one bit of data and all eight of them together represented a byte.

The C++ program provided was able to send a byte of data to the LEDs and was able to read...