Hi guys.
Is it possible to use DAC for external pin with sensor controller studio?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Daniel.
Thanks for a good idea to read help. Here is working example if somebody will search ways how to do this.
U16 signal = 50;
//see COMPA block diagram software-dl.ti.com/.../compa__1.html
compaSelectGpioInput(AUXIO_A_DACOUT);
refdacEnable(REFDAC_PWRMODE_ANY, REFDAC_REF_VDDS);
refdacStartOutputOnCompaIn(signal);
refdacWaitForStableOutput();
//do some job with external sensor
fwDelayUs(50000);
refdacStopOutput();
refdacDisable();
fwScheduleTask(1);
Another question if we don't wish ADC output to be dependent from VDDS.
I've added the following code:
adcEnableSync(ADC_REF_FIXED, ADC_SAMPLE_TIME_2P7_US, ADC_TRIGGER_MANUAL);
refdacEnable(REFDAC_PWRMODE_ANY, REFDAC_REF_ADCREF);
As descibed in the cc2642 reference manual ADCREF1.VTRIM nominal voltage 1.43V. So with this code maximum DAC output should be is 1.43V. Am I correct?
Mike,
Thanks for posting the sample code!
That is correct. You can refer to these SDK docs as well for more information about the Sensor Controller. http://software-dl.ti.com/lprf/sensor_controller_studio/docs/cc13x2_cc26x2_help/html/reference_dac__1.html?highlight=refdac_ref_adcref
Regards,
Daniel