Session 15 - EEPROM
Session 15 - EEPROM
EEPROM
Electrically Erasable Programmable Read Only Memory:
Definition of EEPROM:
EEPROM is abbreviation for Electrically Erasable Programmable Read Only
Memory.
It is a type of ROM that can be electrically erased and reprogrammed up to 1
Million cycle.
The EEPROM can be internal inside the microcontroller, our it can be external to
the microcontroller.
External EEPROM is connected to the microcontroller through certain
communication protocol and hence the microcontroller can make write or read
operations.
The External EEPROM interface may be serial or parallel. Serial EEPROM is
cheaper than the parallel one, while the parallel EEPROM are normally faster
than the serial ones.
Electrically Erasable Programmable Read Only Memory:
Definition of EEPROM:
The AT24C16B provides 16384 bits of serial electrically erasable and
programmable read-only memory (EEPROM) organized as 2048 words of 8 bits
each.
The device is optimized for use in many industrial and commercial applications
where low-power and low-voltage operation are essential.
The AT24C16B is available in space-saving 8-lead PDIP, 8-lead JEDEC SOIC, 8-lead
Ultra Thin Mini-MAP (MLP 2x3), 5-lead SOT23, 8-lead Ultra Lead Frame Land Grid
Array (ULA), 8-lead TSSOP, and 8-ball dBGA2 packages and is accessed via a Two-
wire serial interface. In addition, the AT24C16B is available in 1.8V (1.8V to 5.5V)
version.
Electrically Erasable Programmable Read Only Memory:
Definition of EEPROM:
EEPROM is used for saving a non-volatile data
like program data or any run time data that must be saved:
like:
- the settling temperature of air condition when the air condition is
stopped and runs again it will run at the latest settling temperature.
The device address word consists of a mandatory one, zero sequence for the first
four most significant bits, this is common to all the EEPROM devices.
The next 3 bits are the A2, A1 and A0 device address according to the EEPROM
type.
A2, A1 and A0 are hard wired, they are connected to different levels to make
them differ from themselves.
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
24C02 EEPROM:
Internally organized with 256 pages of 1-byte each, the 2K requires an 8 bit data
word address for random word addressing.
The A2, A1 and A0 pins are device address inputs that are hard wired for the
24C02.
As many as eight 2K devices may be addressed on a single bus system
Chip 1 1 0 1 0 0 0 0 R/W
Chip 2 1 0 1 0 0 0 1 R/W
Chip 3 1 0 1 0 0 1 0 R/W
Chip 4 1 0 1 0 0 1 1 R/W
Chip 5 1 0 1 0 1 0 0 R/W
Chip 6 1 0 1 0 1 0 1 R/W
Chip 7 1 0 1 0 1 1 0 R/W
Chip 8 1 0 1 0 1 1 1 R/W
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
24C04 EEPROM:
The 4K is internally organized with 256 pages of 2-bytes each. Random word
addressing requires a 9 bit data word address.
The 24C04 uses the A2 and A1 inputs for hard wire addressing and a total of four
4K devices may be addressed on a single bus system.
The A0 pin is a no connect, it will be used to write the 8th bit of location address,
because the address of location in this device is 9 bits, so the 8th bit will be
written into the place of A0 level which is not connected as a hard wired.
The 24C08 only uses the A2 input for hardwire addressing and a total of two 8K
devices may be addressed on a single bus system.
The A0 and A1 pins are no connects, they will be used to write the 9th and 8th bits
of location address, because the address of location in this device is 10 bits, so
the 9th and 8th bit will be written into the place of A1 and A0 level which are not
connected as a hard wired.
The 24C016 only does not use any address pin for hardwire addressing and only
one device may be addressed on a single bus system.
The A2, A1 and A0 pins are no connects, they will be used to write the 10th, 9th
and 8th bits of location address, because the address of location in this device is
11 bits, so the 10th, 9th and 8th bit will be written into the place of A2, A1 and A0
level which are not connected as a hard wired.
Chip 1 1 0 1 0 0 0 0 R/W
Chip 2 1 0 1 0 0 0 1 R/W
Chip 3 1 0 1 0 0 1 0 R/W
Chip 4 1 0 1 0 0 1 1 R/W
Chip 5 1 0 1 0 1 0 0 R/W
Chip 6 1 0 1 0 1 0 1 R/W
Chip 7 1 0 1 0 1 1 0 R/W
Chip 8 1 0 1 0 1 1 1 R/W
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
We will work on 24C16 on our course.
Any EEPROM type has two addresses:
- slave address.
- location address.
Slave address will be “1010 xxx” as we mentioned, the
least three significant bits will be used to write the 10th,
9th and 8th bits of locations address, and the remaining
8 bits of location address will be sent at the next byte.
We can consider these three bit as the number of page,
which we will virtually divide the memory into 8 pages,
the number of page will be the value of these three
bits, the size of one page will be 256 Bytes.
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
How to make an operation on 24C16 EEPROM:
we will start an IIC frame to communicate with the EEPROM, we have two types
of frames:
- write frame.
- read frame.
The write or read operation, we have two addresses one for device, and the
other for location address as we mentioned.
The remaining three bits for slave address will be used to write the number of
page as we mentioned before.
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
Write operation on 24C16 EEPROM:
assume we will write “A” on the 1265 address location:
so the address will be “100 1111 0001”, so the page number will be “100” so the
remaining slave address will be “100”,
Time To
Code
THANK YOU!