Some test with Nucleo and SPI EEPROM.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 1:c667d1f8e407
- Parent:
- 0:a063a7db08f8
- Child:
- 2:1ad4d6a0ebfe
--- a/main.cpp Mon Jan 19 23:13:12 2015 +0000 +++ b/main.cpp Mon Jan 19 23:17:04 2015 +0000 @@ -7,6 +7,7 @@ #define WREN 0x06 #define RDSR 0x05 #define READ_LOW 0x03 +#define WRITE_LOW 0x02 int main() { chipselect =1; @@ -27,9 +28,9 @@ eeprom.write(0x00); chipselect = 1; chipselect = 0; - eeprom.write(READ_LOW); + eeprom.write(WRITE_LOW); eeprom.write(0x00); - eeprom.write(0x00); + eeprom.write(0x01); chipselect = 1; wait(2); }