energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
794 stars 672 forks source link

CC3200: Inconsistent Resolutions Between Non-EMT and EMT #822

Open rei-vilo opened 8 years ago

rei-vilo commented 8 years ago

The very same sketch with analogRead() throws different values.

Actually, they have different resolutions: non-EMT works on 12 bits (maximum = 4095) while EMT sticks with 10 bits (max = 1023).

2294 2293 2294 2293

* Analog Input CC3200 EMT

573 573 573 573

  • Sketch
void setup()
{
  Serial.begin(9600);
  delay(100);
  Serial.println("pin 6 = Analog Input");
  pinMode(6, INPUT);
  for (uint8_t i = 4; i > 0; i--)
  {
    Serial.println(analogRead(6), DEC);
    delay(500);
  }
}

void loop()
{

}
race2fly commented 8 years ago

这程序是Arduino的吧 CC3200程序有什么问题

rei-vilo commented 8 years ago

@race2fly Please post in English so everyone can understand. Thank you.