Sorry for the late reply. A couple of things to note:
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:
- Code: Select all
void csk_mhx_open(void) {
// Disable all control signals to avoid spurious
// writes when -OE_MHX goes active (LOW).
SFRPAGE = CONFIG_PAGE;
P5 |= (HS5+HS4+HS3+HS2+HS1+HS0);
P5MDOUT |= (HS5+HS4+HS3 );
P5MDOUT &= ~( HS2+HS1+HS0);
// Configure -OE_MHX as an output, and make
// it active (i.e., LOW)
P4 &= ~OE_MHX_BAR;
P4MDOUT |= OE_MHX_BAR;
} /* csk_mhx_open() */
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.