• Announcements

    • bluehash

      Forum Upgrade   03/11/2017

      Hello Everyone, Thanks for being patient while the forums were being fixed and upgraded. Please see details and report issues in this thread. Thanks!


  • Content count

  • Joined

  • Last visited

About Inscribe

  • Rank
    Noob Class

Profile Information

  • Gender
  • Location
  • Interests
    Embedded Systems
  1. Thanks, Rei Vilo. I will try out your code and revert. 5528 vs 5529 - No, I haven't tried on the Launchpad. But, considering that the two cores are identical (and the pins are re-arranged appropriately), I do not expect major differences. MPL3115A2 data sheet is very 'generic' and brief in its I2C description. I couldn't use it to understand expected behavior for this specific case. - Misra
  2. @NurseBob - I have confirmed both SCLs (MSP430 and ESP) are at a nominal 100 KHz. And both instances have the pullups in position. @bluehash - Yes, pullups are in place. @Rei Vilo - You are right. For Energia, no argument is required for Wire.begin() as a master. However, for ESP8266(Arduino), before using I2C, pins for SDA and SCL need to be set by calling Wire.begin(int sda, int scl), if different from defaults. The code I pasted was the ESP version. Please see the comments on this line. Thanks for your time. I am specifically intrigued by the different responses from the two platforms (MSP and ESP) for the same sketch. The last two screen captures show the responses of ESP and MSP, in that order to a WHO_AM_I query. ESP Sequence - (Write to) Address - Command - (Read From) Address - Response ...... and the response is correct. MSP Sequence - (Write to) Address - Command - (Write to) Address - (Read From) Address - Response.....and the response is incorrect. Both these are initiated by the same sketch snippet - Wire.beginTransmission(MPL3115A2_ADDRESS); Wire.write(regAddr); Wire.endTransmission(false); Wire.requestFrom(MPL3115A2_ADDRESS, 1); return Wire.read(); The additional (Write to) Address is being injected by the Energia Wire library (in RED above), which is causing the response to fail. Is this a desired feature or a bug? What would be the right construct to obtain a valid response from the slave? - Misra
  3. Hi Zeke, Would you have any LED rings left? I would like to buy two populated ones (without clock) or maybe three if priced reasonably ;-) Thanks - Inscribe
  4. Dear 43Oh, First post in 43Oh. Please point out mistakes. I am creating sample applications for a MSP430F5538 board in Energia environment. pins_energia.h has been suitably modified and board integrated into Energia (Version 18 at this time). Sample code to get I2C working (on MPL3115A2 Pressure sensor) has been tested on the ESP12 using Arduino environment . The same code fails in Energia. Code uses only wire.h (i.e., no device specific libraries included). The code is posted below: #include <Wire.h> // for IIC communication #define WHO_AM_I 0x0C #define MPL3115A2_ADDRESS 0x60 // 7-bit I2C address void setup() { int nDevices = 0; byte error,address; Wire.begin(14,2); // Mispod-ESP 12E ///Wire.begin(); // Mispigy F5538 Serial.begin(115200); Serial.println("MPL3115A2 IIC Tester"); Serial.println("Scanning..."); address = 96; ///for(address = 1; address < 127; address++ ) { Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0) { Serial.print("I2C device found at address 0x"); if (address<16) Serial.print("0"); Serial.print(address,HEX); Serial.println(" !"); nDevices++; } } if (nDevices == 0) Serial.println("No I2C devices found"); else Serial.println("Scan done"); } void loop() { if(IIC_Read(WHO_AM_I) == 196) { Serial.println("MPL3115A2 online!"); } else { Serial.println("No response - check connections"); } delay(3000); } byte IIC_Read(byte regAddr) { // This function reads one byte over IIC Wire.beginTransmission(MPL3115A2_ADDRESS); Wire.write(regAddr); Wire.endTransmission(false); Wire.requestFrom(MPL3115A2_ADDRESS, 1); return Wire.read(); } void IIC_Write(byte regAddr, byte value) { // This function writes one byte over IIC Wire.beginTransmission(MPL3115A2_ADDRESS); Wire.write(regAddr); Wire.write(value); Wire.endTransmission(true); } Only change in the code for the two platforms is the pin allocation (See comments in code). Address detection works fine as per code in setup(). Logic analyzer results below: ESP12E Scan Result - Mispigy F5538 Scan Result - Multibyte read fails. Results : ESP 12E Who Am I Result - Mispigy F5538 Who Am I Result - As seen, the I2C communication is different for the Energia wire library. Can someone throw some light on this behaviour? Our intent is to use the sketch transparently between the Energia based Mispigy and Arduino based ESP12E, with no tweaking of either environment. Thanks.
  5. Hi 430oh, I am Misra from Bangalore. I run a small embedded development company, Inscribe Technovations. Currently, we are busy giving finishing touches to a MSP43x based eco-system (MISPINO), centered around Energia. Do wait for our launch announcement by 01April2017. - Misra @Inscribe