Go Down

Topic: Interfacing a serial EEPROM (Read 964 times) previous topic - next topic

suckiden

Hi there,

I'm currently working on connecting a serial EEPROM to my Arduino. The EEPROM I'm using is a serial EEPROM from Microchip (11LC160) which has a single line for data transmission/clock. The protocol is called UNI/O and is based on the Manchester encoding.
Before I'm starting to program everything from scratch I wanted to ask if somebody knows if there is already an existing library for interfacing such devices?
If not I thought about using the Manchester.h library and start from there. Any other ideas?

cheers!

robtillaart

Never seen it mentioned on the site,

you might want to look at - https://www.arduino.cc/en/Tutorial/SPIEEPROM -

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

suckiden

hmm as far as I understand this tutorial it is just about interfacing EEPROMs over SPI. In my case the data connection is achieved over one wire (UNI/O) not SPI.

thanks anyway!

robtillaart

#3
Jul 05, 2015, 01:37 pm Last Edit: Jul 05, 2015, 01:37 pm by robtillaart
Sorry, I am not familiar with the UNI/O name and assumed it was SPI alike.

One wire is used for the DS18B20 temperatuer sensors and although these are completely different, the library that is most often used for them might be helpful.
- https://github.com/milesburton/Arduino-Temperature-Control-Library


from design point of view I would propose to keep the interface of the class straightforward:
(interface based upon - http://playground.arduino.cc/Main/LibraryForI2CEEPROM - )

Code: [Select]
class MC11LCxxx
{
  public:
  MC11LCxxx(uint16_t size);

  byte readByte(uint16_t address);
  void writeByte(uint16_t address, byte value);

  void readBlock(uint16_t address, byte *ar, uint16_t len);
  void writeBlock(uint16_t address, byte *ar, uint16_t len);

  void setBlock(uint16_t address, byte value, uint16_t len);
 
  private:
  // ....
};
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up