Amali_SL
Newbie level 2
I want to make a voltage monitor circuit. 0V to 2.5V LED on and 2.5V to 5V LED off .When I test with Proteus this circuit works well. But practical circuit, analog input pin cannot get to zero volts. It’s always show about 2V. From 2v to 5v range works. I disconnect analog input pin and measure voltage but it’s not zero (Show about 2.5v).
What’s the problem? Please help me.
What’s the problem? Please help me.
void main() {
unsigned int read;
ANSEL=0x28;
CMCON=7;
ADCON0=0x0F;
TRISIO=0x10;
GPIO=0x00;
while(1){
read=ADC_Read(3);
if(read>510){
GPIO.B0=0;
}
if(read<510){
GPIO.B0=1;
}
}
}