Jump to content
43oh

mikeoshea

Members
  • Content Count

    2
  • Joined

  • Last visited

About mikeoshea

  • Rank
    Noob Class

Profile Information

  • Location
    Ireland
  1. Thanks nemetila, I actually tried that shortly after posting here, doesn't make any difference. I read somewhere else that that register is only needed when doing sequence conversions whereas I am doing three single channel conversions.
  2. I'm working on integrating an accelerometer(ADXL335) into my project. So I'm doing three single channel conversions, on the three axes. The first conversion I do gives me a normal reading for horizontal, ~450. The other ones give me ~880 and ~1020. I have switched the axes and the first one always gives me the correct value the others don't. The following code shows my ADC function. int Acc(char channel) { int res, ch; ch = channel * 0x1000; ADC10CTL0 &= ~ENC; ADC10CTL0 |= ADC10ON; ADC10CTL1 = ch + ADC10SSEL_3; ADC10CTL0 |= ENC + ADC10SC; while(ADC10CTL1&
×
×
  • Create New...