anoop kr
Member level 4
Hi
For my new project i have to display signed analog values on LCD. ie both positive and negative values i have to display on LCD. The ADC i am using is AD7714 and the MCU is ATmega8. I configured the ADC inputs in the differential input form and i set a constant voltage(+1V) at one of the ADC inputs as reference input and the value at next input is changing.
my plan is when the varying analog value is higher than the reference voltage set at one of the inputs, its considered as positive and when the value is lower than the set value its considered as negative.The range of values i have display is from -15 to +15 for the analog inputs 0V to 2V with +1V as reference. I can display the values from 0 to +15 ie for the analog input from 1V to 2V. but whenever i am trying to display the negative values its showing 295 on LCD. when i check i realize that -1 is showing as 295. but i have to display the value as -1. what i have to do...
For my new project i have to display signed analog values on LCD. ie both positive and negative values i have to display on LCD. The ADC i am using is AD7714 and the MCU is ATmega8. I configured the ADC inputs in the differential input form and i set a constant voltage(+1V) at one of the ADC inputs as reference input and the value at next input is changing.
my plan is when the varying analog value is higher than the reference voltage set at one of the inputs, its considered as positive and when the value is lower than the set value its considered as negative.The range of values i have display is from -15 to +15 for the analog inputs 0V to 2V with +1V as reference. I can display the values from 0 to +15 ie for the analog input from 1V to 2V. but whenever i am trying to display the negative values its showing 295 on LCD. when i check i realize that -1 is showing as 295. but i have to display the value as -1. what i have to do...