Reference
Last revision 2026/02/11
Understand the I2C & PWM Series API for DAC output control.
API Description
/**************************************************************************
I2C & PWM Series
**************************************************************************/
/**
* @fn begin
* @brief Initialization function
* @return Returns 0 for success; other values indicate failure
*/
int begin(void);
/**
* @fn setDACOutRange
* @brief Set the DAC output range (only valid in I2C mode)
* @param range DAC output range
* @n eOutputRange5V (0-5V)
* @n eOutputRange6V (0-6V) GP8630N, GP8600
* @n eOutputRange10V (0-10V)
* @n eOutputRange_10V (-10-0V) GP8630N
* @n eOutputRange_12V (-12-0V) GP8630N
* @n eOutputRange12V (0-12V) GP8630N, GP8600
* @n eOutputRange20MA (0-20mA)
* @n eOutputRange24MA (0-24mA) GP8630N, GP210
* @return NONE
*/
void setDACOutRange(eOutPutRange_t range);
/**
* @fn setDACOutData
* @brief Set the DAC output value for a single-channel module
* @param data DAC value
* @note In PWM mode, the current/voltage output is determined by the PWM duty cycle. Select the current/voltage output range via DIP switches according to the silkscreen on the back of the module.
* @note In I2C mode, the current/voltage output is determined by the output range set via setDACOutRange().
* @return NONE
*/
void setDACOutData(uint16_t data);
Was this article helpful?
