program for pic18f4550

Thread Starter

sreeraj17

Joined Feb 8, 2007
5
hi,
we are writing a C code for pic18f4550 for doing adc conversion and pwm. the adc output is stored in a register. we have to copy 2 bits(LSB) from this 8-bit ADRESH register to the pwm register CCP1CON. plz give the c code statement to do this!!

we wrote the following statements but its not working..

CCPR1L=ADRESL;
CCP1CONbits.DC1B1 =ADRESH;
CCP1CONbits.DC1B0 =ADRESH;

plz help.......
 
Top