Other Parts Discussed in Thread: HALCOGEN
Hello,
I use the ADC1 group for all 24 channels to read some external voltages. Altought the ADC1 is configured in HalCoGen to be SW triggered by GIOB0, the result is zero for all channels (there's a voltage on ADC pin , i measured it). Please find attached the configuration along with the code I try to get ADC data.
adcStartConversion(adcREG1, adcGROUP1); gioSetBit(gioPORTB, 0, 1); while((adcIsConversionComplete(adcREG1,adcGROUP1))==0); gioSetBit(gioPORTB, 0, 0); adcGetData(adcREG1, adcGROUP1, &analogInChannels.internalAdcData[0]); for (channel = 0; channel < 24; channel++) { analogInChannels.volt[channel] = 0.0012210012210012 * analogInChannels.internalAdcData[channel].value; }
Thank you,
Best Regards,
Cosmin Briceag