MSP430, CCS, I2C, PCF8563
※ msp430.h 를 사용하는 소스입니다.
i2c interface 방식과 gpio 방식 2가지로 동작을 확인하였습니다.
Did you have a look at the example codes for the MCU that is provided by TI for almost every processor?
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. 참고 사항
- C:\ti\msp\MSP430Ware_3_80_04_05\examples\devices\MSP430FR5xx_6xx\MSP430FR5x8x_MSP430FR692x_MSP430FR6x7x_MSP430FR6x8x_Code_Examples\C
- http://e2e.ti.com/support/microcontrollers/msp430/f/166/p/368560/1297094
- https://github.com/achopra6/MSP430FR6989/blob/master/timer.c
- http://www.ti.com/lit/ds/symlink/msp430fr6989.pdf
- http://www.ti.com/lit/ug/slau367o/slau367o.pdf
출처: http://coyoteugly.tistory.com/188 [마이콤 개발자를 위한 여행]
0. 참고 사항
- [MSP430Ware] / msp430fr69xx_eusci_i2c_standard_master.c
- [i2c_sw.c] / https://gist.github.com/ksvbka/fec1f28ce40c276334fb
- [MSP430Ware] / www.ti.com/lit/zip/slac536
- [MSP430FR6989 LaunchPad™ Development Kit] / http://www.ti.com/lit/ug/slau627a/slau627a.pdf
- [MSP430FR6989 DataSheet] / http://www.ti.com/lit/ds/symlink/msp430fr6989.pdf
- [MSP430FR6xx User's Guide] / http://www.ti.com/lit/ug/slau367o/slau367o.pdf
1. HW 구성
2. 소스 설명
msp430fr6989 development kit backchannel (uart)
use USCI_A1
- P3.5 : UCA1RXD
- P3.4 : UCA1TXD
- BaudRate : 115200
i2c_interface.h #define USE_I2C_INTERFACE i2c_gpio.h // #define USE_I2C_GPIO |
주소 설정은 다음과 같이 해야합니다.
interface 내부적으로 shift 작업과 R/W bit 작업을 합니다.
slave address = 1010 001x = A2 or A3
write addr : 0x51 (A2 >> 1)
read addr : 0x51 (A2 >> 1)
3. 소스
4. 결과
'MSP430' 카테고리의 다른 글
MSP430, CCS, UART, printf 구현 (0) | 2018.09.06 |
---|---|
MSP430, CCS, RTC, Internal Register (0) | 2018.09.06 |
MSP430, CCS, LCDMEM (0) | 2018.09.06 |
MSP430, CCS, ADC, rotation_sensor (0) | 2018.09.05 |
MSP430, CCS, SPI, at45dbxx data flash (0) | 2018.09.05 |