My project is trying to re-purpose some of the MHX lines for other purposes. So I'm trying to disable the MHX interface and set up DTR_MHX as a digital input. I found the following code in an example file:

1) For the MHX interface to work / be active, two things need to be true (see schematics 00194E-2.PDF and 00194E-5.PDF): i) -ON_MHX must be active. This ensures that U2 and U3 are fully powered on both sides, i.e. signals can pass through them. ii) -OE_MHX must be active. This ensures that signals do pass through them.

2) Enabling the MHX interface is an all-or-nothing affair ... either all of the signals can pass through the U2 & U3 level shifters, or none can. This means that when using the MHX interface, the USB interface must be disabled (via -OE_USB/-INT being disabled). Otherise you will have I/O conflicts.

3) The directions of the signals crossing U2 & U3 are fixed, e.g. HS3, HS4 and HS5 can only be outputs from the C8051 (because they are connected to the input of U3 (signals flow A->B only).

4) Please note that there are library functions in \Pumpkin\CubeSatKit\8051\Src like csk_mhx_open() in csk_mhx.c:

that will make it much easier to get these things working ... I would suggest using the USB ones to disable the USB interface, and copying the MHX ones to some new functions of your own, with the requisite pin mode changes (if required).

TL;DR: -DTR_MHX can only be used as an output from the C8051 if it passes through U3 in your system. If JP25 is set to 1-2, -OE_MHX is disabled, you connect (directly) from the C8051 to -DTR_MHX on H1 and you've dealt with any level-shifting issues, then you can use it as an input. IOW, you have to "go around" U3 to do that ... it's much easier to use -CTS_MHX, -DSR_MHX or -DCD_MHX as inputs, as they are already configured to be inputs through U2 into the C8051.