hai,I am new to Pic microcontrollers.Is it possible to use the 2 PWM channls in PIC 16f877A simultaneously?i have a code for pwm in ccp1 module.I want two pwm for controlling two motors.How can i use ccp2 in pwm mode?I use MPLAB IDE,HI TECH C complier....pls anyone provide me the code
hai,I am new to Pic microcontrollers.Is it possible to use the 2 PWM channls in PIC 16f877A simultaneously?i have a code for pwm in ccp1 module.I want two pwm for controlling two motors.How can i use ccp2 in pwm mode?I use MPLAB IDE,HI TECH C complier....pls anyone provide me the code
Yes it's possible to use both channels simultaneously. PWM module 1 settings are set by configuring CCP1CON. PWM module 2 settings are set by configuring CCP2CON. So, just configure CCP2CON for PWM mode just as you'd do for CCP1CON. Remember that both modules share the same time base - PR2. So they'll both operate at the same frequency. This shouldn't be a problem since you'll be controlling 2 motors.
ADGO refers to the ADGONE bit in the 16F877A. How a bit is defined in the compiler is found in the related header file. So, you should consult the header file for PIC16F877A for your compiler.