ok, so you have a working lcd, and a adc value (properly scaled at 'float conversion') you need a 'float' to 'ascii' convertion...
mmm... it's kinda difficult you know? maybe using the 'printf' or 'sprintf' from C18... mmm... should check that... checking... too bad! it doesn't implement "%f"... maybe converting from float to int...
if you need ( or are planning) to implement this convertion from scratch... say, how many digits do you need? (0.0 to 4.9 or 0.000 to 4.999) that way you can implement something like this...
Code:
void print_float(float n){
int i,j;
i=(int)n; //first integer digit //assuming its from 0.0 to 5.0
lcd_affiche(0x30|i);
lcd_affiche('.');
for(j=0;j<3;j++){
n*=10.0;
i=(int)(n);
lcd_affiche(0x30|i);
}
}
and place it where you marked!
Code:
conversion=(5.0*Yc)/1024.0;
lcd_goto(3);
// display result of ADC in LCD
print_float(conversion);
Added after 6 minutes:
sorry! I think you should use ADRES (and not ADRESH) if you want the 10 bit value...