Page 1 of 1

Getting UART1 to MHX interface

PostPosted: Fri Aug 15, 2014 7:48 pm
by sncuser
For a while now, I've been outputting from UART1 on the PPM B1through pins H1.17 and H1.18 on the motherboard. Now, the project wants me to put that out through the MHX interface instead, on pins 39 and 40. From what I've read, it seems as if all that is required is to make sure the USB is disabled, the MHX is powered and enabled. I believe the USB interface is disabled by default, but I added code to explicitly do that also. I tried my own code to do it, with no success. Then I copied and pasted the example code for the USB and MHX source files provided, still withou success. My code now looks like this:

Code: Select all
  P4      |=  OE_USB_BAR;
  P4MDOUT &= ~OE_USB_BAR;
  P4      &= ~ON_MHX_BAR;
  P4MDOUT |=  ON_MHX_BAR;
  P4      &= ~OE_MHX_BAR;
  P4MDOUT |=  OE_MHX_BAR;

I don't know what else to do. Any help you can provide would be greatly appreciated.

Re: Getting UART1 to MHX interface

PostPosted: Fri Aug 15, 2014 8:16 pm
by aek
Please use the CubeSat Kit library functions like USB_close(), MHX_open(), etc. They are utilized in the sample code.

Do you have a Microhard MHX module? "Opening the MHX" means talking directly to an MHX module ... you need to ensure that it's properly configured (as a Master or a Slave) so that it can talk to another MHX, etc.

Re: Getting UART1 to MHX interface

PostPosted: Fri Aug 15, 2014 9:33 pm
by sncuser
No, they are wanting to use that interface to communicate with a Helium radio, so I'm trying to just redirect the data from UART1 through that interface. It's then connected through another board to the UART on the radio.

Re: Getting UART1 to MHX interface

PostPosted: Fri Aug 15, 2014 9:35 pm
by sncuser
And the library functions are where I got this code from, csk_usb_close(), etc.

Thanks!

Re: Getting UART1 to MHX interface

PostPosted: Mon Aug 18, 2014 10:33 am
by sncuser
Doh! It appears to be working, so never mind and thanks for your help. It didn't appear to be communicating with my radio on Friday, but I just connected a terminal program to it and I'm seeing the data, coming out on both sets of pins H1.17 and 18, and H1.39 and 40.

Re: Getting UART1 to MHX interface

PostPosted: Mon Aug 18, 2014 12:11 pm
by aek
You need to be very careful.

While the MHX units have 5V I/O, the AstroDev units are max 3.3V I/0. Running 5V I/O out of the MHX interface and through the CSK MHX pins to a Helium or Lithium on another module can damage the Helium/Lithium (due to the excessive voltages at the Helium/Lithium's input(s)).

Note that the CSK DevBoard has a Jumper (JP24) and the CSK Motherboard has a corresponding resistor pair (see 705-00433 schematics), that allow you to select the I/O level of the MHX interface.

Re: Getting UART1 to MHX interface

PostPosted: Wed Aug 20, 2014 9:08 am
by sncuser
Thanks! I've passed this information on to our avionics folks.