Neetee 0 Posted April 1, 2017 Share Posted April 1, 2017 Hello all I am almost done with my project due to all your help Posting probably the last query I am trying to download library for external eeprom connected using i2c to my msp430f5529 launch pad. The entire library is available on github As github recently updated the website i cannot download the new libraries. Can anyone help me out by providing some other sources for this library. Library i am searching is External eeprom using i2c for msp430f5529 launch pad Thanks and regards Quote Link to post Share on other sites
hmjswt 9 Posted April 1, 2017 Share Posted April 1, 2017 Hallo I am using this code for my 430G2553. /* LaunchPad EEPROM Author : Henk Siewert File : EEPROMTest Date : 27 september 2016 Version : 003 MCU : TI MSP430G2553 Memory : Microchip Language : Energia C++ Compiler : Energia 0101E0017 Systeem : Windows XP Pro SP3 Editor : NotePad++ WWW : http://www.swtcomp.com Pin 6 IC = SCL --> 9 LET OP! Nieuw in 17 Pin 5 IC = SDA --> 10 LET OP! Nieuw in 17 Pin 8 IC = VCC --> Vcc (3.3V) Pin 4 en 7 IC = GND --> GND 4,7K Pull up on pin 5 and 6 !!! Let op - Is jumper geplaatst? */ #include <Wire.h> // I2C library int disk1 = 0x50; // Address of EEPROM chip // 50 for Microchip 1,2,3 GND // 57 for Atmel 1,2,3 open #define memmax 32768 // Maximum memory: // 32768 for Microchip 24LC256 // 65536 for Microchip 24LC512 // 131072 for Microchip 24LC1026 // 4096 for Atmel 24C32 byte value = 133; // Value to write to EEPROM void setup(void) { Serial.begin(9600); // Start serial Wire.begin(); // Start I2C start(); // Start program } void start() { test(); } void test() // Write and read data to memory locations { for ( unsigned long address = 0; address < memmax; address++) { writeEEPROM(disk1, address, value); Serial.print( address ); Serial.print(" = "); Serial.print(readEEPROM(disk1, address)); Serial.println(" "); } } void writeEEPROM(int deviceaddress, unsigned long eeaddress, byte data ) { Wire.beginTransmission(deviceaddress); Wire.write((int)(eeaddress >> 8)); // MSB Wire.write((int)(eeaddress & 0xFF)); // LSB Wire.write(data); Wire.endTransmission(); delay(5); // Writing takes time } byte readEEPROM(int deviceaddress, unsigned long eeaddress ) { byte rdata; Wire.beginTransmission(deviceaddress); Wire.write((int)(eeaddress >> 8)); // MSB Wire.write((int)(eeaddress & 0xFF)); // LSB Wire.endTransmission(); Wire.requestFrom(deviceaddress,1); if (Wire.available()) rdata = Wire.read(); return rdata; } void loop() { // Not used } Fmilburn and bluehash 2 Quote Link to post Share on other sites
Neetee 0 Posted April 2, 2017 Author Share Posted April 2, 2017 But will this work for 5529 launch lad ? Quote Link to post Share on other sites
hmjswt 9 Posted April 2, 2017 Share Posted April 2, 2017 Hallo Neetee, The routines/functions are very generic. Maybe the I2C pins are different. But that is no problem. Just try it. That's the fun of experimenting.That;s why I love this as a hobby. If it is for money, pleas try it and you can pay me royalties. Come on, go for it. Greetings from a very sunny Netherlands. Fmilburn 1 Quote Link to post Share on other sites
Neetee 0 Posted April 2, 2017 Author Share Posted April 2, 2017 Cool with it I will try for this and if required will make changes in it and i will post on this forum for others to use Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.