Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
 

ivancho

New Member
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
    ADCON1_877.gif
    35.1 KB · Views: 531
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top