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.

lcd display with pic16f877a - battery level

Status
Not open for further replies.

kichapi

Junior Member level 2
Joined
Dec 6, 2009
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Activity points
1,408
lcd display

hai some problam in my pic 16f877a lcd interface program. i used PORTA (RA0,RA1,RA5) analog pins .i connect RA5 pin battery voltage through the resister devider voltage 5v(the battery is fully charged condition ie 14Vdc) .This adc reading is correct and display the RA0 adc reading 1023v.i want to display the lcd direct battery voltage.how display the battery voltage ie (full charge condition display 14v)
how do this program please help me? iam waiting for your replay

this my adc reading program

ADCON1=0x82; //RA0,RA1,RA2,RA3,RA5, all analog pins

while(1)
{
ADCON0=0xA1; //RA5 analog input
delay();delay(); // ANALOG AQUISITATION TIME
ADGO=1;
while(ADGO==1) //WAIT TILL THE CONVERSION IS OVER
// SET ADC CHANNEL TRISA2//ADC_VALUE3//BATTERY VOLT
adc_value3=ADRESH<<8;
adc_value3=adc_value3+ADRESL;

//END OF ADC CONVERSION


command(0xC3);
for (i=1;i<=4;i++)
{
adc3=adc_value3%10;

adc_value3 =adc_value3/10;


}

for(i=4;i>=1;i--)
{
data1(adc3+'0');
}
}
}
 

Re: lcd display

scale :

1.
1024 counts = 5V (u scaled 14 v to 5v using potential divider)

2.
0 to 5 v in ur program should correspond to 0 to 14 V battery volts.

consider these two things
do a little bit of calculation and get it done its simple.....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top