MSP430

MSP430, CCS, ADC, rotation_sensor

CoyoteUgly 2018. 9. 5. 21:57

MSP430, CCS, ADC, rotation_sensor



msp430.h 를 사용하는 소스입니다.


1. use adc3
- P1.3
2. msp430fr6989 development kit backchannel (uart)
- use USCI_A1
- P3.5 : UCA1RXD
- P3.4 : UCA1TXD
- BaudRate : 115200


Did you have a look at the example codes for the MCU that is provided by TI for almost every processor?


www.ti.com/lit/zip/slac536


The following examples show how to set up the clocks:

msp430fr59xx_cs_01.c       Configure MCLK for 8MHz operation
msp430fr59xx_cs_02.c       Configure MCLK for 16MHz operation
msp430fr59xx_cs_03.c       Output 32768Hz crystal on XT1 and observe failsafe
msp430fr59xx_cs_04.c       ACLK = XT1 = 32768Hz, SMCLK= XT2 = 8MHz, MCLK = DCO
msp430fr59xx_cs_05.c       Using LFXT in bypass mode, failsafe operation shown


0. 참고 사항



출처: http://coyoteugly.tistory.com/188 [마이콤 개발자를 위한 여행]

0. 참고 사항


1. HW 연결



2. 소스 설명

full 소스는 아래 github를 통해 확인하세요.

    P1SEL1 |= BIT3;                         // Configure P1.3 for ADC
    P1SEL0 |= BIT3;

    myprintf("\r\n\r\n rotation sensor adc program start\r\n");

    // Configure ADC12
    ADC12CTL0 = ADC12SHT0_2 | ADC12ON;      // Sampling time, S&H=16, ADC12 on
    ADC12CTL1 = ADC12SHP;                   // Use sampling timer
    ADC12CTL2 |= ADC12RES_2;                // 12-bit conversion results
    ADC12MCTL0 |= ADC12INCH_3;              // A3 ADC input select; Vref=AVCC
    ADC12IER0 |= ADC12IE0;                  // Enable ADC conv complete interrupt


3. 소스


4. 결과


'MSP430' 카테고리의 다른 글

MSP430, CCS, RTC, Internal Register  (0) 2018.09.06
MSP430, CCS, LCDMEM  (0) 2018.09.06
MSP430, CCS, SPI, at45dbxx data flash  (0) 2018.09.05
MSP430, CCS, USCI_A0, UartEcho  (0) 2018.09.03
MSP430, MSP430FR6x8x_Code_Examples  (0) 2018.09.03