Testing PIC 16F690 PWM 4 multiplexed channels
I have just acquire this PIC 16F690 due to lack of hardware support from my old PIC 16F628a. Didn’t have I2C Slave by hardware and only 1 PWM (pulse width modulation) module available! I2C Slave by hardware was already tested on my previous post!
I have tested the PWM on this new PIC and found the results to be beyond my expectations! It is also configured with 1 PWM module but with a special capability! This signal will be available in pin RC5/CCP1/P1A and can be multiplexed to 3 other outputs, RC4/C2OUT/P1B, RC3/AN7/P1C and RC2/AN6/P1D. For P1A output the PWM signal will always be present but for P1B, P1C and P1D can be set/reset at any time. In my next example I will configure a PWM pulse with frequency of 500Hz (2ms period) and Duty-Cycle to 25% available to outputs P1A and P1B. From 3 to 3 seconds will switch configuration to activate/deactivate PWM pulse on output P1B.
This will be required to drive my previous module that will control the DC motors (will need to have PWM switching between P1B and P1C - this will invert DC motor direction): http://www.botdream.com/blog/2007/11/01/2nd-h-bridge-circuit-is-now-completed/
For this test I’ve assembled the following circuit:
Continue reading »
 

Recent Comments