Datasheet
Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
Analog Inputs
Flyport has several analog channels connected to the internal 10bit ADC of the microcontroller.
QUESTION: What is the relation between number and voltage?
Flyport has a precise Voltage reference inside at 2.048V. This means that the max voltage on an
analog input is 2.048V.
The ADC is 10 bit. So it means 2^10 = 1024 different values (0-min voltage to 1023-max voltage).
Since the ADC uses the internal precise voltage reference of the module the single bit value is
2.048/1024=2mV
For example and Analog Read value of 1000 means:
1000 * 0.002 V = 2V of voltage on the analog input
Note: Analog input pins may be used also as GPIO, but they are not 5V tolerant! Avoid to apply a
voltage > 3.3V or you could damage the microcontroller!
QUESTION: How can I test this feature?
Here is a simple connection of a potentiometer to test analog input 1:
As you can see from schematics, there is a resistor of 680 Ohm and a potentiometer of 1KOhm. This
configuration is made to reduce the max voltage of the Analog input pin. In fact, when the
potentiometer reaches its max value on the analog pin we have:
Va1_in = Vdd * (R1 / R1+R2) = 3.3 * (1000 * 1680) = 1.96V
This value is compatible with the voltage input range of analog inputs (max 2.048V)
17










