L293 DC Motor Control problem!!

Hello guys. I´m trying simply to control a DC motor to make it run using a PWM, but it is just impossible to me! I already made it work with a L298 but now I just can´t do it anymore. I´ve checked everything many times, and everything seems to be right! So I took a picture of my circuit to show you, so maybe you can tell me if I´m doing anything wrong!

This is the picture

and the picture of the whole thing


this is the program I´m using

int motorPin1 = 4;
int motorPin2 = 2;
int PWM1 = 3;

void setup() {
 pinMode(motorPin1, OUTPUT);
 pinMode(motorPin2, OUTPUT);
 pinMode(PWM1, OUTPUT);
}

void loop() {


 digitalWrite(motorPin1, HIGH);   
 digitalWrite(motorPin2, LOW);
 analogWrite(PWM1, 255); 
}

Can someone tell me what am I doing wrong??

Thanks you all!

Sorry, but your pictures are too small for us to look for any wiring errors. You'll also need to provide some information on what kind of power source you are using for the L293. Also, did you remember to connect the ground of the L293 to that of the Arduino?

--
The MegaRAM shield: add 128 kilobytes of external RAM to your Arduino Mega/Mega2560

RuggedCircuits:
Sorry, but your pictures are too small for us to look for any wiring errors. You'll also need to provide some information on what kind of power source you are using for the L293. Also, did you remember to connect the ground of the L293 to that of the Arduino?

--
The MegaRAM shield: add 128 kilobytes of external RAM to your Arduino Mega/Mega2560

Sorry, these are the images

The power source is the battery shown on the picture and yes, the L293 is on the same ground of arduino!

Thanks for the quick answer

And this is the datasheet of my CI L293E

Hi,
Ok, it worked once and now it doesn't.

Maybe something got damaged. Divide the problem. Connect a small 12V bulb in place of motor and see if you can control it. Run the motor directly from the battery, both directions.. It's not that many wires. Remove them all, rewire?

Detective work!

terryking228:
Hi,
Ok, it worked once and now it doesn't.

Maybe something got damaged. Divide the problem. Connect a small 12V bulb in place of motor and see if you can control it. Run the motor directly from the battery, both directions.. It's not that many wires. Remove them all, rewire?

Detective work!

I already did it, and it works fine!

I'm using this protoboard:

How do I do to find out wich column of it is the ground and the positive?? Maybe this is wrong in my circuit! =/

Big Breadboard!

In this case you need to decide which columns are + and which are ground.

Use an LED and resistor to check. Maybe mark them with colored marker..

This is why I really like these colored ones: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=125

DISCLAIMER: Mentioned stuff from my own shop...

Problem solved. The IC was messed up! I just bought a new one and everything worked perfeclty!

Thanks you all! =)