You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.7 KiB
46 lines
1.7 KiB
menu "esp32-ds18b20-example Configuration"
|
|
|
|
config ONE_WIRE_GPIO
|
|
int "OneWire GPIO number"
|
|
range 0 33
|
|
default 4
|
|
help
|
|
GPIO number (IOxx) to access One Wire Bus.
|
|
|
|
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used.
|
|
|
|
GPIOs 34-39 are input-only so cannot be used to drive the One Wire Bus.
|
|
|
|
config ENABLE_STRONG_PULLUP_GPIO
|
|
bool "Enable strong pull-up controlled by GPIO (MOSFET)"
|
|
default n
|
|
help
|
|
An external circuit can be used to provide a strong pull-up to the One Wire Bus.
|
|
This is useful when the bus has parasitic-powered devices and extra current is
|
|
required to power them, such as during temperature ADC conversions.
|
|
|
|
An example of such a circuit for the ESP32 is a P-channel MOSFET (such as the BS250)
|
|
connected Source-to-Drain between a current-limiting resistor (e.g. 270ohm for 12mA
|
|
max at 3.3V), itself connected to VCC, and the One Wire Bus data line. The Gate is
|
|
connected to the GPIO specified here.
|
|
|
|
config STRONG_PULLUP_GPIO
|
|
int "Strong pull-up GPIO number"
|
|
range 0 33
|
|
default 5
|
|
help
|
|
GPIO number (IOxx) to control the strong pull-up on the One Wire Bus, perhaps
|
|
via a P-channel MOSFET between VCC and the One Wire Bus data line.
|
|
|
|
This GPIO will be set as an output and driven high during temperature conversion.
|
|
This would enable the MOSFET providing current to the devices.
|
|
|
|
At all other times it will be driven low, switching off the MOSFET and allowing
|
|
the One Wire Bus to operate normally.
|
|
|
|
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used.
|
|
|
|
GPIOs 34-39 are input-only so cannot be used to drive the One Wire Bus.
|
|
depends on ENABLE_STRONG_PULLUP_GPIO
|
|
|
|
endmenu
|
|
|