Pumpkin, Inc.

Pumpkin User Forums

Getting UART1 to MHX interface

For issues specific to the 8051 family, including compilers (e.g. Keil C51) and IDEs (e.g. uVision2).

Getting UART1 to MHX interface

Postby sncuser » Fri Aug 15, 2014 7:48 pm

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.
sncuser
 
Posts: 22
Joined: Thu Feb 13, 2014 2:49 pm

Re: Getting UART1 to MHX interface

Postby aek » Fri Aug 15, 2014 8:16 pm

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.
-------
aek
aek
 
Posts: 1887
Joined: Sat Aug 26, 2000 11:00 pm

Re: Getting UART1 to MHX interface

Postby sncuser » Fri Aug 15, 2014 9:33 pm

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.
sncuser
 
Posts: 22
Joined: Thu Feb 13, 2014 2:49 pm

Re: Getting UART1 to MHX interface

Postby sncuser » Fri Aug 15, 2014 9:35 pm

And the library functions are where I got this code from, csk_usb_close(), etc.

Thanks!
sncuser
 
Posts: 22
Joined: Thu Feb 13, 2014 2:49 pm

Re: Getting UART1 to MHX interface

Postby sncuser » Mon Aug 18, 2014 10:33 am

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.
sncuser
 
Posts: 22
Joined: Thu Feb 13, 2014 2:49 pm

Re: Getting UART1 to MHX interface

Postby aek » Mon Aug 18, 2014 12:11 pm

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.
-------
aek
aek
 
Posts: 1887
Joined: Sat Aug 26, 2000 11:00 pm

Re: Getting UART1 to MHX interface

Postby sncuser » Wed Aug 20, 2014 9:08 am

Thanks! I've passed this information on to our avionics folks.
sncuser
 
Posts: 22
Joined: Thu Feb 13, 2014 2:49 pm


Return to 8051 family

Who is online

Users browsing this forum: No registered users and 1 guest

cron