Loading ...
Sorry, an error occurred while loading the content.

237ADC on ADUC 7129

Expand Messages
  • md4681
    Mar 13, 2012
    • 0 Attachment
      I have a question on ADUC7129.
      I would like to sample with 1 MSamples and I have written to following MMRs: (timer 1 as conversion input)

      Timer1:
      T1LD = 0x2A; // dez 42
      T1CON = 0x0C0; // source clock / 1
      // 4-5 > 0 Binary (default)
      // 6 > 1 periodic mode
      // vom Startwert abwärts
      // 7 > 1 timer1 enable bit
      // 8 > 0 count down (default)
      // 9 > 0 core clock

      ADC:
      ADCCON = 0x2A1; enable timer1 as conversion input 000 10 101 00 001
      // fADC, acq. time = 8 clocks

      to get the adc value:
      ADCCP = 0x01; // channel 1
      while (!ADCSTA);
      ADC_INPUT[z] = ADCDAT >> 16;

      What did I wrong? Because the sample rate is very low and definitely
      not 1 MSample.