Analog input 12 bits resolution

What are you developing?
Post Reply
carlo
Posts: 6
Joined: Fri May 29, 2020 4:47 pm

Analog input 12 bits resolution

Post by carlo »

Hi, I have an F401 blackpill.
I would like to use the 12-bit analog inputs.
I tried how it is used with arduino:
a = analogRead (PA0);
Serial.print (a);
I get a value from 0 to 1023
How to get 0-4095 i.e. a resolution at 12bits.
Thanks

User avatar
fpiSTM
Posts: 677
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 25
Location: Le Mans
Contact:

Re: Analog input 12 bits resolution

Post by fpiSTM »


carlo
Posts: 6
Joined: Fri May 29, 2020 4:47 pm

Re: Analog input 12 bits resolution

Post by carlo »

Ok, thanks

User avatar
fpiSTM
Posts: 677
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 25
Location: Le Mans
Contact:

Re: Analog input 12 bits resolution

Post by fpiSTM »

carlo wrote:
Tue Jun 16, 2020 2:45 pm
Ok, thanks
Welcome. Sorry for the short answers, I didn't have time to develop.
So simply use the analWriteResolution API and then this will be ok.

Post Reply

Return to “Projects”