I am using an STM32duino(STM32F103C8T6) now.
I am trying to use analogWrite, but only 8 bits (0~255) can be used.
I know that this resolution is changeable, but how can I change it?
I want to use the analogwriteresolution() function, but I get the following error:
'analogWriteResolution' was not declared in this scope
by GonzoG » Tue Jun 28, 2022 4:10 pm
1. ADC is Analog to Digital Converter. It reads analog data and converts it to digital - analogRead();
DAC is Digital to Analog, but F103C8 does not have DAC.
Using analogWrite() on MCUs without DAC you setup PWM output.
2. If analogWriteResolution() does not work (compile), it means that you use Roger's core. It doesn't have option for setting PWM resolution.
I suggest switching to official STM32 core.
Go to full post