From 0fb86ad94173b0393e5e4fe57ea4e089873111f9 Mon Sep 17 00:00:00 2001 From: robert-hh Date: Fri, 2 Feb 2024 13:47:12 +0100 Subject: [PATCH] docs/rp2/quickref.rst: Document the use of channel numbers for ADC. Signed-off-by: robert-hh --- docs/rp2/quickref.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/rp2/quickref.rst b/docs/rp2/quickref.rst index 11a808c110..8ee467d014 100644 --- a/docs/rp2/quickref.rst +++ b/docs/rp2/quickref.rst @@ -187,6 +187,13 @@ Use the :ref:`machine.ADC ` class:: adc = ADC(Pin(26)) # create ADC object on ADC pin adc.read_u16() # read value, 0-65535 across voltage range 0.0v - 3.3v +The argument of the constructor ADC specifies either a Pin by number, name of as +Pin object, or a channel number in the range 0 - 3. If a pin is specified, +the pin is initialized in high-Z mode. If a channel number is used, the pin +is not initialized and configuring is left to the user code. After hard reset, +RP2040 pins operate in current sink mode at about 60µA. If the pin is not +otherwise configured, that may lead to wrong ADC readings. + Software SPI bus ----------------