Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 4 months ago.
ADC of the KL25Z
Hi guys. I really spent a lot of time working in this point without any progress. How could i change the conversation rate and the resolution bits of the ADC in mbed ? I know that i can do it in the Eclipse , and also how many bits is the ADC in the current function (AnalogIn) (the KL25Z is 16 bits resolution) . My second problem is that I connected the analog pin to a digital output pin which is working as a clock (on and off with speed of 10 Hz) and I plotted the ADC data and it's make sense, but my problem is the sparks in the signal which doesn't make sense at all.
Thanks guys in advance for reading my problem and trying to solve it.
1 Answer
9 years, 4 months ago.
How is your ADC configured? Default as on mbed? The screenshot above is sampled data via ADC ? What of you compare that to the clock output measured via oscilloscope?
The mbed API does not expose API to change resolution or rate. Expand the current mbed HAL+API or create a new object specific for your platform.
Thanks for your answer, I found the solution, I read the register CFG1 from the KL25Z and i found it with the mode 11 which is 16 bits resolution (with the original mbed function 'AnalogIn') and I removed the sparks after I used a capacitor that connected between the Analog pin and the ground. Thanks Again :)
posted by 02 Jan 2015