Ok, the motor driver IC is for one motor so you will need two of them for two motors. IN1 & IN2 would be driven from the PIC. This Chip does not lend itself well to being PWM speed controlled by the PWM hardware module of the PIC due to needing to toogle two inputs.

The IR sensor requires a modulated IR light source of 38kHz. This sensor is commonly used for TV remote controlls and there is lots of info on the web on using these for Bot sensors and other purposes.

I don't know much about MikroC as I use HiTech C compiler and the MPLAB IDE from Microchip.

Quote

very desperate to have my project done by FEBRUARY

And you first posted mid-way through February!!!!!

What have you gotten done?Post the schematic you have and any code written. We'll try to help but remember this is not 'desperate' for any of us.

If you haven't started and have never written code for PICs then I'll estimate that if you work on this for several hours a day you could have the project done in a couple of months.

hi walter thanks for the kind replies, ive used 2 motor drivers. but i dont know if i am using the right ic to put pwm on my program to work on,.. pls i need some expert advice.,. im still a newbie, anyways deadline was pushed till 2nd week of march.

and i hope to fininsh this the soonest,.

i dont know about about speed controllers and how to manipulate them, but if i can put speed controller on my sumobot w.o using pwm and the hassle of programing it, then i thinks its already been done,. or im done with the project.

i was thinking of voltage divider if it is possible to drive as speed controller,.

i will post here my schematics and my ckt on sensors. as i have used 2n222a for my sensors and 555 timer to produce 38khz of fixed frequency to detect my object.

looking forward to chat with you again man,.

cheers,DON

A voltage divider will not work for speed control with the driver chip you have.

I'm now thinking that you may not need any speed control for a Sumo Bot. Just go, stop, reverse, turn right, turn left. This would be easy to program and help in meeting your deadline. So for now forget about using PWM and just use the logic table in the motor driver data sheet.

Get the motors and driver chip wired and start testing. Look at some of the other recent threads here any other issues.

The other complication with speed control is the feed-back requirement. Save this for another Bot.

I have used those 38kHz sensors on a Bot for object detection and they do work well. Hint: I adjusted the distance of detection by adjusting the modulated IR LED current (LED's series resistor value). Another is shielding the sensor from the IR LED or shielding the IR LED. You want the sensor to only 'see' the reflected IR LED light.