Datasheet
Programming PIC Microcontrollers in BASIC - mikroElektronika
Occasionally, our needs will exceed the capacity of PIC’s internal EEPROM. When we need to store a
larger amount of data obtained by PIC, we have an option of using external serial EEPROM. Serial
means that EEPROM uses one of the serial protocols (I2C, SPI, microwire) for communication with
microcontroller. In our example, we will work with EEPROM from 24Cxx family which uses two
lines and I2C protocol for communication with MCU.
Serial EEPROM connects to microcontroller via SCL and SDA lines. SCL line is a clock for
synchronizing the transfer via SDA line, with frequency going up to 1MHz.
I2C communication allows connecting multiple devices on a single line. Therefore, bits A1 and A0
have an option of assigning addresses to certain I2C devices by connecting the pins A1 and A0 to the
ground and +5V (one I2C line could be EEPROM on address $A2 and, say, real time clock PCF8583
on address $A0). R/W bit of address byte selects the operation of reading or writing data to memory.
More detailed data on I2C communication can be found in the technical documentation of any I2C
device.
http://www.mikroelektronika.co.yu/english/product/books/picbasicbook/08.htm (3 sur 12)05/11/2004 02:28:29