update CV3 unit to 5nv

This commit is contained in:
YiChin
2020-06-08 11:06:00 +08:00
parent a2f0d62819
commit f0ea8bfcf5
2 changed files with 13 additions and 14 deletions
@@ -1,4 +1,3 @@
#ifndef ELITECV3
#define ELITECV3
@@ -10,7 +9,7 @@ static uint16_t CV3Curve(CV3Mode *CV3){
static int32_t Vout;
static int32_t DeltaVout;
Vin = CV3->MeasureVolt * 500;//[2nV]
Vin = CV3->MeasureVolt * 200;//[5nV]
if(DACReset){
Vout = Vset + Vin;
DACReset = false;
@@ -19,15 +18,15 @@ static uint16_t CV3Curve(CV3Mode *CV3){
Vout = Vout + DeltaVout;
}
INSTRUCTION.VoltConstant = (Vout / 1E5) + 25000;//2nV=>usercode
INSTRUCTION.VoltConstant = Vout / 40000 + 25000;//5nV=>usercode
DACOutCode = Usercode_Correction_to_DAC(INSTRUCTION.VoltConstant);
int32_t RealV2;
RealV2 = (int32_t)((Vout - Vin) / 500);//[1uV]
RealV2 = (int32_t)((Vout - Vin) / 200);//[1uV]
InputNotify(NOTIFY_VOLT, RealV2);
int32_t RealV;
RealV = (int32_t)(Vout / 500);//[1uV]
RealV = (int32_t)(Vout / 200);//[1uV]
InputNotify(NOTIFY_IMPEDANCE, RealV);
DAC_outputV(DACOutCode);
@@ -115,9 +114,9 @@ static void CV3_Vscan(CV3Mode *CV3){
VmaxCounter = 0;
VminCounter = 0;
CycleCounter = 0;
Vmax = ((int32_t)(CV3->VMax) - 25000) * 1e5 ; //[2nV] 27500
Vmin = ((int32_t)(CV3->VMin) - 25000) * 1e5 ; //[2nV] 22500
Vinit = ((int32_t)(CV3->VInit) - 25000) * 1e5 ; //[2nV]
Vmax = ((int32_t)(CV3->VMax) - 25000) * 4 * 10000; //[5nV]
Vmin = ((int32_t)(CV3->VMin) - 25000) * 4 * 10000; //[5nV]
Vinit = ((int32_t)(CV3->VInit) - 25000) * 4 * 10000; //[5nV]
Vset = Vinit;
if(CV3->InitDirection){
@@ -136,9 +135,9 @@ static void CV3_Vscan(CV3Mode *CV3){
}
if(INSTRUCTION.Step <= 10){
Vstep = INSTRUCTION.Step * INSTRUCTION.VscanRate / 2 ; //Vsetp = x * 50 * N / 10, x=xmV ; N=VscanRate
Vstep = INSTRUCTION.Step * INSTRUCTION.VscanRate / 5 ; //Vsetp = x * 20 * N, x=xmV ; N=VscanRate
}else{
Vstep = INSTRUCTION.Step / 2 * INSTRUCTION.VscanRate; //Vsetp = x * 50 * N / 10, x=xmV ; N=VscanRate
Vstep = INSTRUCTION.Step / 5 * INSTRUCTION.VscanRate; //Vsetp = x * 20 * N, x=xmV ; N=VscanRate
}
}
@@ -194,4 +193,4 @@ static void CV3_Vscan(CV3Mode *CV3){
// InputNotify(NOTIFY_VOLT, RealV);
}
#endif
#endif
@@ -4,9 +4,9 @@
#define VERSION_DATE_YEAR 20
#define VERSION_DATE_MONTH 6
#define VERSION_DATE_DAY 5
#define VERSION_DATE_HOUR 17
#define VERSION_DATE_MINUTE 3
#define VERSION_DATE_DAY 8
#define VERSION_DATE_HOUR 11
#define VERSION_DATE_MINUTE 5
// this is NOT the version hash !!
// it's the last version hash