Dear Keil users, I'm new here. In BLINKY I want to do the following :
Write the A/D value read from the potentiometer and write it onto the LCD panel
Analogvalue 754
#include <stdio.h> // after reading the analog value set_cursor (0, 0); sprintf(text1,"Analogwert %5d",AD_value); lcd_print (text1);
But I don't know how to read the value from the potentiometer.Any suggestions? Thanks for advance for any help. Adel.
So, have you performed the normal routine of eliminating possible error sources?
Have you verified that the potentiometer can generate the full range of voltages that the ADC can measure?
Have you verified that the ADC voltage reference is correct?
Have you verified that the binary value you read from the ADC can take any value between 0 and 0x3ff, i.e. between 0 and 1023?
Have you verified that your sprintf - if given a value of 1023 - will produce a correct text string?
Have you verified that said string will be corerctly sent to the display?
Performing these steps should give a good indication exactly what problem you have - and how/if you can fix it.