P A G E 35
E a s y M x
P R O
v 7 a
U s e r M a n u a l
Enabling I
2
C EEPROM
MODULES
I
2
C EEPROM
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. 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.
EasyMx PRO v7a supports serial EEPROM which uses
I
2
C communication interface
and has
1024 bytes
of available memory. EEPROM itself supports single byte or 16-
byte (page) write and read operations. Data rates are dependent of power supply
voltage, and go up to
400 kHz
for 3.3V power supply. EEPROM address on I
2
C bus is
0xA2
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 open-drain
lines,
Serial Data Line (SDA)
and
Serial
Clock (SCL)
, pulled up with resistors.
WHAT IS I2C?
SCL
line is driven by a master, while
SDA
is used as bidirectional line either by
master or slave device. Up to 112 slave
devices can be connected to the same
bus. Each slave must have a unique
address.
In order to connect I
2
C EEPROM to the microcontroller you must enable
SW14.1
and
SW14.2
switches, as shown on
Figure 23-2
.
4K7
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 peripherals, LEDs and additional
pull-up or pull-down resistors from the
PB6
and
PB7
communication lines
that could interfere with the data signals and cause data corruption.
C36
100nF
1
2
3
5
4
6
7
8
A0
A1
A2
VSS
SDA
SCL
WP
VCC
U9
24AA01 EEPROM
VCC-3.3V
VCC-3.3V
VCC-3.3V
R72
2K2
R73
2K2
VCC-3.3V
EEPROM-SCL
EEPROM-SDA
EEPROM-SDA
EEPROM-SCL
1
2
3
4
5
6
7
8
O
N
SW14
PB6
PB7
DATA BUS