Anonymous
Not applicable
Nov 20, 2018
04:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 20, 2018
04:52 PM
My pins to LEDS look like they are in series... each needs to be controlled by a different sensor. What am I doing wrong?
Solved! Go to Solution.
1 Solution
Nov 27, 2018
10:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 27, 2018
10:47 PM
Hello Sean,
You have kept your ADC in free running mode. So the ADC will be sampling the data continuously. In such situations you have to make sure that you are reading the ADC result register after one conversion cycle is complete. For this ADC_IsEndConversion() API can be used. ADC_WAIT_FOR_RESULT if used as parameter will wait for the result to be available. The ADC result thus obtained can be used to update the PWM compare value.
Best Regards,
VRS
5 Replies