Jump to content
43oh

Energia 18 MSP430 and MSP432 Problem


Recommended Posts

The current msp430 compiler does not deal well with spaces. Try putting energia-1.6.10E18 in c:\.

 

For the MSP432 problem it would help if you could post the Sketch so that we can have a look at it.

 
This is the code, it only run the setup not the loop
 
#include <Wire.h>


byte reg_battery;
byte battery;


void setup() {
Wire.begin();
Wire.beginTransmission(0x6A);
Wire.write(0x02);
Wire.write(B11011101);
Wire.endTransmission();
 Serial.begin(9600);


// comprobando cambios 
}
  
void loop()


{


  Wire.beginTransmission(0x6A);
Wire.write(0x02);
Wire.write(B11011101);
Wire.endTransmission();




Wire.beginTransmission(0x6A);
Wire.write(0x0E);
Wire.endTransmission();


Wire.requestFrom(0x6A, 1); 
reg_battery = Wire.read();
battery = reg_battery & B01111111;
battery = (battery*20) + 2304;


if (battery <= 3104)
{
  Wire.beginTransmission(0x6A);
  Wire.write(0x09);
  Wire.write(B01100100);  
  Wire.endTransmission();
}
  
  Serial.print(battery);


}
Link to post
Share on other sites

The Sketch looks OK. Usually the problem is with the pull-ups on the I2C lines. Also make sure you have a good ground connection between the I2C device and the LaunchPad.

The Sketch works fine with my I2C tool (Aardvark). I suspect that you have an issue in the wiring between the I2C device and the LaunchPad.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...