|
This is a simulation of the H-bridge circuit described in the L298 datasheet (refer to the L298 Dual Full-Bridge Driver).
It is controlled by the logic sources on the left side, which are, from top to bottom PWMA, EnA, In1, and In2.
Operation is as follows, using the bottom three inputs [EnA, In1, In2], and 'X' is don't care:
[0,X,X] motor stopped
[1,0,0] motor stopped
[1,0,1] motor runs counterclockwise
[1,1,0] motor runs clockwise
[1,1,1] motor stopped
To control motor speed with pulse-width modulation (PWM), use the switch to select the top input, which is a logic train of pulses currently set to a 50% duty cycle (a 50% duty cycle means the pulses are on for 50% of the time). A 50% duty cycle gives the motor half speed. The motor speed can be controlled by changing the duty cycle.
|