EEPROM
is short for
Electrically Erasable
Programmable Read Only Memory
. It is
usually a secondary storage memory in devices
containing data that is retained even if the device
looses power supply. EEPROMs come with parallel
or serial interface to the master device. Because
of the ability to alter single bytes of data, EEPROM
devices are used to store personal preference and
configuration data in a wide spectrum of consumer,
automotive, telecommunication, medical, industrial, and
PC applications.
EasyPIC
™
v7 supports serial EEPROM which uses
I
2
C communi-
cation interface
and has
1024 bytes
of available memory. Board
contains socket for serial EEPROMs in DIP8 packaging, so you can
easily exchange it with different memory size EEPROM IC. EEPROM itself
supports single byte or 16-byte (page) write and read operations. Data rates
are dependant of power supply voltage, and go up to
1 MHz
with 5V power supply,
and
400 kHz
for 3.3V power supply.
In order to connect I
2
C EEPROM to the
microcontroller you must enable
SW4.7
and
SW4.8
switches, as shown on
Figure 18-1
.
1kΩ
pull-up resistors necessary for I
2
C communication
are already provided on
SDA
and
SCL
lines once
switches are turned on. Prior to using EEPROM
in your application, make sure to disconnect
other peripherials, LEDs and additional pull-up
or pull-down resistors from the
RC3
and
RC4
communication lines that could interfere with
the data signals and cause data corruption.
I
2
C is a multi-master serial single-ended bus that is used to attach low-speed peripherals to computer or embedded
systems. I²C uses only two bidirectional open-drain lines,
Serial Data Line (SDA)
and
Serial Clock (SCL)
, pulled
up with resistors. Data and clock lines are driven with a master device. Up to 112 slave devices can be connected
to the same bus. Each slave must have a unique address.
I
2
C EEPROM
DATA BUS
ON
SW4
DIP SW 8
VCC-5V
RA0
RA1
RA2
RA3
RC2
RC3
RC4
C24
100nF
VCC-MCU
1
2
3
4
DIP SKT 8 (24C08)
VCC-MCU
R4
1K
7
8
6
5
VCC-MCU VCC-MCU
VCC-MCU
R5
1K
EEPROM-SCL
EEPROM-SDA
A0
A1
WP
A2
VSS
SDA
SCL
VCC
U8
Enabling I
2
C EEPROM
What is I
2
C?
Figure 18-1:
Activate SW4.7 and
SW4.8 switches
to connect
microcontroller
I
2
C lines to Serial
EEPROM.
page 31
Figure 18-1:
Schematic of
I
2
C EEPROM
module
modules