Files
microchip-application-bmd38…/elite_dac.h
T

22 lines
762 B
C

#pragma once
#ifndef __ELITE_DAC_H__
#define __ELITE_DAC_H__
#include <stdbool.h>
#include <stdint.h>
#define DACCLS 0x02
#define DACOUT 0x31
// DAC Vout theoretical boundary <300, 100~ (mV)
#define DAC_VOUT_GAIN_SMALL_BOUNDARY 100000 // 25500(usercode) = 100 mV
#define DAC_VOUT_GAIN_LARGE_BOUNDARY 300000 // 26500(usercode) = 300 mV
#define DAC_VOUT_GAIN_LARGE_BOUNDARY_USERCODE 26500 // 26500(usercode) = 300 mV
#define DAC_VOUT_GAIN_LARGE_BOUNDARY1_USERCODE 23500 // 23500(usercode) = -300 mV
void VoutGainControl(uint8_t VOUTLevel);
int32_t User2Real(uint16_t UserCode);
void AutoGainChangeVout(uint32_t *p_VoutGainLv, int32_t usr_code);
#endif // !__ELITE_DAC_H__