-->
Page 1 of 4

write & read DS1307 eeprom using esp8266

PostPosted: Sun May 21, 2017 4:18 am
by m.maazi
Hi.
sorry for my poor English.
I made a web server to get some big string variables from web and set them to a DS1307 chip so I can use them on my project.
esp8266 uses UART and DS1307 uses I2C. Is it possible to connect them to each other? And how I can access (read & write) DS1307's eeprom with esp?
Thanks in advance.

Re: write & read DS1307 eeprom using esp8266

PostPosted: Mon May 22, 2017 9:21 am
by martinayotte
The DS1307 doesn't have EEPROM.
If you are talking about those small boards that have an separate EEPROM along with the DS1307, be aware that most of them have separate I2C wires, so you need to connect them together.
Yes, ESP8266 can use them easily, simply use the Wire library :
https://github.com/esp8266/Arduino/tree ... aries/Wire

Re: write & read DS1307 eeprom using esp8266

PostPosted: Wed May 24, 2017 5:23 am
by m.maazi
Hi. thanks for response.
I found this library for interfacing that module (DS1307+eeprom) with esp8266 & it works.
https://github.com/Makuna/Rtc
But there is a problem with addressing the memory. I have 4KB (AT24C32) of space but this library handles only the first 56 Bytes of it.
If I use your library with esp, how should I use RTC with same wiring? Do you suggest a simple library for RTC?
I am obviously a beginner & I need your professional help. Thanks & sorry for my poor English. :roll:

Re: write & read DS1307 eeprom using esp8266

PostPosted: Wed May 24, 2017 7:48 am
by martinayotte
Again, you're confused between the DS1307 and the EEPROM on those small boards.
DS1307 has 56 bytes of RAM, this is NOT the EEPROM !
For accessing the EEPROM, you need to attach the second I2C pins to the same bus and use a separate library like this one :
https://github.com/JChristensen/extEEPROM