rparthiban69
New Member
i need to vary pwm 0 to 255 by using com port. PR2=0x3F: // 8bit resolution
//CCPxCON calculation
Value=ucdata;
Value=Value<<4;
CCP8CON= 0b00001100 | Value;
//CCPRxL calculation
data=ucdata/4; // changing 128 bit resolution
CCPR8L=data;
this calculation is changing PWM only vary 0 to 128 only.
how to vary the pwm (0 to 255) by using this calculation?
//CCPxCON calculation
Value=ucdata;
Value=Value<<4;
CCP8CON= 0b00001100 | Value;
//CCPRxL calculation
data=ucdata/4; // changing 128 bit resolution
CCPR8L=data;
this calculation is changing PWM only vary 0 to 128 only.
how to vary the pwm (0 to 255) by using this calculation?