Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

I2C problem on a EK-TM4C1294XL connected Lauchpad

$
0
0

Hi,

 

I am trying to get i2c working on a EK-TM4C1294XL on energia. I am trying to user i2c channel 0. So they should be on pb2 and pb3. Thing is, I do not see any signal on sda or sck on the scope except for the pullup.

 

On the serial debug I see "Start" and "Loop" but "Loop2" never appears. As simpel as this program is, I am not getting it or something is wrong in the libraries.

 

Hope you can help,

 

cheers

 

John

#include <Wire.h>


void setup()
{
  Wire.setModule(0);
  Wire.begin();                // join i2c bus (address optional for master)
  Wire.setModule(0);
  Serial.begin(115200);          // start serial communication at 9600bps
  pinMode(PC_7, OUTPUT);
  pinMode(PB_2, INPUT_PULLUP);
  pinMode(PB_3, INPUT_PULLUP);
  Serial.println("Start");
}


void loop()
{
  Serial.println("Loop");
  
  Wire.beginTransmission(112); // transmit to device #112 (0x70)
  Wire.write(byte(0x00));      // sets register pointer to the command register (0x00)  
  Wire.write(byte(0x50));      // command sensor to measure in "inches" (0x50) 
  Wire.endTransmission();      // stop transmitting


  Serial.println("Loop2");


  digitalWrite(PC_7,HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(250);                  // wait a bit since people have to read the output :)
  digitalWrite(PC_7, LOW);    // turn the LED off by making the voltage LOW
  delay(250);                  // wait a bit since people have to read the output :)
}

Viewing all articles
Browse latest Browse all 2077

Trending Articles