Real Time Distributed Control Systems

 

2007/2008 1st semester

 

~ Project Notes and Help Tools ~

 

 

Description of the project

 

 

 

Hardware components

 

 

 

Software samples

 

 

 

Developing code for the PC

 

In order to develop code for the PC, you will be using the Microsoft Visual C compiler. Necessary libraries:

 

 

Developing code for the microcontroller

 

The programming for the microcontroller is done in C using the Franklin Proview32 compiler and some libraries already developed.

 

     

 

Libraries already available for the microcontroller (see the sample code section):

 

 

Flashing the microcontroller

 

In order to flash the microcontroller, first run the flashloader program (see next figure). Clicking on the flash icon executes all the steps listed under the "Automatic upload" section.

 

 

In order to effectively load the program, switch the microcontroller board to the programming state and reset the microcontroller board. In case the synchronisation fails, i.e. the Log messages reports the fail condition, reset again the microcontroller board. This is due to mismatched clocks of the PC and the microcontroller and thus is expected to happen sometimes.

 

After the flashing, switch back the microcontroller board to the run state and reset it - the program should start running immediately. Note that you can listen to the motor and fun going to a maximum operating mode right after resetting the microcontroller / program - this is expected as the program has explicitly to put a zero to the PWM output port, and that usually takes a while due to other initializations.