L293 Driver not stopping
July 14, 2010
So I'm building a line following robot that is directly wired from the Atmega8 to a L293 motor driver chip and then obviously to some motors.
The Atmega8 is sending manual PWM signal to the L293 driver on the forward pins. By that I mean I have code like:
if( ticked <= duty_cycle)
PORTD |= LEFT_FORWARD;
else if(ticked <= period)
PORTD &= ~LEFT_FORWARD;
All other pins on the L293 are logic low. Except obviously for the 2 Vcc pins which are supplied by a 6V battery and also for one enable.
Without the L293 motor driver in all the voltages are showing what I expect. Importantly the enable to one motor is high while the enable pin to the other is low and PWM is being sent to one forward pin. However when I insert the L293 motor driver in both motors switch on and the voltage on both enable pins has become high.
How do I fix this?