Summary of PIC16F84A internal EEPROM code and Proteus simulation
This article details C language code for reading and writing the PIC16F84A microcontroller's internal EEPROM using MPLAB and HI-TECH C. It assumes prior knowledge of LED blinking on this chip and includes a Proteus simulation where an LED on RA0 indicates successful EEPROM programming status.Parts used in the PIC16F84A Internal EEPROM Project:
- PIC16F84A microcontroller
- LED attached to RA0
- MPLAB v8.85 software
- HI-TECH C v9.83 compiler
- Proteus v7.10 simulator
This post provides the internal EEPROM reading and writing code for PIC16F84A microcontroller. As we know[1], PIC16F84A microcontroller has 64 bytes of built in EEPROM data space with an address range of 0x00 to 0x3F. This code is written in C language using MPLAB with HI-TECH C compiler. You can download this code from the 'Downloads' section at the bottom of this page.
It is assumed that you know how to blink an LED with PIC16F84A microcontroller. If you don't then please read this page first, before proceeding with this article.
The result of simulating the code in Proteus is shown below.
In the above circuit[2], LED attached on RA0 indicates weather a byte was successfully written in the internal EEPROM or not. In the above figure, LED is ON which indicates that EEPROM was successfully programmed.
Code
The code for the main function is shown below.
Downloads
EEPROM code for PIC16F84A was compiled in MPLAB v8.85 with HI-TECH C v9.83 compiler and simulation was made in Proteus v7.10. To download code and Proteus simulation click here.
For more detail: PIC16F84A internal EEPROM code and Proteus simulation
Quick Solutions to Questions related to PIC16F84A Internal EEPROM Project:
- What is the size of the built-in EEPROM data space in the PIC16F84A?
The PIC16F84A has 64 bytes of built-in EEPROM data space. - What is the address range of the PIC16F84A EEPROM?
The address range is 0x00 to 0x3F. - In which programming language was the provided code written?
The code is written in C language. - Which compilers and software versions were used for compilation and simulation?
The code was compiled with MPLAB v8.85 and HI-TECH C v9.83, while simulation was done in Proteus v7.10. - How does the circuit indicate if a byte was successfully written to the EEPROM?
An LED attached on RA0 indicates success; it turns ON when the EEPROM is successfully programmed. - What prerequisite knowledge is required before proceeding with this project?
You must know how to blink an LED with the PIC16F84A microcontroller.
Related projects
PIC Stepper Motor Controller using PIC16F84A with Proteus Simulation
Introduction Stepper motors are widely used in embedded systems and DIY electronics projects where precise position control is required. This PIC Stepper...
Programmers & ICSP · PIC16F84APIC Musical Doorbell using PIC16F84A with Proteus Simulation
IntroductionThis microcontroller project demonstrates a musical doorbell built around a PIC16F84A and a simple piezo sounder.Using two push buttons, the system allows...
Beginner Tutorials · PIC16C84Exploring the World of PIC Microcontrollers: An Architectural Overview
A Peripheral Interface Microcontroller (PIC), developed by General Instruments Microcontrollers in 1993, operates under software control and is programmed to execute various...
Communication & Interfacing · PIC18F4520CAN FD Node based on a PIC18 Microcontroller
The introduction sets the stage for an embedded systems project that involves developing a Embedded C CAN FD project using the MCP2517FD...
Communication & InterfacingLAN9662 Gigabit Switch: Optimized for Industrial Ethernet
Introduction It should come as little surprise therefore that one element of what is now more commonly referred to in some circles...
Communication & InterfacingPIC Microcontroller: Fundamentals & Applications for Students
Introduction Microcontrollers are the key components in the embedded systems market. A variety of embedded systems was formed and developed after the...

