Published for team members to use

Dependencies:   mbed

Fork of Nucleo F030R8 24LC256 EEPROM I2C by adamump simus

Files at this revision

API Documentation at this revision

Comitter:
benheck
Date:
Wed Jun 28 14:09:48 2017 +0000
Parent:
0:34c4fa6b49ac
Commit message:
This is working

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 34c4fa6b49ac -r 90f2ab8188c5 main.cpp
--- a/main.cpp	Wed Jul 20 10:43:06 2016 +0000
+++ b/main.cpp	Wed Jun 28 14:09:48 2017 +0000
@@ -15,11 +15,11 @@
 Serial pc(SERIAL_TX, SERIAL_RX);
 
 // settings
-int address = 0xA8; // in my case A2 = high, A1 = low, A0 = low, so the address is 1010 1000 = A8 (format 1 0 1 0 A3 A2 A1 R/W)
+int address = 0xA0; // in my case A2 = high, A1 = low, A0 = low, so the address is 1010 1000 = A8 (format 1 0 1 0 A3 A2 A1 R/W)
 
 int main()
 {
-    pc.printf("24LC256 I2C EEPROM started...\n");
+    pc.printf("24LC512 I2C EEPROM started...\n");
 
     int pointerAdddress = 0;
 
@@ -27,6 +27,7 @@
     char writeData[] = {"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec f"}; // the text length must be below 64 bytes
     char writeDataLen = 0;
     do {writeDataLen++;} while (writeData[writeDataLen]); // calculate the text length
+    
     /*
     writeEEPROM(address, pointerAdddress, writeData, writeDataLen);