built in pull up resistor, DHT11, DHT22
Posted: Wed Jul 01, 2020 12:39 pm
this isn't really specific to the core more than it is a 'hardware' query
i'm thinking about interfacing DHT11 or DHT22 (AM2302)
https://www.mouser.com/datasheet/2/758/ ... 143054.pdf
https://www.sparkfun.com/datasheets/Sen ... /DHT22.pdf
a thing i noted about both of them requires a pull up resistor at the data line similar to i2c.
then in my google searches i noted this app note
AN4899 STM32 GPIO configuration for hardware settings and low-power consumption
https://www.st.com/resource/en/applicat ... ronics.pdf
mentions 3.3.1
https://www.st.com/resource/en/referenc ... ronics.pdf
9.1 gpio functional descr figure 13, table 20
the pullup / pulldown resistor is specifically shown in the figure but the register mentioned in table 20 is given as PxODR
and GPIOx_PUPDR isn't present there.
hence i'd assume that this functionality is achieved in stm32f103 using
9.2.4 Port output data register (GPIOx_ODR) (x=A..G) mentioned in rm0008 ?
it is a little surprising as 9.2.4 GPIOx_ODR is deemed an output register to set the gpio output and in addition it isn't literally clear if in the case of output
if the pin is set as output open drain, would the internal pull up automatically be effective?
having to solder a resistor between 2 pins is slightly bothersome but it can probably be done using an smd resistor on the sensor pin itself.
but i'd prefer a direct interface if the internal pull up or pull down can be used
playing with dht-11, dht-22 is a little tricky as i've to flip the pin between output open drain and input pull up
posted this across in st's forums
https://community.st.com/s/question/0D5 ... p-resistor
i'm thinking about interfacing DHT11 or DHT22 (AM2302)
https://www.mouser.com/datasheet/2/758/ ... 143054.pdf
https://www.sparkfun.com/datasheets/Sen ... /DHT22.pdf
a thing i noted about both of them requires a pull up resistor at the data line similar to i2c.
then in my google searches i noted this app note
AN4899 STM32 GPIO configuration for hardware settings and low-power consumption
https://www.st.com/resource/en/applicat ... ronics.pdf
mentions 3.3.1
- The pull-up or pull-down resistors are activated depending on the value in the GPIOx_PUPDR register
https://www.st.com/resource/en/referenc ... ronics.pdf
9.1 gpio functional descr figure 13, table 20
the pullup / pulldown resistor is specifically shown in the figure but the register mentioned in table 20 is given as PxODR
and GPIOx_PUPDR isn't present there.
hence i'd assume that this functionality is achieved in stm32f103 using
9.2.4 Port output data register (GPIOx_ODR) (x=A..G) mentioned in rm0008 ?
it is a little surprising as 9.2.4 GPIOx_ODR is deemed an output register to set the gpio output and in addition it isn't literally clear if in the case of output
if the pin is set as output open drain, would the internal pull up automatically be effective?
having to solder a resistor between 2 pins is slightly bothersome but it can probably be done using an smd resistor on the sensor pin itself.
but i'd prefer a direct interface if the internal pull up or pull down can be used
playing with dht-11, dht-22 is a little tricky as i've to flip the pin between output open drain and input pull up
posted this across in st's forums
https://community.st.com/s/question/0D5 ... p-resistor