1
05-EEPROM Memory.
By : Mohamed Fawzy
Programming AVR Microcontrollers
© Mohamed F.A.B 2015
Lecture Notes:
2
o Set Your Phone To Vibration Mode.
o Ask any time.
o During labs, Feel Free To Check Any Materials or
Internet.
o Slides are self content.
o Feel Free To Share This Materials With Your Friends.
o Work Hard For Achieving Most Of This Course.
© Mohamed F.A.B 2015
3
Don't Forget !!!!
© Mohamed F.A.B 2015
Any Expert Was Once A Beginner

4
Lesson(11).
© Mohamed F.A.B 2015
Lesson (11):
Using internal EEPROM.
5
Lesson (11) Topics.
© Mohamed F.A.B 2015
► What is EEPROM.
► EEPROM Applications.
► Accessing EEPROM in codevision AVR.
6
What is EEPROM?
© Mohamed F.A.B 2015
 It’s a non-volatile memory which keep holding data
even if power is losses.
 The contents of the EEPROM may be changed
during operation (similar to RAM), but remains
permanently saved even upon the power supply
goes off (similar to ROM).
 It can be founded inside microcontroller or on
separate package.
7
EEPROM Applications.
© Mohamed F.A.B 2015
 Password.
 Production Lines.
 Washing Machine.
 etc………
8
Accessing EEPROM in
© Mohamed F.A.B 2015
Writing character to EEPROM:
eeprom_write_byte(address,value);
EX:
eeprom_write_byte(0,25); //write value 25 in byte 0
Reading character from EEPROM:
eeprom_read_byte(address);
EX:
val=eeprom_read_byte(0); //load variable val with
value stored in byte 0
By default all EEPROM bytes holds 255.
NOTE
Try to write implementation of these two functions.
Exercise
9
Questions:
© Mohamed F.A.B 2015
Thank You All 
10
mo7amed.fawzy33@gmail.com
01006032792
fawzy.fab@gmail.com
© Mohamed F.A.B 2015

05 EEPROM memory.2016

  • 1.
    1 05-EEPROM Memory. By :Mohamed Fawzy Programming AVR Microcontrollers © Mohamed F.A.B 2015
  • 2.
    Lecture Notes: 2 o SetYour Phone To Vibration Mode. o Ask any time. o During labs, Feel Free To Check Any Materials or Internet. o Slides are self content. o Feel Free To Share This Materials With Your Friends. o Work Hard For Achieving Most Of This Course. © Mohamed F.A.B 2015
  • 3.
    3 Don't Forget !!!! ©Mohamed F.A.B 2015 Any Expert Was Once A Beginner 
  • 4.
    4 Lesson(11). © Mohamed F.A.B2015 Lesson (11): Using internal EEPROM.
  • 5.
    5 Lesson (11) Topics. ©Mohamed F.A.B 2015 ► What is EEPROM. ► EEPROM Applications. ► Accessing EEPROM in codevision AVR.
  • 6.
    6 What is EEPROM? ©Mohamed F.A.B 2015  It’s a non-volatile memory which keep holding data even if power is losses.  The contents of the EEPROM may be changed during operation (similar to RAM), but remains permanently saved even upon the power supply goes off (similar to ROM).  It can be founded inside microcontroller or on separate package.
  • 7.
    7 EEPROM Applications. © MohamedF.A.B 2015  Password.  Production Lines.  Washing Machine.  etc………
  • 8.
    8 Accessing EEPROM in ©Mohamed F.A.B 2015 Writing character to EEPROM: eeprom_write_byte(address,value); EX: eeprom_write_byte(0,25); //write value 25 in byte 0 Reading character from EEPROM: eeprom_read_byte(address); EX: val=eeprom_read_byte(0); //load variable val with value stored in byte 0 By default all EEPROM bytes holds 255. NOTE Try to write implementation of these two functions. Exercise
  • 9.
  • 10.
    Thank You All 10 mo7amed.fawzy33@gmail.com 01006032792 fawzy.fab@gmail.com © Mohamed F.A.B 2015