Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8964
Posted: 07:51am 27 Sep 2022
The RC2040 book isn't clear about how to do open drain outputs. It looks like it's possible, but it's a combination of two or three register settings. I was expecting a simple register change but no such luck.
If you only need a single pin there's a work-around, I think. SETPIN mypin, DOUT pin(mypin)=0
Now, to set pin low SETPIN mypin, DOUT or to set it high impedance SETPIN mypin, DIN