#include  <msp430x42x0.h>

// Constants for math calculations

// Function declare

// Pin declare

int main(void)
{
	WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
	
  SCFI0 |= FN_2;            // Set DCO operating range
  FLL_CTL0 |= XCAP18PF;     // Set load capacitance for xtal
  SCFQCTL = 121;							// MCLK = (121 + 1) *32768 = 3997696Hz
  	
  P1SEL = 0x00;							// P1 is I/O
  P1DIR = 0x0f;							// P0.1.2.3 is output & others input 
  P2SEL = 0xff;							// P2 port is peripheral for lcd
  P5SEL = 0x1c;							// P5.2.3.4 is peripheral for lcd & others DIO
  P5DIR = 0x9c;							// P0,1,5,6 is input
  P6SEL = 0x0f;							// P6.0.1.2.3 is peripheral for A/D & others DIO	
}
