The logic to control the two lines of the TPIC0108 uses the following truth table:
|
|
DIR |
|
IN1 | IN2 | comments |
| 1 | ? | ? | 0 | 0 | quiescent hi-Z (off) |
| 0 | ? | 0 | 1 | 1 | brake |
| 0 | 1 | 1 | 0 | 1 | one way |
| 0 | 0 | 1 | 1 | 0 | the other way |
The equation for IN1 is as follows:
| (12.1) |
Whereas the equation for IN2 is as follows:
| (12.2) |
This allows a PWM line be used for each channel. Note that the PWM signal and the BRK signal are both active-low so that the default state can be pulled-up when the controller is in reset state.
This plan uses 3 input channels per H-bridge for maximum flexibility. Since this is often only useful for DC motors, we only need to use 6 lines from the MCU to control two DC motors.
Copyright © 2006-02-15 by Tak Auyeung