August 2008
Beginner to intermediate
304 pages
6h 2m
English
• Motor test program
• Rev counter program
The primary target device on the board is the DC motor. The hardware configuration is shown in Figure 4.8. The first program just switches the motor on and off, and the second shows how to control the speed.

The minimal program (Listing 4.5) shows how to run the mechatronics board under the control of SW2. The motor is connected to Drive1 and Drive2 output terminals, with two output bits of the MCU linked to P1 and N2. When these go high, the motor current is switched on in a forward direction. The output code ...
Read now
Unlock full access