Sunday, October 30, 2005

PWM success & failure

So I have PWM working on the PIC 16F684A. I intended to use it with the DC motor controller based on the L298.

Well, PWM into the I1 and I2 inputs (the direction inputs) works fine, but PWM into the Enable input causes the circuit to screw up in some way, it looks like perhaps trying to drive the motor in two directions at once. My theory was to move the I1 and I2 lines to indicate direction, and use the enable to provide the PWM slow-down of the windshield wiper motor. I think I blew out a 16F684A in the process of testing.

Now I need to change things around to PWM into the I1 and I2 inputs, and just leave Enable tied to high. Since the 16F684 only has one PWM output, I am either going to have to use it with an AND gate to gate the I1 and I2 signals, or I could go back to the drawing board and make my own I1 and I2 PWM outputs using times interrupts on the 16F684A. I'm a big believer in reducing chip count, and I'd like to learn about timed interrupts on the PICs, so I will try to do it the latter way, and if I fail, I can just throw an AND chip at the problem.

No comments: