Thanks for the reply
This is my code
I m trying to get input from 4 channels and display the corrosponding values continuously. As i told earlier the problem is in displaying the volatge between 0 to 999 mvolts.
#include <LCD4Bit_mod.h>
#include<stdlib.h>
LCD4Bit_mod lcd=LCD4Bit_mod(2);
int val =0;
float ch1=0.0000, ch2=0.0000, ch3=0.0000, ch4=0.0000;
int temp,i;
char val1[5];
void setup()
{
lcd.init();
lcd.clear();
}
void loop()
{
for(i=0;i<4;i++){ // clears the buffer val1[]
val1 = '0';
* val= analogRead(4);*
* delay(100);*
_ ch2=(val4.82);_
_ lcd.cursorTo(1,9);_
_ lcd.printIn("C2");_
_ temp=ch2;_
_ itoa(temp,val1,10);_
_ lcd.cursorTo(1,12);_
_ lcd.printIn(val1);_
_ //delay(500);_
_ for(i=0;i<4;i++){ // clears the buffer val1[]_
_ val1 = '0';
} *_
* val= analogRead(3);*
* delay(100);*
_ ch3=(val4.82);
lcd.cursorTo(2,0);
lcd.printIn("C3");
itoa(ch3,val1,10);
lcd.cursorTo(2,3);
lcd.printIn(val1);
//delay(500);
for(i=0;i<4;i++){ // clears the buffer val1[]
val1 = '0';
}*_
* val= analogRead(2);*
* delay(100);*
_ ch4=(val4.82);
lcd.cursorTo(2,9);
lcd.printIn("C4");
itoa(ch4,val1,10);
lcd.cursorTo(2,12);
lcd.printIn(val1);
//delay(500);*_
* for(i=0;i<4;i++){ // clears the buffer val1[]*
_ val1 = '0';
* }*_
* } *