cant drive my h-bridge

Status
Not open for further replies.
hi , i've two PWM pins from PIC16F877 , the problem is im using L298 and i already have 10 PCBs and the enable pin is tied to 5V , i dont know how to pwm the h-bridge then at the same time i want to reverse and forward the motors forward and backward ....

is there a simple soultion to achive that ?
thanks
 
You already know, use the enable pin! - if you've made the PCB's wrong then get a sharp knife around it!.
 
cant i drive the PWM pin to the IN1 ( input 1 ) ? and use a transistor to cancel that line when i want to use the input 1 as it is ?
hope u understood me ?
 
ahmedragia21 said:
cant i drive the PWM pin to the IN1 ( input 1 ) ? and use a transistor to cancel that line when i want to use the input 1 as it is ?
hope u understood me ?

There are plenty of things you can do, but all of them far more complicated than using the enable pin - for example you can use a handful of logic gates to steer the PWM to the correct pins. Cut the PCB and run a wire!.
 
ahmedragia21 said:
ok , i will try to cut the pcb
what's a good PWM Frequency for a line follower robot to move smooth ?
1khz ?

That would be fine, you don't want to go too high, but 1Khz to 4KHz should be no problem.

If you want sample PIC code for PWMing a robot, check my 'tutorial' - it gives basic two channel speed control code for just what you want.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…