|
@@ -180,10 +180,11 @@ void main(void)
|
|
|
tbuf >>= 3; // pre div
|
|
|
tbuf *= 3300; // Vref = Vcc
|
|
|
tbuf = (tbuf + 4096) / 8191; // get ADC input voltage in mV
|
|
|
- tbuf *= 1000; // get voltage in uV
|
|
|
- tbuf = (tbuf + 14) / 28; // get voltage from shunt
|
|
|
+ tbuf *= 1000; // -- for OU divider //get voltage in uV
|
|
|
+ tbuf = (tbuf + 3147) / 6294; // get voltage from shunt
|
|
|
/* â Current òîê â ìèëèàìïåðàõ */
|
|
|
- Current = (tbuf + 3) / 6; // shunt resistance in mOhms
|
|
|
+ tbuf *= 1000; // get voltage in uV
|
|
|
+ Current = (tbuf + 25) / 50; // shunt resistance in mOhms
|
|
|
|
|
|
SubSecondBfr += Current;
|
|
|
SubSecondCnt --;
|