Hello,
I'm using an NHS3152 board along with its LPC-Link2 board.
What is the equation translating the "native" DAC value into an actual voltage?
Here is my code:
#include "board.h"
/*fonction pour initialiser le DAC */
static void Init_DAC(void)
{
Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_ANA0_1, IOCON_FUNC_1); /*utilise le GPO analogique ANA0_1 comme sortie du DAC */
Chip_ADCDAC_Init(NSS_ADCDAC0);
Chip_ADCDAC_SetMuxDAC(NSS_ADCDAC0, ADCDAC_IO_ANA0_1); /* connecte le DAC à la sortie ANA0_1*/
Chip_ADCDAC_SetModeDAC(NSS_ADCDAC0, ADCDAC_CONTINUOUS);
}
int main(void)
{
Board_Init();
Chip_Clock_System_BusyWait_ms(1000);
Init_DAC();
Chip_ADCDAC_WriteOutputDAC(NSS_ADCDAC0,4000);
return 0;
}
Measuring using a voltmeter between ground and ANA0_1, I get the corresponding values
1000 -> 0.6V
1500 -> 0.77V
2000 -> 0.94V
4000 ->1.58
1000 and 4000 are the min and max values I can put in Chip_ADCDAC_WriteOutputDAC(NSS_ADCDAC0,value), it seems (lower values than 1000, the voltage remains at 0.6V, higher values than 4000 the voltage remaisn at 1.58V).
Thanks