Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Willythe57 on January 14, 2009, 04:37:34 AM

Title: PIC 16F876 need help building a circuit
Post by: Willythe57 on January 14, 2009, 04:37:34 AM
Hello everyone ;D
I'm doing a robot for a school project and the only thing that was given to me was a PIC 16F876
I will need to program it to control 2 DC motors
and to interact with a few tactile bump sensors.
The problem is I don't know how to build the circuit first, so I could program the PIC.
I allready bought a full bridge driver.
I looked on the internet, i found a few things but not enough to know how to build the circuit.

Could you please help me?

Thank you in advance for your Help
Title: Re: PIC 16F876 need help building a circuit
Post by: ArcMan on January 14, 2009, 03:48:07 PM
In order to build the circuit, you first need to understand the PIC.  Read and understand the data sheet.
You will wire the the 2 PWM outputs to the 2 H-bridge motor drivers, and connect the bumper sensors to discrete inputs.  Your motors will, of course, be wired to the H-bridge drivers.
Title: Re: PIC 16F876 need help building a circuit
Post by: Willythe57 on January 17, 2009, 07:04:55 AM
ok, i have to wait for the material now. by the way, do you know any good software to virtualy create a circuit?
Title: Re: PIC 16F876 need help building a circuit
Post by: BEAMer on January 17, 2009, 11:51:58 AM
Try proteus.... its really good for simulating microcontrollers and processors.. all you have to do is write a code, compile it to get a hex file... load it onto the simulator and it works. try the latest versions, it has the motor bridge models also....

hello ArcMan, i am not sure, but do you require a PWM for controlling DC motors. wont just 4 bits to the bridge do?

BEAMer
Title: Re: PIC 16F876 need help building a circuit
Post by: Webbot on January 17, 2009, 08:28:20 PM
Quote
do you require a PWM for controlling DC motors. wont just 4 bits to the bridge do?
Depends on whether you just want: forwards, back, left, right,stop (via 4 bits) or if you need a variable speed control ie PWM.