Part Number: CC2650
Tool/software: Code Composer Studio
Hello,
I am trying to use the sensor controller in order to convert analog values by using the ADC. I just made a simple code in order to get values from an input analog pin and to convert them and this is the code :
//Initialization code
adcSelectGpioInput(AUXIO_A_INPUT_1);
fwScheduleTask(1);
//Execution Code
adcEnableAsync(ADC_REF_FIXED, ADC_TRIGGER_AUX_TIMER0);
S16 valeure;
adcStartAuxTimer0Trigger(50);
adcReadFifo(valeure);
state.echantillon = valeure;
adcDisable();
fwGenAlertInterrupt();
fwScheduleTask(1);
My problem is that when i try converting let say a sinusoidal signal i don't get nothing but a scramble of values even though i'm in very low frequencies (like 5-10 hz). I guess the problem is in the code or in the time needed execute a task in Sensor controller Studio. Any help would be welcome.
Thanks.