OK here's a challenge for you blokes!
This is my first robot/uC project. I am studying electrotechnology as a student, but only at an early stage, so I don't have the skills to solve this problem ( yet ? ).
Problem: fault finding electrical motor driver circuit connection/s on a breadboard.[ Now this problem probably needs me to take a photo of the circuitry, or draw a diagram, but I thought ( vainly ) that it may be a grounding problem or similar with my unused/floating pins/ports on the uC, so I haven't done so until necessary. ]
Anyway, the first stage of my first robot project is trivial ( for experienced 'bot heads ), but not for me - drive two small motors that drive a Tamiya twin-motor gearbox using a Texas Instruments L293DNE Half H-bridge driver using PWM modulation via two PWM modules on a PIC16F876A.
OK, here's the thing. When the PIC is on a demo board ( Mikroelektronika EasyPIC 2 ), and I use the set of IO pins for Port C and run jumper wires ( including an Earth from breadboard to demo board Earth Port C IO ) from the demo board onto my breadboard circuit, the motors run according to my test software OK no probs. NOTE: if I remove the Earth off the demo board the motors stop, so I guess it's a grounding/connection issue, because we KNOW the demo board is configured OK.
HOWEVER, when I place the PIC ( and crystal ) onto the breadboard circuit ( minus jumpers from demo board, of course ), guess what happens? - no movement in the motors. All unused pins are floating, except MCLR, which is tied LO to Earth via 470 R resistor.
I have tried trouble shooting myself, thoroughly, and at one stage I got the motors running by changing their power connections, but I think there was too much noise ( everything on one power bus ), because the motors were not following their program, so I changed to two power buses, added some more caps, and now the motors work fine - but only when the PIC is on it's ( wired properly ) demo board. I have done many Google searches for photos of similar breadboard circuit also to attempt to resolve the issue by myself.
I have tried tying all unused pins LO ( or was it HI ? or both ? - confusing, isn't it with so many variables for a newbie ) using resistors.
- Does Port A need special settings because it has AD/DA modules? ***
If anyone is game ( crazy ) enough to respond, your help is much appreciated.
I plan to document my project on my website eventually to help other beginner 'bot heads with similar problems.