Hallo everybody. I have a Problem with the ADC Converter from XC167 hier is my Code int analog_ermitteln (int kanal){ int Current_Value; ADC_CIC = 0x0; ADC_CON = kanal + 0x0280 ; while ( ADC_CIC & 0x0080); Current_Value = ADC_DAT & 0x03FF ; return Current_Value; }
I want to read a value from 3 Channel for example: a = analog_ermitteln (3); b = analog_ermitteln (4); c = analog_ermitteln (5);
but when i debugg the Function analog_ermitteln () for any Channel; doesn t return a Current_Value.
thanks for your Help