pic16f877

Status
Not open for further replies.

pinky

New Member
hi

i am using adc of pic16f877 and i am giving analog input through 10k bonz pot to channel0 an0 of pic16f877. if i am varying the inputs(changing bonz pot) then output port bits also varying . but i don't know how to calculate the output values depends on the input values.what is output count for every 1mv input,any specification is their

ADCON0-'10000001'-channel0 AN0,Fosc/32,ad on bit is high
ADCON1-'00000000'-all are analog inputs ,left justified

i want to know, is it necessary to connect vref+(5v) to pin5(AN3) and vref-(gnd) to pin4(vref-) for above configuration.

thanking you
 
As you can see from the configuration of the ADCON1 bits3-0 you can tell what pins act as what. By making ADCON1 its3-0 all 0000 you are telling the chip to use its power source as the reference voltages. So you don't need to connect anything else, but the analog input.

Ivancho
 

Attachments

  • ADCON1_877.gif
    35.1 KB · Views: 682
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…