digitallop.blogg.se

Wire library energia
Wire library energia







wire library energia
  1. #Wire library energia how to
  2. #Wire library energia full

bit 3: F0 (Thermostat Fault Tolerance Bit 0) bit 4: F1 (Thermostat Fault Tolerance Bit 1) bit 5: R0 (Conversion Resolution Bit 0) bit 6: R1 (Conversion Resolution Bit 1) bit 7: NVB (NV Memory Status), read-only Unsigned char P_CONF = 0x1 //configuration Unsigned char FT_6 = 0x3 //fault tolerance consecutive out of limits 6

wire library energia

Unsigned char FT_4 = 0x2 //fault tolerance consecutive out of limits 4 Unsigned char FT_2 = 0x1 //fault tolerance consecutive out of limits 2 Unsigned char FT_1 = 0x0 //fault tolerance consecutive out of limits 1

#Wire library energia full

The full code listings can be found at the end. If you are interested in the Arduino implementation, you can check out this post from last year.

#Wire library energia how to

My first example shows how to set the output frequency of the programmable oscillator LTC6904. But the same code can be used with any chips within the MSP430G2 family that supports the I2C functionality by simply changing the header file in the include statement. The code examples included here are built under TI’s Code Composer Studio V5.1 for MSP430G2231. Also you can refer to TI’s MSP430x2xx Family User’s Guide for more details. For more detailed background information on implementing I2C on MSP430G2 devices, you can check out this TI Wiki. In both examples, the MCU is configured as I2C master. The I2C code I am using is adapted from the I2C Explorer project on 43oh forum. The library code can be downloaded towards the end. In this post, I will show a couple of examples of using the MSP430 Launchpad as an I2C master to communicate with slave devices. This is because P1.6 is the SCL pin and the connected LED may cause the output voltage to stray from the desired logic voltage levels. Last week, I mentioned that in order for the I2C bus to function correctly when using the MSP430 Launchpad you might need to remove the jumper on P1.6.









Wire library energia