6 years, 1 month ago.

I can not get my ADC to work. What am I doing wrong?

Hi guys,

I'm new to mbed and a beginner in microcontroller programming things.

I have a Nucleo Board STM32L053R8 and just trying a quite simple “read an analog value and output” pc.printf via HTerm on Pc without conversions or similar ..

Hterm just prints 0.0 or 0 values, although definitely 1.66V going in the A0 Port (I did a voltage divider with two 10k resistors and the 3V3 supply).

If I just use the example for the Nucleoboard which will just let the Led blink if the ADC Value is above 1V, I also get no blink. (so it's also not working)

Attached is a picture of the build, a screenshot of HTerm and the code.

What am I doing wrong or is this a bug with some of the library of Nucleoboard?

Hope someone can help me with this. Thanks anyway.

/media/uploads/Koka_tr/main.png /media/uploads/Koka_tr/screenshot_of_hterm.png /media/uploads/Koka_tr/20140902_173558.jpg

1 Answer

6 years, 1 month ago.

check this, it might be related http://mbed.org/questions/4420/Problem-with-Nucleo-L152RE-AnalogIn/