Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] what is actualy +vref and -vref in ADC for PIC16F877A?

Status
Not open for further replies.

vinodstanur

Advanced Member level 3
Joined
Oct 31, 2009
Messages
751
Helped
114
Reputation
234
Reaction score
114
Trophy points
1,333
Location
Kerala (INDIA)
Activity points
7,054
#include <htc.h>
#define _XTAL_FREQ 4e6 // 4MHz
__CONFIG(0x3F3A);
void main()
{
TRISB=0;
TRISA=1;int a,b;
ADCON1=0b00001111;
__delay_us(10);
ADCON0=0b01000001;
__delay_us(20);
while(1)
{
ADGO=1;
while(ADGO);
PORTB=ADRESH;
__delay_ms(100);
}
}




(i just started learning ADC)
In the above program, AN3 set as +vref and AN2 is set as -vref.
But when i connect a +voltage to pic RA3 then it is taking much current through that RA3. When i connect an LED between VDD and RA3, then the LED glows brightly! This much current is needed for vref? Now am confused :roll:, actually
1> what is +Vref and - Vref?:x
2>How to use those ?:x
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top