Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Nucleo F030R8 24LC256 EEPROM I2C by
Revision 1:90f2ab8188c5, committed 2017-06-28
- 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 |
--- 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);
