I\p & o\p setting

Status
Not open for further replies.

sahu

Member
right now i am facing some problem about i\p , o\p & adc setting .use 16f676.
Code:
TRISA0_bit = 1            '   input
  TRISC = 0x00              ' Set PORTc as output
  CMCON  = CMCON or 0x07    ' turn off comparators
  ADCON1 = ADCON1 or 0x00   ' Set AN0 channel pin as analog

description....
pl clear me where i wrong ?
 
CMCON =0x07 is right but you need to set this to make the ADC work right

 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…