The result of converting the ADC to a useful value of inches of Hg is displayed on the LCD.
The formula that converts the ADC value to inches of Hg (using the slope intercept formula):
inches of HG = -0.0377(ADC_Value) + 35.5134
The portion of the program that pertains to the conversion:
uint8_t theLowADC = ADCL;
uint16_t TenBitResult = ADCH<<8 | theLowADC;
InchesOfHg = -0.0376 * TenBitResult + 35.532;
Send_An_IntegerToMrLCD(15, 1, InchesOfHg, 4);
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.