This article was automatically translated from the original Turkish version.
+2 More

PIC16F84A is an 8-bit microcontroller developed by Microchip Technology. The acronym PIC stands for Peripheral Interface Controller, and it was originally designed in 1993 to control peripheral devices of PDP computers. Since then, it has become widely used in embedded systems. The PIC16F84A stands out for its low power consumption, high performance, and flash memory technology. This 18-pin integrated circuit is equipped with 1K words of program memory, 68 bytes of RAM, and 64 bytes of EEPROM. As a member of the mid-range PIC family, it is favored in both hobby projects and industrial applications due to its simple instruction set and flexible architecture.

PIC16F84A Microcontroller (Microchip)
The PIC16F84A is a RISC (Reduced Instruction Set Computer) microcontroller based on the Harvard architecture. This architecture increases processing speed by providing separate pathways for program and data memory. The data bus is 8 bits wide, while the program bus is 14 bits, allowing each instruction to be stored as a 14-bit word. The microcontroller is manufactured using CMOS technology, offering low power consumption and operating at clock frequencies up to 20 MHz, enabling instruction execution cycles of 200 nanoseconds.
The memory structure of the PIC16F84A consists of three main sections: program memory, data memory, and EEPROM. The program memory contains 1024 words (1K) of flash memory that stores user-written instructions. This flash memory is electrically erasable and reprogrammable, facilitating development processes. The data memory comprises 68 bytes of RAM used for temporary data storage during operation. The RAM is divided into two memory banks, each with a 128-byte capacity, but only the first 12 bytes are allocated for Special Function Registers (SFRs). SFRs are used to control the status of input/output ports, timers, and other hardware components. Additionally, the 64-byte EEPROM provides data retention even during power loss and is ideal for permanent data storage.
The PIC16F84A has 13 programmable input/output (I/O) pins grouped into two ports: PORTA (5 bits) and PORTB (8 bits). The RA4 pin of PORTA can also serve as the external clock input for the Timer0 module. The direction of the ports is configured as input or output via the TRISA and TRISB registers. This flexibility makes the microcontroller suitable for acquiring data from sensors, controlling LEDs, or communicating with other peripheral devices. Furthermore, the RB0 pin of PORTB can function as an interrupt input, enabling event-driven programming.
The PIC16F84A features a simple instruction set consisting of 35 single-word instructions. Most instructions execute in a single cycle (four clock cycles), while branch instructions require two cycles. The instruction set supports fundamental operations such as arithmetic and logical operations, data transfer, bit manipulation, and program flow control. When using a 20 MHz crystal oscillator, each instruction cycle completes in 200 nanoseconds, providing fast response times suitable for real-time applications.
The PIC16F84A is typically programmed using assembly language or high-level languages such as C. Microchip’s MPLAB X IDE provides a comprehensive environment for development, compilation, and debugging. Programs written in assembly language are converted into hex files by the MPASM assembler and then loaded onto the microcontroller via a programmer such as PICKIT4. For C language programming, compilers like CCS C or XC8 can be used, simplifying code development for more complex projects.
The PIC16F84A supports four distinct interrupt sources: Timer0 overflow, PORTB change interrupt, EEPROM write completion, and external interrupt (RB0/INT). Interrupts enable the system to respond rapidly to events and are particularly important in time-critical applications. For example, an abrupt signal from a sensor can be detected via the PORTB change interrupt, triggering an appropriate response.
The microcontroller supports various oscillator types: crystal oscillator, RC oscillator, and external clock signal. A crystal oscillator is preferred in applications requiring high accuracy, while an RC oscillator is suitable for low-cost projects. The oscillator frequency directly affects the microcontroller’s processing speed and can range from 100 kHz to 20 MHz.
Due to its versatile design, the PIC16F84A has a broad range of applications, spanning from industrial automation systems to home electronics, and from hobby projects to educational circuits. Its low power consumption offers a significant advantage in battery-powered devices. For instance, it can be integrated with a temperature sensor to create a system that monitors environmental conditions or used in a motor control circuit.
In industrial settings, the PIC16F84A is used in sensor-based control systems, data acquisition devices, and automation panels. Its compact size and low cost make it a preferred choice for mass production. Additionally, its EEPROM memory allows permanent storage of calibration data or device settings.
Due to its simple instruction set and ease of programming, the PIC16F84A is frequently chosen for educational projects. Students can use this microcontroller to develop basic electronic circuits, LED control systems, or simple robotic applications. In hobby projects, common applications include remote-controlled devices, home automation systems, and digital clocks.
The PIC16F84A stands out for advantages such as low power consumption, flash memory technology, and flexible I/O ports. Additionally, Microchip’s extensive support tools and documentation simplify the development process. However, its limited memory capacity and 8-bit data processing capability may prove insufficient for more complex applications. In such cases, more advanced microcontrollers such as the PIC18 or PIC32 are preferred.

No Discussion Added Yet
Start discussion for "PIC16F84A Microcontroller" article
Architecture and Technical Specifications
Memory Structure
Input/Output Ports
Instruction Set and Processing Speed
Programming and Development Tools
Interrupt Structure
Oscillator Options
Application Areas
Industrial Applications
Educational and Hobby Projects
Advantages and Limitations