Other Parts Discussed in Thread: HALCOGEN
I am trying to read voltage by using adc in TMS570lS07 and i have done all the intructions in (ADC Display)help topic but my ADC did not work and stucks in while((adcIsConversionComplete(adcREG1,adcGROUP1))==0); also the flag there has 0 as return value so please can any one help us to solve solve this problem ??
#include "sys_common.h" #include "system.h" #include "esm.h" #include "adc.h" #include "gio.h" #include "het.h" adcData_t adc_data[4]; void wait(uint32 time); void main(void) { uint32 ch_count=0; gioInit(); hetInit(), adcInit(); while(1) /* ... continue forever */ { adcStartConversion(adcREG1,adcGROUP1); /* ... wait and read the conversion count */ while((adcIsConversionComplete(adcREG1,adcGROUP1))==0); ch_count = adcGetData(adcREG1, adcGROUP1,&adc_data[0]); ch_count = ch_count; } } void wait(uint32 time) { while(time){time--;}; }