pradipmagar001@gmail.com
Newbie level 4
In pic16f877a 10bit adc is there. I have configured CCP module for PWM operation. I am facing the problem that
CCPRL is 8bit register and adc result is 10bit and it is in two registers ADRESH and ADRESL. I have taken it in single variable by using following method-
adcval=(ADRESH<<8)|ADRESL;
but now problem is that how to load this 10 bit value in 8-bit CCPRL register as a new timebase?.
please help..
this code is running very good for pic16f72(8 bit adc).
CCPRL is 8bit register and adc result is 10bit and it is in two registers ADRESH and ADRESL. I have taken it in single variable by using following method-
adcval=(ADRESH<<8)|ADRESL;
but now problem is that how to load this 10 bit value in 8-bit CCPRL register as a new timebase?.
please help..
this code is running very good for pic16f72(8 bit adc).