CC3220S analogRead incorrect reading
dcjw opened this issue · 0 comments
Thank you for opening an issue on the Energia repository.
Do not use GitHub issues for project related questions.
Use instead the 43oh forum and TI E2E forum, so everyone can share the questions and answers.
Do not use GitHub issues for questions on third-party libraries.
Use instead their own repositories.
Check the issue hasn't been reported yet.
If an issue has alreday been reported, add your case to its thread.
Please provide the following information.
- LaunchPad board name and version:
CC3220S_LAUNCHXL (Rev-A)
- Energia IDE version (found in Energia > About Energia menu):
1.8.7E21
- Board package version (found in Tools > Boards > Boards Manager menu):
5.6.2
- OS name and version:
Windows 10
Describe the expected results.
`I tried to perform an analogRead with analog pins (pin 57 - 60) on CC3220S launch pad. Input voltage was around 1.1V. From the CC3220S launch pad schematics, there is a voltage divider ( 422 / 998 ) before ADC, so I would expect ADC code to be around 1360. Could it be there are additional ADC setup required (clock, register configuration, etc)?
My code basically just calls analogRead periodically as shown below.
void setup() {
// put your setup code here, to run once:
Serial.begin(250000);
}
void loop(){
int out = analogRead(24);
Serial.print(out);
delay(1000);
}
`
Describe the actual results.
However, the ADC code turned out to be 333 (around 0.11V)
List the steps to reproduce the problem.
Compile and run the code above. Drive pin60 with different voltages and observe output in Serial monitor