The second part of the AVR microcontroller EEPROM programming tutorial discusses practical applications of non-volatile memory. This example demonstrates how to store the number of button presses in EEPROM. The AVR microcontroller's non-volatile memory registers are 8-bit, meaning they can store numbers with a maximum value of 255. However, in practice, it is often necessary to store numbers of much larger values: thousands, tens of thousands, etc. To correctly store a number greater than 255, multiple EEPROM registers are required. Therefore, one approach can be used, which is as follows. Before storing the number in the AVR microcontroller's non-volatile memory, it should be broken down into hundreds, thousands, etc., and then the resulting values should be stored in several separate EEPROM resistors at different addresses. By reading from the EEPROM at individual addresses, the full number can be easily reconstructed.
Links to purchase useful items necessary for successfully learning to program AVR microcontrollers.
First, I recommend getting a HUGE DISCOUNT ON ALL PURCHASES: http://ali.pub/3mulxb
ATmega8 Microcontrollers: http://ali.pub/3muk7a
AVRASP Programmer: http://ali.pub/3mtqa2
AVRASP Programmer in a good case: http://ali.pub/3mtqxz
STK500 Programmer: http://ali.pub/3mtril
TOP3100 Programmer, which programs EVERYTHING: http://ali.pub/3mtsgt
Breadboard: http://ali.pub/3mtvcu
Convenient breadboard: http://ali.pub/3mtvyt
Serious breadboard: http://ali.pub/3mtx4m
Flexible jumpers for breadboard: http://ali.pub/3mtxj0
Jumpers in a case 14 types, 140 pieces: http://ali.pub/3mtxtw
Resistor set, 600 pieces, 30 values, 20 pieces each: http://ali.pub/3muaey
LED set, 300 pieces, different colors: http://ali.pub/3mubp1
Transistor set: http://ali.pub/3muc1h
Seven-segment displays: http://ali.pub/3muisx
Tact switches: http://ali.pub/3muj92
#EEPROM ##EepromAvr #AVR #ATmega8