Do we have a library for the AT24C512 I2C EEPROM

Post here first, or if you can't find a relevant section!
Post Reply
User avatar
RogerClark
Posts: 7680
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Do we have a library for the AT24C512 I2C EEPROM

Post by RogerClark » Tue Jan 30, 2018 10:05 am

Guys,

I'm trying to help someone read (and possible write) data from/to a AT24C512 I2C EEPROM

However I don't know if anyone has successfully used the AVR library with this device ?

I've had a quick look at

https://github.com/jwhiddon/AT24C1024

And it looks like it uses standard Wire calls, so is probably OK.

I don't have a board with this on, but I do have a AT24C08N on the back of a F103ZET board.

So I guess my best approach is to see if I can read and write that device and then send the code to the non-programmer who is trying to do a bit of hacking on his DMR digital radio.

Actually I have the same radio, but he is willing to take his apart and solder wire inside it, and I'm not keen to wreck mine at the moment ;-)


Any suggestions....????

User avatar
Manny
Posts: 72
Joined: Wed Dec 09, 2015 3:15 pm

Re: Do we have a library for the AT24C512 I2C EEPROM

Post by Manny » Tue Jan 30, 2018 11:50 am

For the smaller EEPROMS you get on dev boards I have always used IC 24Cxx EEPROM http://www.arduino-projekte.de/index.php?n=61 ...does not have the AT24C512 listed as supported.

User avatar
mrburnette
Posts: 2190
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Do we have a library for the AT24C512 I2C EEPROM

Post by mrburnette » Tue Jan 30, 2018 12:58 pm

The 512 is supported by STM on the F4 Discovery board under HAL:
http://www.electroons.com/blog/hello-world/

and it appears that some editing to the library may be required to write:
http://stm32duino.com/viewtopic.php?t=467#p31354

Up on github, I found an AT24 eeprom library based on HAL that may be useful if our lib has issues:
https://github.com/sinadarvi/SD_HAL_AT24

Arduino AVR interfacing of the LC256 is shown here:
http://www.hobbytronics.co.uk/arduino-external-eeprom
and
http://extremeelectronics.co.in/avr-tut ... ntrollers/

I personally have not tried the AT24C512 over I2C ... although I think I have some of the devices in the lab (somewhere!) Sadly, the aging brain does not remember where I have hidden stuff.

Ray

fpiSTM
Posts: 314
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: Do we have a library for the AT24C512 I2C EEPROM

Post by fpiSTM » Tue Jan 30, 2018 1:11 pm

I'm using this one available with Arduino library manager:
https://github.com/PaoloP74/extEEPROM
the 512 has not been tested.

using with 128 bytes page size, I think for AT24C512:

Code: Select all

extEEPROM eep(kbits_512, 1, 128); //device size, number of devices, page size

User avatar
RogerClark
Posts: 7680
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Do we have a library for the AT24C512 I2C EEPROM

Post by RogerClark » Tue Jan 30, 2018 7:59 pm

Thanks guys

I will try that lob with the smaller EEPROM that I have on the ZET board, and send my friend , some amended code with a different page size after I get mine working

victor_pv
Posts: 1855
Joined: Mon Apr 27, 2015 12:12 pm

Re: Do we have a library for the AT24C512 I2C EEPROM

Post by victor_pv » Wed Jan 31, 2018 2:27 am

I use the same one linked by Frederic, works great, and offers enough configuration options to support pretty much any memory size.
I have used it with both eeprom and fram.

User avatar
RogerClark
Posts: 7680
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Do we have a library for the AT24C512 I2C EEPROM

Post by RogerClark » Wed Jan 31, 2018 3:09 am

Thanks Victor

I'll give it a go later

Post Reply