AnsweredAssumed Answered

mc9s12xep100 adc

Question asked by chen chen on Nov 10, 2017
Latest reply on Nov 16, 2017 by Daniel Martynek

HI

       I use mc9s12xep100 adc function, this my configuration for adc.

 void ADC_Init()
{
ATD0CTL1 = 0x20;
ATD0CTL2 = 0x80;
ATD0CTL3 = 0x78;
ATD0CTL4 = 0xA3;
ATD0DIEN = 0x00;
ATD0CTL5 = 0x30;
}

now, when I read data from  register ATD0DR1, ATD0DR2,ATD0DR3,ATD0DR8,ATD0DR9,ATD0DR10,ATD0DR11. I found that data result is fluctuant. ex: ATD0DR1 right value is 450,but I read value that is 15 occasionally.

Outcomes