Hi all,
I am using PIC16f877A to control 2 PWM outputs, which is RC1 and RC2. Below are the sample program for both PWM:
***************************************************************************************************************************************************
#define fanA RC1
#define fanB RC2
CCP2CON = 0b00001100; //PWM Mode
//PWM frequecy set as 4.88KHz
PR2 = 0xFF; //PWM Period Setting
T2CON = 0b00000101; //Timer2 On, prescale 4
//High Speed
CCPR1L = 255;
delay(5000);
fanA=1;
CCP1CON = 0b00001100; //PWM Mode
//PWM frequecy set as 4.88KHz
PR2 = 0xFF; //PWM Period Setting
T2CON = 0b00000101; //Timer2 On, prescale 4
//High Speed
CCPR2L = 255;
delay(5000);
fanB=1;
***************************************************************************************************************************************************
Here is the connection for the fanA and fanB
I measured the voltage output from RC1 and RC2 only get 0.05V only with 255. Is the 255 maximum value for the PWM? Don't it should be output 5V?
Please advice. Thanks a lot.