摘要: 1 #include "msp430g2553.h" 2 unsigned int rate = 0; 3 unsigned char updown = 1; 4 5 void main(void) { 6 7 WDTCTL = WDT_MDLY_32; 8 9 TACTL = TASSEL1 + TACLR;10 TACTL |= MC0;11 12 CCR0 = 20; // PWM周期13 14 CCTL1 = OUTMOD_7;15 CCR1 = 0;16 17 P1DIR |= 0x40; // P1.6 输出18 ... 阅读全文
posted @ 2012-08-17 19:46 sky1991 阅读(646) 评论(0) 推荐(0) 编辑