l293d problem

hey guys, im not able to drive a single motor with l293d

i am using 4 AA batteries connected in series to drive a motor. motor runs when it is directly connected to battery.

so from above figure i connected :-
pin 1 to arduino pin 11
pin 2 to arduino pin 7
pin 7 to arduino pin 2
shorted both grounds pins 4 and 5, connected AA battery -ve to ground, arduino ground also to ground of l39d
connected aa battery +ve to 8
connected motor to the 2 terminals 3 and 6

and im using this simple code just to check if its working

int a = 11;
int b = 7;
int c = 2;
void setup()
{
  pinMode(a, OUTPUT);
  pinMode(b, OUTPUT);
  pinMode(c, OUTPUT);
}
void loop()
{
  digitalWrite(a, HIGH);
  digitalWrite(b, LOW);
  digitalWrite(c, HIGH);
}

but it does not work, what mistake am i doing?

Try connecting +5V to pin 16.

Pin 16 is the chip logic power supply (+5V only).
Pin 8 is the power supply for the motors (+5 to +36V).

John_S:
Try connecting +5V to pin 16.

Pin 16 is the chip logic power supply (+5V only).
Pin 8 is the power supply for the motors (+5 to +36V).

connected 5v to 16, still not workin

Maybe post a clear picture of your setup?

guys sorry, my breadboard was the damn problem!!!!

its vertical rails are not connected there is a disconnection in between!!!

same thing with all the 4 vertical rails :expressionless:

guys can i apply the PWM signal to enable 1 on the l293d to get desired speed????

the official rev 3 board does that (different chip)
http://mcukits.com/2009/03/12/assembling-the-freeduino-arduino-motor-shield/ does also

I looked at the spec sheet and it looks like an acceptable thing to do

kiriti:
guys can i apply the PWM signal to enable 1 on the l293d to get desired speed????

Yes.