Jump to content

Search the Community

Showing results for tags 'wire'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Found 9 results

  1. Hi, I just noticed an excessive consumption of ram by Wire on G2553 (I did not test on other µC) : 400 bytes !! I took a look at Wire.h but can't find where this memory is used. If anyone can confirm this and/or have an idea about this issue ? Regards
  2. Good morning, I'm using the latest Energia 18 build with Windows 10. I'm plugged into an MSP430 Launchpad with an MSP430G2553 chip on the board. The following code hangs on the Wire.endTransmission() statement.. Can somebody throw me a bone here and tell me how to fix this? int findAddress(int fromAddress, int toAddress) { int address = 0; for (int a = fromAddress; a < toAddress; a++) { Serial.print(a); Serial.print(" - beginTransmission.. "); Wire.beginTransmission(a); // delay(3); // Wire.write(1); Serial.print(" endTransmission.. "); int endStatus = Wire.endTransmission(); Serial.print(" Result: "); if (endStatus == 0) { address = a; Serial.print("Found device at: "); Serial.println(address); } else { Serial.print("x"); } } return address; }
  3. Stumbled on this strange behavior when using Energia with 430G2553 Launchpad and also Fraunchpad. Any time I try to do a long write to I2C device, only 17 bytes get put on the actual wire. What am I missing here? Code typically looks like this- I start transmission, sit in the loop sending data and then end transmission. Here is an example with a bunch of debug : { byte temp=0; Serial.println("Transmitting display data"); Wire.beginTransmission(SSD_ADDR); Serial.print("\t"); Serial.print(SSD_DUMMY_BYTE_C,HEX); Serial.print("\t"); Serial.println(Wire.write(SSD_DUMMY_BYTE_C)); Serial.print("\t"); Serial.print(0xA2,HEX); Serial.print("\t"); Serial.println(Wire.write(0xA2)); Serial.print("\t"); Serial.print(SSD_DUMMY_BYTE_D,HEX); Serial.print("\t"); Serial.println(Wire.write(SSD_DUMMY_BYTE_D)); while(len--) { Serial.print("\t"); Serial.print(len); Serial.print("\t"); temp=*databuf++; Serial.print(temp,HEX); Serial.print("\t"); Serial.println(Wire.write(temp)); } Serial.println(Wire.endTransmission()); } Len is usually 30-60 bytes, and databuffer is sized appropriately. I see the code iterate through it correct number of times, but less bytes are sent out. This is in Energia 14 at the moment, though I tried newer version as well. Typical output is below. You can see how write status goes from 1 to 0 after 17 bytes. The last value is return status from Wire.endTransmission, and it is 0, so it appears the system thinks all is happy Transmitting display data 80 1 A2 1 0 1 67 40 1 66 55 1 65 55 1 64 1 1 63 0 1 62 0 1 61 0 1 60 54 1 59 55 1 58 15 1 57 0 1 56 0 1 55 0 1 54 40 0 53 55 0 52 55 0 51 1 0 50 0 0 49 0 0 48 0 0 47 0 0 46 55 0 45 50 0 44 55 0 43 0 0 42 0 0 41 0 0 40 A0 0 39 A0 0 38 AA 0 37 A 0 36 0 0 35 0 0 34 0 0 33 0 0 32 54 0 31 55 0 30 15 0 29 0 0 28 0 0 27 0 0 26 80 0 25 AA 0 24 AA 0 23 2 0 22 0 0 21 0 0 20 0 0 19 50 0 18 55 0 17 1 0 16 54 0 15 0 0 14 0 0 13 0 0 12 A0 0 11 A0 0 10 AA 0 9 A 0 8 0 0 7 0 0 6 0 0 5 40 0 4 55 0 3 55 0 2 5 0 1 0 0 0 2 0 0
  4. I am failing to compile some legacy Arduino projects that call Wire.setClock() (or Wire.setSpeed()). Are these unsupported in the Energia IDE library implementations? I looked but didn't find them in $\hardware\cc3200\libraries\Wire\Wire.c or Wire.h. How else to set 400kHz I2C operation (vs default 100 kHz)? --Don
  5. Hi everyone! I am trying to get a PAC1710 chip as a slave working with the MSP430G2553. I am having a ton of trouble doing so and can't seem to even get the address of the slave for the msp. I am going off of the master_reader code as an example. My first question is I know that you need to give the slave an address but I am not sure how to do so. On the data sheet of the pac1710, the address is as follows - 0011000. Thanks!
  6. hello all! why are energia wire lib don't work? I have connected my launchpad 430g2553 to PCF8576 LCD 10. P1_6 to SDL and P1_7 to SDA . I try to write some code to use Software I2C Library but it did't work in energia . But EAR lib for software i2c work correct way. what i can to do to connect LCD with energia ? no software no hardware energia code don't work what 's the reason?
  7. Hello everyone! im here again for the 3rd time to ask for some advice/help. This forum has been so helpful! Recently i've implemented some code on a msp430g2553 to read a 7 segment LED display. My next step is to send that reading to another msp430 or maybe a c2000 micro-controller. End goal: Msp430-1 decodes the LED display and sends 2 digit number to the Msp430-2 then i display the numbers on my monitor. I was looking at the "wire" master write and slave read examples. I have implemented them but they seem not to work, i'm not sure of a couple of things. How do i address SCL and SDA ? how do i rout them to the specific pin? Wire.begin(4); // join i2c bus with address #4 is 4 the pin for SDA? where do i tell energia where my SCL pin is? I am attaching the examples i'm using in order to get more familiar with this "wire" method. Do I have to change the orientation of the TX and RX jumpers?(see picture) PS. is there any other communication protocol that i could use for my application? maybe something easier? or something where i could see a clear example of?? Thanks in advance for all the help and comments. // Wire Master Writer // by Nicholas Zambetti <http://www.zambetti.com> // Demonstrates use of the Wire library // Writes data to an I2C/TWI slave device // Refer to the "Wire Slave Receiver" example for use with this // Created 29 March 2006 // This example code is in the public domain. #include <Wire.h> void setup() { Wire.begin(); // join i2c bus (address optional for master) } byte x = 0; void loop() { Wire.beginTransmission(4); // transmit to device #4 Wire.write("x is "); // sends five bytes Wire.write(x); // sends one byte Wire.endTransmission(); // stop transmitting x++; delay(500); } //======================================================================================//====================================================================================== //this goes in the other msp430 // Wire Slave Receiver // by Nicholas Zambetti <http://www.zambetti.com> // Demonstrates use of the Wire library // Receives data as an I2C/TWI slave device // Refer to the "Wire Master Writer" example for use with this // Created 29 March 2006 // This example code is in the public domain. #include <Wire.h> void setup() { Wire.begin(4); // join i2c bus with address #4 Wire.onReceive(receiveEvent); // register event Serial.begin(9600); // start serial for output } void loop() { delay(100); } // function that executes whenever data is received from master // this function is registered as an event, see setup() void receiveEvent(int howMany) { while(1 < Wire.available()) // loop through all but the last { char c = Wire.read(); // receive byte as a character Serial.print(c); // print the character } int x = Wire.read(); // receive byte as an integer Serial.println(x); // print the integer }
  8. Hi all, I would like to interface an I2C ADC (PCF8591) for one of my application. I have tried a lot with the sample programs. But still my launchpad is not even generating the clock pulse. Can anybody help me.
  9. Hi All, I am trying to make an Anduino program to work on the MSP430G2553 using Energia. After testing and debugging the problem seems to be stuck at Wire.endTransmission(). I am using the LP, connecting to an RFID reader. LP1.6->SCL LP1.7->SDA and have the code below for I2C pull up: pinMode(P1_6, INPUT_PULLUP); pinMode(P1_7, INPUT_PULLUP); The code is void SL018::transmitData() { Serial.println("Transmitting 1"); // wait until at least 20ms passed since last I2C transmission while(t > millis()); t = millis() + 20; Serial.println("Transmitting 2"); // remember which command was sent cmd = data[1]; Serial.println("Transmitting 3"); // transmit packet with checksum Wire.beginTransmission(address); Serial.println("Transmitting 4"); for (int i = 0; i <= data[0]; i++) { #if defined(ARDUINO) && ARDUINO >= 100 // Wire.write(data); #else // Wire.send(data); #endif Serial.println("Transmitting 4a"); Wire.write(data); Serial.println("Transmitting 4b"); } Serial.println("Transmitting 5a"); Wire.endTransmission(); Serial.println("Transmitting 5b"); // show transmitted packet for debugging } And the debug statement suggested it hang at Wire.endTransmission(): checking... checking... ending! Transmitting 1 Transmitting 2 Transmitting 3 Transmitting 4 Transmitting 4a Transmitting 4b Transmitting 4a Transmitting 4b Transmitting 5a ? And then nothing happen. The reader should be working fine as the LED flashed when the tag is near.. Any help will be much appreciated. Thanks in advance.
×