{"id":2545,"date":"2018-09-11T21:35:53","date_gmt":"2018-09-11T21:35:53","guid":{"rendered":"https:\/\/deepbluembedded.com\/?p=2545"},"modified":"2023-08-17T23:53:06","modified_gmt":"2023-08-17T20:53:06","slug":"eeproms-internal-in-pic-microcontrollers","status":"publish","type":"post","link":"https:\/\/deepbluembedded.com\/eeproms-internal-in-pic-microcontrollers\/","title":{"rendered":"EEPROM Memory (Internal)"},"content":{"rendered":"\n\n\n\n\n
\"Previous<\/a><\/td>\nPrevious Tutorial<\/strong><\/a><\/td>\nTutorial 17<\/span><\/strong><\/span><\/td>\nNext Tutorial<\/strong><\/a><\/td>\n\"Next<\/a><\/td>\n<\/tr>\n
<\/td>\nEEPROMs (In Pic Microcontrollers)<\/strong><\/span><\/td>\n<\/td>\n<\/tr>\n
<\/td>\nIntroductory Level\u00a0\u2605\u2606\u2606\u2606\u2606<\/strong><\/span><\/td>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

 <\/p>\n

In this tutorial, you’ll learn what are EEPROM memories? How do they work? What are their applications? And how to interface the internal EEPROM memory within our PIC Microcontroller chip. We’ll also develop the required firmware drivers for EEPROM memory to perform Write\/Read operations at any memory locations we want. This tutorial is somehow theoretical in nature but it’s fundamentally important and informative. So, let’s get started right now!<\/span><\/p>\n

Required Components For This Tutorial<\/strong><\/span><\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Qty.<\/strong><\/span><\/td>\nComponent Name<\/strong><\/span><\/td>\nBuy<\/strong> On Amazon.com<\/span><\/td>\n<\/tr>\n
1<\/td>\nPIC16F877A<\/span><\/td>\nAdd<\/a><\/td>\n<\/tr>\n
1<\/td>\nBreadBoard<\/span><\/td>\nAdd<\/a><\/td>\n<\/tr>\n
3<\/td>\nLEDs<\/span><\/td>\nAdd<\/a>\u00a0 \u00a0 Add<\/a><\/td>\n<\/tr>\n
2<\/td>\nPush Buttons<\/span><\/td>\nAdd<\/a><\/td>\n<\/tr>\n
1<\/td>\nResistors Kit<\/span><\/td>\nAdd<\/a>\u00a0 \u00a0 Add<\/a><\/td>\n<\/tr>\n
1<\/td>\nCapacitors Kit<\/span><\/td>\nAdd<\/a>\u00a0 \u00a0 Add<\/a><\/td>\n<\/tr>\n
1<\/td>\nJumper Wires Pack<\/span><\/td>\nAdd<\/a>\u00a0 \u00a0 Add<\/a><\/td>\n<\/tr>\n
1<\/td>\nLM7805 Voltage Regulator (5v)<\/span><\/td>\nAdd<\/a><\/td>\n<\/tr>\n
1<\/td>\nCrystal Oscillator<\/span><\/td>\nAdd<\/a><\/td>\n<\/tr>\n
1<\/td>\nPICkit2 or 3 Programmer<\/span><\/td>\nAdd<\/a><\/td>\n<\/tr>\n
1<\/td>\n9v Battery or DC Power Supply<\/span><\/td>\nAdd<\/a>\u00a0 \u00a0 Add<\/a>\u00a0 \u00a0 Add<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

The Prototyping Board Setup<\/a><\/strong><\/p>\n

\"Prototyping<\/a><\/p>\n

[toc]<\/p>\n


\n

\u00a0 \u00a0What is an EEPROM?\u00a0 \u00a0<\/span><\/strong><\/span><\/h3>\n

 <\/p>\n

EEPROM, pronounced as Double-E-PROM, stands for Electrically Erasable Programmable Read-Only Memory. This kind of memory devices is re-programmable by the application of electrical voltage and can be addressed to write\/read each specific memory location.<\/span><\/p>\n

The EEPROM memory devices have evolved from the old EPROM memories. Which was the previous technology in this area. A typical EPROM has a window on the top side of the IC to allow the ultraviolet rays to reach the memory cells in order to erase the memory. The EPROMs had to be exposed to ultraviolet light for a convenient time period in order to get fully-erased.<\/span><\/p>\n

\"EPROM<\/p>\n

You should also know that EEPROM memories are non-volatile. Which means it won’t lose the data contents when the power goes OFF. It can only be erased electrically whether it’s internal within a microcontroller (By Code) or external IC (By Electronic Device). On the contrary, the RAM memory is volatile. Which means it does lose all of its contents when the power goes OFF.<\/span><\/p>\n

EEPROMs are fabricated and shipped as standalone IC chips and Microchip Technology has a significant share of this area in the market. External EEPROMs are manufactured to be interfaced in two different ways. There are parallel & serial address\/data lines versions of EEPROMs.<\/span><\/p>\n

\"Serial<\/p>\n

However, we won’t be considering these devices in this tutorial. Instead, we’ll discuss the internal EEPROM memory integrated within the microcontrollers themselves.<\/span><\/p>\n

The internal EEPROM memories (Built-in Within Microcontrollers) can be accessed for reading\/writing operations by code. Writing a few lines of code will enable you of storing and\/or retrieving data from the built-in EEPROM memory. And this is going to be our task in this tutorial. To develop the required firmware to drive this memory module.<\/span><\/p>\n

 <\/p>\n


\n

\u00a0 \u00a0Applications For EEPROMs\u00a0 \u00a0<\/span><\/strong><\/span><\/h3>\n

 <\/p>\n

Let me give you a quick recap of the features of EEPROM memories before discussing their applications in real-life. A typical EEPROM device regardless of its type (internal\/external) has the following features:<\/span><\/p>\n