12.1.3 TPIC0108 Chopper Drive Logic

To perform software controled chopper drive, it is necessary to use a PWM signal to enable and disable the device. Each coil requires its own PWM signal.

We can build on top of the equations in the previous section. The trick is to utilize the output enable line and a pull-down resistor for each output. This way, we can connect the PWM (output compare) signal from the MCU directly to the output enable signal. When a pin is not driving, the signal defaults to 0, and the corresponding H-bridge goes to Hi-Z state.

The modification is as follows:


$\displaystyle \mathrm{A.IN1.oe}$ $\textstyle =$ $\displaystyle A.PWM$ (12.11)
$\displaystyle \mathrm{A.IN2.oe}$ $\textstyle =$ $\displaystyle A.PWM$ (12.12)

This approach requires the use of four output compare channels. In addition, the duty cycle needs to be controled dynamically (the overflow interrupt needs to change the duty cycle).

Copyright © 2006-02-15 by Tak Auyeung