This section will explain the software we wrote to interact with the bench.

Assembler :

This machine-level code is used to write the instructions into our PIC16F876A micro-controller chip. The amount of instructions useable depend on the micro-controller used. The number of instructions we could use were a mere 35.

Our main program consists of several parts :

* Counter

As you will see on the picture of the encoder in the Hardware section, the encoder has several little holes in the disc which are used to determine the displacement. This program counts the amount of holes the sensor has passed, and sends this to the pc via the serial port.

 

* A/D Conversion

We mentioned in the Outline section that the voltages measured are proportional to the force applied. Knowing this resulted in finding the proper conversion factor. This factor will be used in the Visual Basic program to display the correct force.

The Visual Basic program therefore needs to acquire the proper voltages, hence by using A/D conversion we will be able to send these through.

 

* Serial Communication

Program used to send the acquired and processed data through to the computer.

 

The complete program can be downloaded here.

Each step of the Assembler code has been commented in full, if you have any questions don't hesitate to contact us.

Visual Basic :

Visual Basic was used to create a nice looking interface for the users of our program.

It consists of 3 parts :

* Serial Communication

This part of the program will start reading the data once the PIC starts to transmit data.

* Display of incoming data

A graphical user interface made to display the data received ( the displacement, force applied ).

* Graphical representation

With this program, we are able to show the received data in a plot.

 

The complete program can be downloaded here