小李啧

    1. 电子工程师必备基础知识手册---共10篇 411/84201 模拟电子 2011-07-02
      很好,很强大!
    2. 电子工程师必备基础知识手册---共10篇 411/84201 模拟电子 2011-07-02
      :congratulate: :congratulate: :congratulate: :congratulate:
    3. 怎么改变它的颜色啊?你的看起来好炫,我喜欢。 教教我呗。
    4. 请教:ADC12 模块的问题,急!!! 9/4685 微控制器 MCU 2011-03-24
      真的很谢谢你的回复,听君一句话,胜看十天书啊!感恩!
    5. 请教:ADC12 模块的问题,急!!! 9/4685 微控制器 MCU 2011-03-24
      #include "MSP430x14x.h" // Standard Equations #define Num_of_Results 8 static unsigned int A0results[Num_of_Results]; // These need to be global in static unsigned int A1results[Num_of_Results]; // this example. Otherwise, the static unsigned int A2results[Num_of_Results]; // compiler removes them because they are not used void main(void) { WDTCTL = WDTPW+WDTHOLD; // Stop watchdog timer P6SEL = 0x0F; // Enable A/D channel inputs ADC12CTL0 = ADC12ON+MSC+SHT0_8; // Turn on ADC12, extend sampling time // to avoid overflow of results ADC12CTL1 = SHP+CONSEQ_3; // Use sampling timer, repeated sequence ADC12MCTL0 = INCH_0; // ref+=AVcc, channel = A0 ADC12MCTL1 = INCH_1; // ref+=AVcc, channel = A1 ADC12MCTL2 = INCH_2+EOS; // ref+=AVcc, channel = A2, end seq. ADC12IE = 0x08; // Enable ADC12IFG.3 ADC12CTL0 |= ENC; // Enable conversions _EINT(); // Enable interrupts ADC12CTL0 |= ADC12SC; // Start conversion _BIS_SR(LPM0_bits); // Enter and stay in LPM0 } #pragma vector=ADC_VECTOR __interrupt void ADC12ISR (void) { static unsigned int index = 0; A0results[index] = ADC12MEM0; // Move A0 results, IFG is cleared A1results[index] = ADC12MEM1; // Move A1 results, IFG is cleared A2results[index] = ADC12MEM2; // Move A2 results, IFG is cleared index = (index+1)%Num_of_Results; // Increment results index, modulo; Set Breakpoint here } 谢谢啊!帮我看看,那几句我看了好多天....

最近访客

< 1/1 >

统计信息

已有389人来访过

  • 芯积分:--
  • 好友:1
  • 主题:1
  • 回复:5

留言

你需要登录后才可以留言 登录 | 注册


现在还没有留言