INPUT ADC values and OUTPUT voltage
-
Hi there,
3 noob questions about GPIO :- Voltage range of the ADC seems to be 1.1V, and can be extended to 3.3V playing with attenuation, right ?
- What is the given values by the read method (val = apin()) : Is it from 0 to 1023, as an arduino ? Is it directly in mV ?
- What is the output Voltage when output.value(True) ?
I dont find these information in the manual...
Thanks.
-
@Meric-NESSANGE said in INPUT ADC values and OUTPUT voltage:
Worse or better than an arduino? Or the same order of magnitude ?
If your arduion use ESP32 then the same.
If you use digital output then it should be near max voltage 3.3.For the input read the docs, especially bottom green frame
https://docs.pycom.io/firmwareapi/pycom/machine/adc/#app
-
@jcaron Hi, and thanks for answer.
OK, both are possible, I missed it ^^
If I read withadcchannel.value()
(so, not in mV), do you know the max value (or the value of 1 step) ?
For the output, I use the digital way :a = machine.Pin('P2', mode = Pin.OUT)
=> Is the voltage is also 3.3V ?
=> Is the acceptable current draw is the same ?@jcaron said in INPUT ADC values and OUTPUT voltage:
Note that the ADC at least is not very precise and quite noisy. Depending on your needs an external ADC may be a better idea.
Wow.
Worse or better than an arduino? Or the same order of magnitude ?Thanks
-
@Meric-NESSANGE https://docs.pycom.io/firmwareapi/pycom/machine/adc/
- Yes
- You have functions to get either the raw value or the voltage directly
https://docs.pycom.io/firmwareapi/pycom/machine/dac/
- setting to 1 will provide 3.3V
Note that the ADC at least is not very precise and quite noisy. Depending on your needs an external ADC may be a better idea.