Part Number:DAC8760
你好,请问DAC8760在切换输出为电流输出时,VOUT引脚一直会有一个变化的电压,在电流输出时我如何禁用VOUT呢?
Amy Luo:
您好,
将 Configuration寄存器的[10:7]位配置为0 ,Control寄存器的 RANGE bits配置输出范围,您是这样配置的吗
,
user6310669:
是的,下面是我初始化的程序;
int main(void){ init_readConfig(); system_init(); //DAC8760_Setup((DAC8760_RANGE_0V_10V + DAC8760_OUTEN), 0, 0, 0); //DAC8760_SetOutValue(0x0); SysCtlDelay(10000); switch (DA_Setup_user[1]) { case 0:// -10~+10V DAC8760_Setup((DAC8760_RANGE_M10V_P10V + DAC8760_OUTEN), 0, 0, 0); DAC8760_SetOutValue(32767);// Set DAC8760 output value to 0V break; case 1:// 0~10V DAC8760_Setup((DAC8760_RANGE_0V_10V + DAC8760_OUTEN), 0, 0, 0); DAC8760_SetOutValue(0); // Set DAC8760 output value to 0V break; case 2:// 0~5V DAC8760_Setup((DAC8760_RANGE_0V_5V + DAC8760_OUTEN), 0, 0, 0); DAC8760_SetOutValue(0); // Set DAC8760 output value to 0V break; case 3:// 0~20mA DAC8760_Setup((DAC8760_RANGE_0MA_20MA + DAC8760_OUTEN), 0, 0, 0); DAC8760_SetOutValue(0); // Set DAC8760 output value to 0V break; case 4:// -5~+5V DAC8760_Setup((DAC8760_RANGE_M5V_P5V + DAC8760_OUTEN), 0, 0, 0); DAC8760_SetOutValue(32767);// Set DAC8760 output value to 0V break; case 5:// 4~20mA DAC8760_Setup((DAC8760_RANGE_4MA_20MA + DAC8760_OUTEN), 0, 0, 0); DAC8760_SetOutValue(0); // Set DAC8760 output value to 0V break; default: DAC8760_Setup((DAC8760_RANGE_M10V_P10V + DAC8760_OUTEN), 0, 0, 0); DAC8760_SetOutValue(32767);// Set DAC8760 output value to 0V break; }
}
void DAC8760_Setup (uint16_t controlReg, uint16_t configurationReg, uint16_t gainCalReg, uint16_t zeroCalReg){ DAC8760_SPISetupMaster(); DAC8760_Reset(); DAC8760_Nop(); DAC8760_WriteReg (controlReg, DAC8760_WRITE_CONTROL_REGISTER); DAC8760_WriteReg (configurationReg, DAC8760_WRITE_CONFIGURATION_REGISTER); DAC8760_WriteReg (gainCalReg, DAC8760_WRITE_GAIN_CALIBRATION_REGISTER); DAC8760_WriteReg (zeroCalReg, DAC8760_WRITE_ZERO_CALIBRATION_REGISTER);
}
,
Amy Luo:
抱歉,我这里无法验证您的程序,您可以把您配置的寄存器值读出来告诉我吗?我看一下Configuration和Control寄存器您是写入的是什么