150,8 → 150,9 |
// the voltage at the voltage divider reference point is 0.8V less that the UBat |
// because of the silicon diode inbetween. |
// voltage divider R2=10K, R3=1K |
// UAdc4 = R3/(R3+R2)*(UBat-0.8V) = 1k/(1k+10k)*(UBat-0.8V) = (UBat-0.8V)/11 |
UBat = (3 * UBat + (69 * Adc4) / 128 + 8) / 4; |
// UAdc4 = R3/(R3+R2)*UBat= 1k/(1k+10k)*UBat = UBat/11 |
// UAdc4 = R3/(R3+R2)*UBat= 3.9k/(3.9k+10k)*UBat = UBat/3.564 |
UBat = (3 * UBat + (69 * Adc4) / 128) / 4; |
DebugOut.Analog[8] = UBat; |
#endif |
ADReady = 0; |