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!
Never seen it mentioned on the site,
you might want to look at - https://www.arduino.cc/en/Tutorial/SPIEEPROM -
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!
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.
from design point of view I would propose to keep the interface of the class straightforward:
(interface based upon - Arduino Playground - LibraryForI2CEEPROM - )
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:
// ....
};