ramp in periodic task

This commit is contained in:
alan
2019-05-09 16:33:44 +08:00
parent f581156c9a
commit 48e92df901
@@ -282,15 +282,15 @@ static void SimpleBLEPeripheral_performPeriodicTask() {
break;
}
case ZTCurve: {
// DAC instruction
static uint16_t volt = 0xfaa0;
volt = volt + 0x0001;
// DAC_outputV(volt);
static uint8_t ramp0 = 0;
static uint8_t ramp1 = 0;
// measure volt
// calculate resister
// ZT_plot(volt, somePIN);
if(ramp0 >= 0xF0){
ramp1 ++;
ramp0 = 0x00;
}
DAC_outputV(0x30, ramp1, ramp0);
ramp0 ++;
break;
}
case VTCurve: {