1、 A MSP430F413TimerA31-2TACLKTA1TA2TACLK_A48P1.6ACLKTA1_A51CCI1AOUT1 TA2_A45CCI2AOUT2 1AA4-14-1 AA1ACLKSMCLK2 PWM 3A141248Timer_A4/2/I/O MSP430Timer_A/38PWM21Timer_A/Timer_/TACTLCLR2/CCR0Timer_ACCR01665536TARCCR0CCR0(CCR0)04-2CCR04-23655360FFFFH04-34-3 4/ -/CCR00CCR0CCR024-44-4/3CCR0ACLKf=32768HzT=1/
2、32768250msCCR0 81923276825.025.0=TNN=2000HMSP430F413A/* MSP413C* MSP430F413A*/#include /* LCD */#define LCD_IN_USE 10/* */const unsigned char NUM_LCD17=0xd7, 0x06, 0xe3, 0xa7, 0x36, /0 40xb5, 0xf5, 0x07, 0xf7, 0xb7, /5 90x77, 0xf4, 0xd1, 0xe6, 0xf1, / A E0x71, 0x00; / F,unsigned char lcd_BufLCD_IN_U
3、SE; / unsigned int cont,y0,y1,y2; /* * LCD*/void init_LCD(void)char tmpv;BTCTL = BT_fLCD_DIV32; / set LCD P5SEL = 0xfc; / LCDCTL = LCDON+LCD4MUX+LCDP1; / 4Mux for (tmpv = 0;tmpvvoid main(void)WDTCTL = WDTPW +WDTHOLD; / WDTTACTL = TASSEL0 + TACLR; / ACLK, TarCCR0 = 512; / PWM CCTL1 = OUTMOD_7; / CCR1 reset/setCCR1 = 384; / CCR1 PWM CCTL2 = OUTMOD_7; / CCR2 reset/setCCR2 = 128; / CCR2 PWM P1DIR |= 0x04; / P1.2 P1SEL |= 0x04; / P1.2 TA1P2DIR |= 0x01; / P2.0 P2SEL |= 0x01; / P2.0 TA2TACTL |= MC0; / Timer_Afor (;)_BIS_SR(LPM3_bits); / LPM3_NOP(); / C-spy -