项目作者: microphonon

项目描述 :
Demo program that uses SPI for communication between MSP430 and Bosch BME280 temperature-pressure-humidity sensor
高级语言: C
项目地址: git://github.com/microphonon/BME280.git
创建时间: 2018-09-09T19:36:01Z
项目社区:https://github.com/microphonon/BME280

开源协议:MIT License

下载


BME280

Demo programs that use SPI to communicate between Bosch BME280 temperature-humidity-pressure sensor and MSP430FX5XX/FX6XX or MSP430FR59xx families of MCUs.

Read and display temperature, relative humidity, and pressure of the BME280 sensor using the F5529 or FR5969 Launchpad. Sensor polled through SPI in forced mode with 1x oversampling and no filter. Internal trimming parameters must be read from device to perform conversion of raw data. Data displayed on terminal program. Set serial port for 9600 baud, 8-bits, 1 stop, no parity, no flow control. UART polling with no RX interrupt. SPI clock 1 MHz. The CS line must be configured consistently in the accompanying BME280.h header file. Main loop runs with timed interrupt from LPM3 and VLO clock. IDE with CCS 6.1.3 and nofloat printf support.

BME280_F.c Code can be directly implemented on F5529 Launchpad with perpherals wired using the following pins:

P3.0 UCB0 MOSI

P3.1 UCB0 MISO

P3.2 UCB0 CLK SPI

P3.3 UCA0TXD

P3.4 UCA0RXD

P1.5 CS for BME280

BME280_FR.c Code can be directly implemented on FR5969 Launchpad with perpherals wired using the following pins:

P1.6 UCB0 MOSI

P1.7 UCB0 MISO

P2.2 UCB0 SPI CLK

P1.5 CS for BME280

P2.5 UCA1TXD

P2.6 UCA1RXD

BME280.h Library of 6 functions to extract and process data from the BME280 sensor using the SPI protocol. Modify registers ctrl_hum, ctrl_meas, and config as needed. Consult the BME280 data sheet.