0% found this document useful (0 votes)
31 views

Session 15 - EEPROM

Uploaded by

abdelrhmandeab20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Session 15 - EEPROM

Uploaded by

abdelrhmandeab20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

INTERFACING

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 settling mode of the washing machine.

 EEPROM is based on Floating Gate MOSFET, which needs a high


power to write ZERO or ONE, so it needs a flash driver, but our
EEPROM has an in-circuit flash driver to manage the IIC to write the
data on it.
Electrically Erasable Programmable Read Only Memory:
Definition of EEPROM:
 It is the pin
configuration of
24C16 EEPROM,
A0, A1, A2 are Not
Connected “NC
pin” .
Electrically Erasable Programmable Read Only Memory:
Definition of EEPROM:
 It is the pin configuration of
24C02, 24C04 and 24C08
EEPROMs,
A0, A1, A2 are address-
device-input pins.
Electrically Erasable Programmable Read Only Memory:
Specs of EEPROM:
 1 Million erase/write cycles with 100 years data retention.
 Single supply voltage 1.8v to 5.5v.
 Two wire serial interface, fully i2c bus compatible.
 Byte and multibyte write (up to 8bytes).
 Page write (up to 16 bytes).
 Automatic address incrementing.
 Byte, random and sequential read modes.
 1 MHz (5V, 2.5V), 400 kHz (1.8V) Compatibility.
 Write Protect Pin for Hardware Data Protection.
 Self-timed Write Cycle (5 ms max).
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
 There are many types of EEPROMs:
 24C02.
its size is 2Kbits ( 8 x 256 bits), means 256 bytes.
 24C04.
its size is 4Kbits ( 8 x 512 bits), means 512 bytes.
 24C08.
its size is 2Kbits ( 8 x 1024 bits), means 1024 bytes.
 24C16.
its size is 2Kbits ( 8 x 2048 bits), means 2048 bytes.

 24C02, 24C04 and 24C08 EEPROMs:


 100 kHz (1.8V, 2.5V, 2.7V) and 400 kHz (5V) Compatibility.
 Self-Timed Write Cycle (10 ms max).
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
 All of them communicate with microcontroller throw Two Wired Interface “TWI”
or Inter Integrated Circuit “IIC” and have a constant slave address of “IIC or TWI”.

 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

slave addresses of these eight slaves are:


1010 000 “all pins are connected to ground” 1010 100 “A1,A0 to ground, A2 to Vcc”
1010 001 “A2,A1 to ground, A0 to Vcc” 1010 101 “A1 to ground, A2,A0 to Vcc”
1010 010 “A2,A0 to ground, A1 to Vcc” 1010 110 “A0 to ground, A2,A1 to Vcc”
1010 011 “A2 to ground, A1,A0 to Vcc” 1010 111 “all pins are connected to Vcc”
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
 24C02 EEPROM:
Bit 0
Device Address hard wired address “R/W”

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.

slave addresses of these four slaves are:


1010 00x “all pins are connected to ground” 1010 10x “A1,A0 to ground, A2 to Vcc”
1010 01x “A2,A0 to ground, A1 to Vcc” 1010 11x “A0 to ground, A2,A1 to Vcc”
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
 24C04 EEPROM:

hard wired address Location Bit 0


Device Address 8th bit “R/W”

Chip 1 1 0 1 0 0 0 8th bit R/W

Chip 1 1 0 1 0 0 1 8th bit R/W

Chip 3 1 0 1 0 1 0 8th bit R/W

Chip 4 1 0 1 0 1 1 8th bit R/W


Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
 24C08 EEPROM:
The 8K is internally organized with 4 blocks of 256 pages of 4-bytes each.
Random word addressing requires a 10 bit data word address.

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.

slave addresses of these two slaves are:


1010 0xx “A2 is connected to ground” 1010 11x “A2 is connected to Vcc”
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
 24C08 EEPROM:

hard wired Location 9th & 8th bit Bit 0


Device Address address “R/W”

Chip 1 1 0 1 0 0 9th 8th R/W

Chip 2 1 0 1 0 1 9th 8th R/W


Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
 24C16 EEPROM:
The 16K is Internally organized with 128 pages of 16 bytes each, the 16K requires
an 11-bit data word address for random word addressing.

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.

slave address of this device is “1010xxx”:


Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
 24C16 EEPROM:
Location 10th, 9th and 8th Bit 0
Device Address “R/W”

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”,

let write the frame:


 write a start condition.
 write SLA+W “1010 100 0”.
 write remaining location address as a Data “11110001”.
 write “A” character “0100 0001”.
 write stop condition.
Electrically Erasable Programmable Read Only Memory:
How to access the EEPROM:
 Read operation on 24C16 EEPROM:
assume we will read from 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”,

let write the frame:


 write a start condition.
 write SLA+W “1010 100 0”.
 write remaining location address as a Data “11110001”.
 send a repeated start condition.
 write SLA+R “1010 100 1”.
 read the data from this location.
 write stop condition.
EEPROM Driver:

Time To

Code
THANK YOU!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy