• 大小: 255KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-10
  • 语言: 其他
  • 标签: LAUNCHPAD  

资源简介

MSP430 G2 launchpad 开发历程包括CCS与IAR 非常全

资源截图

代码片段和文件信息

//******************************************************************************
//  MSP430G2x12/G2x52 Demo - Comp_A Output Reference Voltages on P1.1
//
//  Description: Output Comparator_A reference levels on P1.1. Program will
//  cycle through the on-chip comparator_A reference voltages with output on
//  P1.1. Normal mode is LPM0 TA0_ISR will interrupt LPM0.
//  ACLK = n/a MCLK = SMCLK = default DCO
//
//   MSP430G2x12/G2x52
//             -----------------
//         /|\|              XIN|-
//          | |                 |
//          --|RST          XOUT|-
//            |                 |
//            |         P1.1/CA1|--> Vref
//            |                 |
//
//  D. Dang
//  Texas Instruments Inc.
//  December 2010
//  Built with CCS Version 4.2.0 and IAR embedded Workbench Version: 5.10
//******************************************************************************

#include  

void delay(void);                           // Software delay

void main (void)
{
  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
  CACTL2 = P2CA4;                           // CA1/P1.1 = +comp
  CCTL0 = CCIE;                             // CCR0 interrupt enabled
  TACTL = TASSEL_2 + ID_3 + MC_2;           // SMCLK/8 cont-mode
  _EINT();                                  // enable interrupts

  while (1)                                 // Loop
  {
    CACTL1 = 0x00;                          // No reference voltage
    _BIS_SR(LPM0_bits);                     // Enter LPM0
    CACTL1 = CAREF0 + CAON;                 // 0.25*Vcc Comp. on
    _BIS_SR(LPM0_bits);                     // Enter LPM0
    CACTL1 = CAREF1 + CAON;                 // 0.5*Vcc Comp. on
    _BIS_SR(LPM0_bits);                     // Enter LPM0
    CACTL1 = CAREF1 + CAREF0 + CAON;        // 0.55V Comp. on
    _BIS_SR(LPM0_bits);                     // Enter LPM0
  }
}

// Timer A0 interrupt service routine
#pragma vector=TIMER0_A0_VECTOR
__interrupt void Timer_A (void)
{
    _BIC_SR_IRQ(LPM0_bits);                 // Clear LPM0 bits from 0(SR)
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2010-12-03 16:58  MSP430G2xx2 Code Examples\Assembly (CCS)\
     文件        5144  2010-12-03 16:54  MSP430G2xx2 Code Examples\Assembly (CCS)\!Readme.txt
     文件        2947  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x12_ca_01.asm
     文件        2470  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x12_ca_02.asm
     文件        3330  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x12_ca_03.asm
     文件        3012  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_01.asm
     文件        3785  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_02.asm
     文件        4506  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_03.asm
     文件        3062  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_04.asm
     文件        3488  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_05.asm
     文件        3412  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_06.asm
     文件        3254  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_07.asm
     文件        4175  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_08.asm
     文件        4219  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_09.asm
     文件        3348  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_10.asm
     文件        4113  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_11.asm
     文件        4514  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_12.asm
     文件        3496  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_13.asm
     文件        3290  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_14.asm
     文件        3233  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_16.asm
     文件        8416  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2x32_adc10_temp.asm
     文件        1823  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2xx2_1.asm
     文件        2575  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2xx2_1_vlo.asm
     文件        2117  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2xx2_clks.asm
     文件        8210  2010-12-03 16:02  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2xx2_dco_flashcal.asm
     文件        4312  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2xx2_flashwrite_01.asm
     文件        4034  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2xx2_LFxtal_nmi.asm
     文件        3088  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2xx2_lpm3.asm
     文件        3045  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2xx2_lpm3_vlo.asm
     文件        2936  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2xx2_nmi.asm
     文件        2006  2010-12-03 15:59  MSP430G2xx2 Code Examples\Assembly (CCS)\msp430g2xx2_P1_01.asm
............此处省略178个文件信息

评论

共有 条评论