Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

My pins to LEDS look like they are in series... each needs to be controlled by a different sensor. What am I doing wrong?

0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

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

View solution in original post

0 Likes
5 Replies