Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
 
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.

Latest threads

New Articles From Microcontroller Tips

Back
Top