I'm trying to understand how to operate digital pins configured as open-drain outputs on a pic32. As I've read on other forums, setting TRISx to 0 and ODCx to 1 configures the pin as open-drain output, and writing 1 to LATx will drive the output high-Z (w/pullup resistor) and writing 0 will drive it low.
If you have an actual open drain output, you can keep TRIS low and control the transistor with LAT. LAT=0 => transistor closed to ground and the output will be low, LAT=1 => transistor open and output will be floating or clamped high with a resistor (or pulled low by another signal).
What I'm caught up on is this part of the diagram for the pins:
From the PIC32 IO Port Reference Manual
What does ODCx do if TRISx is set 0? The output of the multiplexer controlled by ODCx will be low no matter what, as its either TRISx or (TRISx AND 'LATx), which will always be 0 when TRISx is 0.