Shop OBEX P1 Docs P2 Docs Learn Events
FLTH vs FLTL — Parallax Forums


If I have a shared pin (by multiple cogs), that its normal state is high when not in use, can I use FLTH to act as a soft pullup, that allows any of the cogs that share the pin to pull it low?


  • evanhevanh Posts: 15,049
    edited 2022-11-07 21:54

    That won't provide any pull-up from internal prop2 function. If you've got an external pull-up resistor on the pin then yep, either FLTH or FLTL works. There's no difference between FLTH and FLTL for driving the pin. Both set DIR control low, so no pin drive at all. And the associated OUT is masked low by its DIR.

    To get a shareable internal pull-up, what you can do is an acrobatic with logic inversion:

        wrpin( pinnum, P_HIGH_150K | P_INVERT_OUTPUT )
        pinl( pinnum )

    Then any cog that wants the pin driven low can use a DRVH in pasm2 or PINH() in spin2.

Sign In or Register to comment.