





. Designed for embedded control applications, it features 1K words of Flash program memory, 68 bytes of RAM, and 64 bytes of EEPROM for non-volatile data storage. Operating at clock speeds up to 20MHz, the PIC16F84A delivers efficient performance with a simple instruction set of only 35 commands. Its 13 configurable I/O pins, built-in timer, interrupt capabilities, and in-circuit programmability make it an ideal choice for educational projects, industrial automation, and electronic product development.
يُعد المتحكم الدقيق PIC16F84A من أشهر المتحكمات الدقيقة ذات معمارية RISC بعرض 8 بت والمُصنّع بواسطة شركة مايكروشيب تكنولوجي. يتميز بذاكرة برنامج Flash بسعة 1K كلمة، وذاكرة RAM بسعة 68 بايت، وذاكرة EEPROM بسعة 64 بايت لتخزين البيانات بشكل دائم. يعمل بسرعة تصل إلى 20 ميجاهرتز مع مجموعة أوامر بسيطة تتكون من 35 تعليمة فقط. بفضل احتوائه على 13 منفذ إدخال وإخراج قابل للبرمجة، ومؤقت داخلي، ودعم المقاطعات، وإمكانية البرمجة داخل الدارة، يُعد خيارًا مثاليًا للمشاريع التعليمية وأنظمة التحكم المضمنة.
The PIC16F84A is an 18-pin enhanced Flash/EEPROM 8-bit microcontroller based on a Harvard architecture with a high-performance Reduced Instruction Set Computer (RISC) design. Its streamlined architecture enables fast execution, with most instructions completing in a single instruction cycle.
Featuring 1,024 words of Flash program memory, 68 bytes of data RAM, and 64 bytes of EEPROM, the PIC16F84A provides sufficient resources for a wide range of embedded applications. The microcontroller supports clock frequencies up to 20MHz, delivering an instruction cycle time as low as 200ns.
The device offers 13 programmable digital I/O pins across PORTA and PORTB, allowing easy interfacing with sensors, displays, switches, relays, and communication modules. Integrated peripherals include Timer0, an 8-level hardware stack, a watchdog timer, and multiple interrupt sources for responsive system operation.
The PIC16F84A supports in-circuit serial programming (ICSP) through dedicated programming pins, simplifying firmware updates and development. Its low cost, ease of programming, and robust feature set have made it a popular choice for educational use, industrial controls, and custom embedded designs.
| Parameter | Specification |
|---|---|
| Product Name | PIC16F84A Microcontroller |
| Manufacturer | Microchip Technology |
| Architecture | Harvard RISC Architecture |
| Bit Width | 8-bit |
| Package Type | 18-Pin PDIP |
| Instruction Set | 35 Single-Word Instructions |
| Program Memory | 1,024 Words Flash |
| Data RAM | 68 Bytes |
| Data EEPROM | 64 Bytes |
| Maximum Clock Frequency | 20MHz |
| Instruction Cycle Time | 200ns @ 20MHz |
| Operating Voltage | 2.0V – 5.5V |
| Digital I/O Pins | 13 |
| Hardware Stack Depth | 8 Levels |
| Timer | 1 × Timer0 (8-bit) |
| Interrupt Sources | 4 |
| Programming Method | In-Circuit Serial Programming (ICSP) |
A PIC microcontroller is a type of microcontroller chip that is part of the PIC (Programmable Integrated Circuit) family developed by Microchip Technology Inc. PIC microcontrollers are widely used in various embedded systems and electronic devices because of their affordability, versatility, and ease of use.
Features of PIC microcontrollers include:
Here are the pinout information of PIC16F84A,

| Pin Name | PDIP No. | SOIC No. | SSOP No. | I/O/P Type | Buffer Type | Description |
| OSC1/CLKIN | 16 | 16 | 18 | I | ST/CMOS(3) | Oscillator crystal input/external clock source input. |
| OSC2/CLKOUT | 15 | 15 | 19 | O | — | Oscillator crystal output. Connects to crystal or resonator in Crystal Oscillator mode. In RC mode, OSC2 pin outputs CLKOUT, which has 1/4 the frequency of OSC1 and denotes the instruction cycle rate. |
| MCLR | 4 | 4 | 4 | I/P | ST | Master Clear (Reset) input/programming voltage input. This pin is an active low RESET to the device. |
| PORTA | — | — | — | — | — | Bi-directional I/O port. |
| RA0 | 17 | 17 | 19 | I/O | TTL | — |
| RA1 | 18 | 18 | 20 | I/O | TTL | — |
| RA2 | 1 | 1 | 1 | I/O | TTL | — |
| RA3 | 2 | 2 | 2 | I/O | TTL | — |
| RA4/T0CKI | 3 | 3 | 3 | I/O | ST | Can also be selected to be the clock input to the TMR0 timer/counter. Output is open drain type. |
| PORTB | — | — | — | — | — | Bi-directional I/O port. PORTB can be software programmed for internal weak pull-up on all inputs. |
| RB0/INT | 6 | 6 | 7 | I/O | TTL/ST(1) | RB0/INT can also be selected as an external interrupt pin. |
| RB1 | 7 | 7 | 8 | I/O | TTL | — |
| RB2 | 8 | 8 | 9 | I/O | TTL | — |
| RB3 | 9 | 9 | 10 | I/O | TTL | — |
| RB4 | 10 | 10 | 11 | I/O | TTL | Interrupt-on-change pin. |
| RB5 | 11 | 11 | 12 | I/O | TTL | Interrupt-on-change pin. |
| RB6 | 12 | 12 | 13 | I/O | TTL/ST(2) | Interrupt-on-change pin. Serial programming clock. |
| RB7 | 13 | 13 | 14 | I/O | TTL/ST(2) | Interrupt-on-change pin. Serial programming data. |
| VSS | 5 | 5 | 5,6 | P | — | Ground reference for logic and I/O pins. |
| VDD | 14 | 14 | 15,16 | P | — | Positive supply for logic and I/O pins. |
Specifications:
Memory:
Peripherals:
Features:
Simple Instruction Set: The PIC16F84A features a straightforward and easy-to-understand instruction set, making it suitable for beginners and educational purposes.
Reprogrammable Flash Memory: The flash program memory can be reprogrammed, allowing for easy updates and modifications to the code.
I/O Ports: It has two 8-bit bi-directional I/O ports (PORTA and PORTB) that can be configured for various input and output functions.
Clocking Options:
Low-Voltage Programming: It supports low-voltage programming, making it easier to program and reprogram the device.
Interrupt-on-Change: Several I/O pins support interrupt-on-change, allowing the microcontroller to respond to external events quickly.
Multiple Packaging Options: Available in various package types, including PDIP, SOIC, and SSOP, to suit different applications.
Operating Voltage Range: Typically operates from a voltage supply range of 2.0V to 6.0V.
I/O Weak Pull-ups: PORTB pins can be software programmed to have internal weak pull-ups on all inputs.
Development Tools: Microchip provides a development ecosystem, including MPLAB X IDE and various programming tools, to facilitate software development for the PIC16F84A.
Applications: Commonly used in simple embedded systems, hobbyist projects, robotics, home automation, and industrial control applications.
Cost-Effective: The PIC16F84A is known for its cost-effectiveness, making it a good choice for projects with budget constraints.
Timer Function:
The PIC16F84A microcontroller is equipped with an 8-bit timer that can function as both a timer and a counter. It provides the flexibility to select between timer and counter modes. When the T0CS (OPTION_REG<5>) bit is cleared, the timer mode is chosen. In contrast, setting this bit selects the counter mode. In timer mode, it increments with the instruction cycle, while in counter mode, it counts both the rising and falling edges of an external signal.
In-Circuit Serial Programming:
The PIC16F84A is widely employed for in-circuit programming due to its USART (Universal Synchronous Asynchronous Receiver Transmitter) module. This module comprises a transmission pin (Tx) for sending serial data to other devices and a receive pin (Rx) for receiving serial data. This capability facilitates communication and programming while the microcontroller is connected within a circuit.
Watchdog Timer:
The PIC16F84A features a built-in watchdog timer that can be programmed to serve a critical role. This timer acts as a safeguard against program hangs or infinite loops by triggering a reset of the microcontroller. Essentially, the watchdog timer functions as a countdown timer, initially set at 1000, and counts down to zero. It must be periodically reset, typically every 3 instructions, to prevent it from reaching zero under normal operation. This reset prevents the microcontroller from getting stuck in unresponsive states.
Sleep Mode:
The microcontroller includes a power-saving sleep mode that enables the system to enter a low-current power-down state. Exiting the sleep mode can be triggered by various events, such as interrupts, the watchdog timer, or an external reset. The sleep mode conserves power when the device is not actively processing.
Power-On Reset:
The PIC16F84A incorporates a power-on reset feature, which automatically resets the microcontroller when it is powered on. This serves as a safeguard against any glitches or unexpected behavior that might have occurred prior to the power-up sequence. It ensures that the microcontroller starts in a known and stable state, eliminating any prior malfunctions.
Embedded Control Systems: The PIC16F84A is often used as the central processing unit in various embedded control systems, including:
Hobbyist Projects: It's a popular choice among hobbyists and electronics enthusiasts for DIY projects, such as:
Educational Projects: Due to its straightforward architecture and instruction set, the PIC16F84A is used in educational environments to teach the fundamentals of microcontroller programming and digital electronics.
Security Systems: Basic security systems like access control or simple alarm systems can be implemented using this microcontroller.
Timers and Counters: It can serve as a timer or counter in applications that require precise timing or event counting. For example:
Communication Devices: While it lacks advanced communication capabilities, it can still be used for basic serial communication interfaces, such as UART, SPI, or I2C, to interface with other devices.
Download PIC16F84A microcontroller datasheet here>>
The PIC16F84A microcontroller is manufactured by Microchip Technology Inc. Microchip Technology Inc. is a global semiconductor manufacturer headquartered in Chandler, Arizona, USA. It is one of the leading companies in the field of microcontrollers and analog semiconductors. The company was founded in 1987 and has a rich history of providing innovative solutions for the electronics industry. Microchip offers a wide range of products and solutions, including microcontrollers, microprocessors, analog and mixed-signal integrated circuits, memory, and various other components used in embedded systems and electronics design.