2022-09-02 06:11 AM
Hi there !
I'm gonna use this microcontroller for one project. I start with configurate one ADC channel and i have a couple of question to ask .
1) More voltage input is close to Vref and more the value i read is close a the input ex: input 2.50 V i read 2.65V but if i have one input like 0.80V i read 1.15V
How can i fixed this problem ? right now i use the discovery board and i have a power supply for my ADC input
2) I try to confure other ADC pin but how if i have continus convers mode how i can know what kind of input i gonna read ?
Thank you soo much
Sergio
2022-09-03 11:35 PM
1 -> did you run "ADC calibrate" ?
2 -> sequence (INT enabled) gives you interrupts after each conversion and end of sequence.
2022-09-04 05:22 AM
Yes i try to calibrate but still the problem. I try to read the ADC_CHANNEL_VREFINT but i received 0x0FFF and i don't know why. I think the problem is Vref right now my discovery is connected a the USB port. Today i try whit a external ADC and work perfect but i think is stupid use external ADC when this microcontroller have 16 ADC inside. And i misure the same voltage with the same power supply. Another thingh is i use 239.5 Cycles with the STM32F051.
I hope some one help me to understand
Thanks Sergio
2022-09-04 07:12 AM
i use the discovery board and i have a power supply for my ADC input
Perhaps there is a ground difference between discovery and ADC input.
how i can know what kind of input i gonna read ?
For more than one channel, either the ADC needs to be reconfigured after each conversion for the next channel, or DMA must be used to move the ADC register data to your selected memory storage location after each conversion. There should be a DMA example in the examples that come with the library.
Cheers, Hal