Example Program: Closed Loop w/Multitasking

This is an example program using an Interrupt Timer to perform multitasking in easyC Pro. The control loop runs at 66Hz while the main loop is running much slower at 20Hz.

The Motor is connected to Port 1
The Potentiometer is connected to Port 1
The Button is connected to Port 5

You can see live feedback on the terminal window.

Pressing the button increments to the next angle.
Control Loop.zip (2.89 KB)