4 #define __msp430_have_port3
5 #define __MSP430_HAS_PORT3__
20 //Port Output Register 'P1OUT, P2OUT':
21 #define P1OUT_INIT TX //Init Output data of port1
22 #define P2OUT_INIT 0 //Init Output data of port2
23 #define P3OUT_INIT 0 //Init Output data of port3
25 //Port Direction Register 'P1DIR, P2DIR':
26 #define P1DIR_INIT TX //Init of Port1 Data-Direction Reg (Out=1 / Inp=0)
27 #define P2DIR_INIT ~RX //Init of Port2 Data-Direction Reg (Out=1 / Inp=0)
28 #define P3DIR_INIT 0xff //Init of Port3 Data-Direction Reg (Out=1 / Inp=0)
30 //Selection of Port or Module -Function on the Pins 'P1SEL, P2SEL'
31 #define P1SEL_INIT 0 //P1-Modules:
32 #define P2SEL_INIT RX //P2-Modules:
33 #define P3SEL_INIT 0 //P3-Modules:
35 //Interrupt capabilities of P1 and P2
36 #define P1IE_INIT 0 //Interrupt Enable (0=dis 1=enabled)
37 #define P2IE_INIT 0 //Interrupt Enable (0=dis 1=enabled)
38 #define P1IES_INIT 0 //Interrupt Edge Select (0=pos 1=neg)
39 #define P2IES_INIT 0 //Interrupt Edge Select (0=pos 1=neg)
42 #define WDTCTL_INIT WDTPW|WDTHOLD
44 #define BCSCTL1_FLL XT2OFF|DIVA1|RSEL2|RSEL0
46 #define TACTL_FLL TASSEL_2|TACLR
47 #define CCTL2_FLL CM0|CCIS0|CAP
49 #define TACTL_AFTER_FLL TASSEL_2|TACLR|ID_0
51 //#define BAUD 40 //9600 @3MHz div 8
52 //#define BAUD 20 //19200 @3MHz div 8
53 //#define BAUD 20 //9600 @1.5MHz div 8
54 //#define BAUD 140 //9600 @1.5MHz div 8
56 //#define BAUD 2083 //9600 @20.0MHz div 1
57 //#define BAUD 1042 //19200 @20.0MHz div 1
58 //#define BAUD 521 //38400 @20.0MHz div 1
59 //#define BAUD 347 //57600 @20.0MHz div 1
60 //#define BAUD 174 //115200 @20.0MHz div 1
61 //#define BAUD 87 //230400 @20.0MHz div 1
63 #define BAUD 208 //115200 @24.0MHz div 1
65 //Selection of 'Digitally Controlled Oszillator' (desired frquency in HZ, 1..3 MHz)
66 #define DCO_FREQ 1536000 //3072000/2 makes 9600 a bit more precise
68 //Automatic, do not edit
69 #define DCO_FSET (DCO_FREQ/8192) //DCO_FSET = DCO_FREQ / (32768/4)
70 #define DCOCTL_MAX 0xff // Used from FLL to check when Rsel must be changed
71 #define DCOCTL_MIN 0 // Used from FLL to check when Rsel must be changed