// Set all MOSFET pins for output
  P1DIR |= 0x2A;                                    // P1.1, P1.3, P1.5
  P2DIR |= 0x80;                                    // P2.7
  P4DIR |= 0x67;                                    // P4.0, P4.1, P4.2, P4.5, P4.6
  
  // Turn off all NMOS (Logic 0)
  P4OUT &= ~0x21;                                   // P4.0, P4.5
  P1OUT &= ~0x0A;                                   // P1.1, P1.3
  
  // Turn off all PMOS (Logic 1)
  P1OUT |= 0x20;                                    // P1.5
  P2OUT |= 0x80;                                    // P2.7
  P4OUT |= 0x42;                                    // P4.1, P4.6
  
  // Turn on Voltage Reference and 3.3SW
  P4OUT |= 0x20;                                    // P4.5 (3.3SW)
  P2OUT &= ~0x80;                                   // P2.7 (VRef)
  
  // Turn on RS232
  P1OUT &= ~0x20;                                   // P1.5 (RS232)
  
  // Turn on 5V SW
  P1OUT |= 0x02;                                    // P1.1 (5V SW)
  
  // Turn on Pressure
  P1OUT |= 0x08;                                    // P1.3 (Presure)
  
  // Turn on Temperature
  P4OUT &= ~0x02;                                   // P4.1 (Temperature)
  
  // Turn on SD
  P4OUT &= ~0x40;                                   // P4.6 (SD)
  
  // Turn on Modem
  P4OUT |= 0x04;                                    // P4.2 (EXT_ON_OFF)