FLTH vs FLTL
ke4pjw
Posts: 1,155
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?
Comments
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:
Then any cog that wants the pin driven low can use a DRVH in pasm2 or PINH() in spin2.