But when a new value is drawn on it, it just superimposes. Naturally I thought about writing blank text on the same location but it doesn't work. How do you do this?
What is the best practice for providing a flicker free and non-garbling display?
Code: Select all
char adctxt[7];
unsigned int adcval, adcold;
void main() {
adc_init();
Start_TP();
while (1) {
adcval=adc_read(0);
delay_us(10);
inttostr(adcval,adctxt);
ltrim(adctxt);
if (adcval != adcold){
strcpy(Label6.Caption," ");
DrawLabel(&label6);
strcpy(Label6.Caption,adctxt);
DrawLabel(&label6);
adcold=adcval;
}
}
}