From f0ea8bfcf5ef7fbfb76968cdfbbcd9bd833377f4 Mon Sep 17 00:00:00 2001 From: YiChin Date: Mon, 8 Jun 2020 11:06:00 +0800 Subject: [PATCH] update CV3 unit to 5nv --- .../cc26xx/app/headstage/EliteCV3Mode.h | 21 +++++++++---------- .../cc26xx/app/headstage/Elite_version.h | 6 +++--- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCV3Mode.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCV3Mode.h index 9724b24d0..fbd534f83 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCV3Mode.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteCV3Mode.h @@ -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 \ No newline at end of file diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h index 850a62fec..39ec46434 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_version.h @@ -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