Hello,
i have pin out from esp32 ( 1=activ ) , go to stm32 in pin
on stm32 , the pin in , i put machine.Pin.pull_down ? or other
esp32 ( pin out ) -> stm32 (pin in )
thank
machine.Pin.pull_down ?
-
- Posts: 463
- Joined: Wed Apr 08, 2015 5:19 am
Re: machine.Pin.pull_down ?
Sorry, I don't understand a word of what you have written. Could you try to rephrase it?
Re: machine.Pin.pull_down ?
sorry for the delay
on my esp32 :
with a physical wire esp32 to stm32 on PE8
for PE8 declare machine.Pin.pull_down or machine.Pin.pull_up ?
on my esp32 :
Code: Select all
rel= machine.Pin(16, machine.Pin.OUT)
if a == 0:
rel.value=1
else:
rel.value=0
Code: Select all
if PE8 == 1 :
print('ok')
else:
print('no good')
Re: machine.Pin.pull_down ?
Pull up and pull down are only applicable to input pins. Output pins are driven high or driven low, so pullups don't apply. I think you might be able to use pull up on an open drain output, but that's the only case I can think of tht makes sense.
According to the documentation: http://docs.micropython.org/en/latest/l ... achine.Pin
something like this:
According to the documentation: http://docs.micropython.org/en/latest/l ... achine.Pin
something like this:
Code: Select all
p = machine.Pin('PE8', mode=machine.Pin.IN, pull=machine.Pin.PULL_UP)
Re: machine.Pin.pull_down ?
thank you ,
i hope " p = machine.Pin('PE8', mode=machine.Pin.IN, pull=machine.Pin.PULL_DOWN)
because i input +3.3v and 0v when nothing
i hope " p = machine.Pin('PE8', mode=machine.Pin.IN, pull=machine.Pin.PULL_DOWN)
because i input +3.3v and 0v when nothing
Re: machine.Pin.pull_down ?
When you drive an input from a push pull source you don't need a pull-up or pulldown, just a normal high impedance input. You only need a pull resistor if the driving source can become high impedance, eg open drain or tristate.
If the ESP32 output is push pull, always either 0V or 3.3V, then the STM32 input does not need a pull-up or pulldown resistor.
The exception would be if the ESP32 went into a sleep mode where its outputs are disabled. I don't know if that happens.
If the ESP32 output is push pull, always either 0V or 3.3V, then the STM32 input does not need a pull-up or pulldown resistor.
The exception would be if the ESP32 went into a sleep mode where its outputs are disabled. I don't know if that happens.