# using 4 adc channel of xmega64 A3 microcontroller

Status
Not open for further replies.

##### Newbie level 5
Hi all;
due to the point that xmega64 A3 has two ADC ( ADC A & ADC B) that each one has 4 channel;
I started to use 3 channel of ADC A.
but , the received data from third channel is always wrong. However the first & second one are true .
Now ,I really don't know what is the problem?

#### KlausST

##### Super Moderator
Staff member
Hi,

it is impossible tu guess what is wrong.

We need valid informations: Code and schematic.

* "is always wrong". What does that mean? ---> We need a much more detailed error description. Values...

Klaus

Points: 2

##### Newbie level 5
Hi,

it is impossible tu guess what is wrong.

We need valid informations: Code and schematic.

* "is always wrong". What does that mean? ---> We need a much more detailed error description. Values...

Klaus
you are right...
for more detail in continue I will put my schematic and the codes.

I want to read the VFB_BATTERY in third channel...

the codes for ADCA :

Code:
  adc_get_calibration_data(ADC_CAL_ADCA);
adc_write_configuration(&ADCA,&adca_conf);

and the setting for each channel :

Code:
////for test by zahra  for motor 4 in channel 0
//

//for test by zahra  for VFB_battery.. in channel 2

/* Configure ADC channel 1:  motor3 current feedback
* - Input: ADCB5
* - Set Interrupt Mode: Below the threshold
* - interrupts disable
//*/

//adc_start_conversion(&ADCA,ADC_CH3);

thanks for your attention...

#### KlausST

##### Super Moderator
Staff member
Hi,

This is neither a schematic nor an error description.
I'm out.

Good luck.

Klaus

Status
Not open for further replies.