Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC3220S analogRead incorrect reading #1054

Open
dcjw opened this issue Feb 21, 2020 · 0 comments
Open

CC3220S analogRead incorrect reading #1054

dcjw opened this issue Feb 21, 2020 · 0 comments

Comments

@dcjw
Copy link

dcjw commented Feb 21, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant