So what happens if the LM339 has activated, has 'closed' its open-collector output transistor, while your pin is an output high ... ?I can't see any obvious reason for the failure ; the pin is connected to the open collector output of an LM339 and pulled up to the 3v3 output of the pico with a 3k0 resistorCode:
p=Pin(14, Pin.OUT) p.toggle() p=Pin(14,Pin.IN , PIn.PULL_DOWN)
Code:
----.----:----.--------------- 3V3 | : .|. _____ | : |_| / | | : | / |- `----:----^---(----. | : \ | |- : \__|__| : | ---------:-------------^------ 0V
I'm afraid it's not at all clear to me what you are doing; shorting the pin when output to 3V3 and 0V ?The output remains pulled low , but I'm able to toggle it to high by shorting the pin to 3v3 briefly or toggle low by touching to 0v.
Nor is clear what you are trying to do, why you have the code as you have it. First as to why it's ever an output, secondly why the pull-down ?
Statistics: Posted by hippy — Wed Jan 17, 2024 9:52 pm