Hello! Welcome to Embedic!
This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > Embedded Events > Introduction to PIC16F84A microcontroller 2023

Introduction to PIC16F84A microcontroller 2023

Date: 24-10-2023 ClickCount: 453

PIC16F84A Microcontroller Introduction

The PIC16F84A is a popular 8-bit microcontroller manufactured by Microchip Technology, which is now part of Microchip Technology Inc. It's part of the PIC (Peripheral Interface Controller) family, known for its ease of use, low cost, and versatility. The PIC16F84A is often used in a variety of embedded systems and projects, thanks to its simplicity and reliability.

 PIC16F84A Microcontroller

Learn about PIC Microcontroller

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:

 

  • RISC Architecture: PIC microcontrollers typically use a Reduced Instruction Set Computer (RISC) architecture, which simplifies the instruction set, making them efficient and easy to program.
  • Flash Memory: They often have onboard flash memory for program storage, allowing users to reprogram the microcontroller with new firmware.
  • Peripheral Integration: PIC microcontrollers come with a wide range of integrated peripherals, such as analog-to-digital converters (ADCs), timers, pulse-width modulation (PWM) modules, communication interfaces (UART, SPI, I2C), and more.
  • Low Power Options: Many PIC microcontrollers are available with low power consumption options, making them suitable for battery-powered applications.
  • Varied Pin Counts: They are available in various pin configurations to accommodate different applications, from small 8-pin devices to larger packages with more I/O pins.
  • Development Tools: Microchip provides a comprehensive set of development tools, including software development environments, compilers, debuggers, and programmers, which makes it easier for developers to work with PIC microcontrollers.
  • Wide Application Range: PIC microcontrollers are used in a wide range of applications, including consumer electronics, automotive systems, industrial automation, home automation, medical devices, and more.
  • Variety of Families: The PIC microcontroller family encompasses various subfamilies with different features and capabilities, allowing developers to choose the most suitable microcontroller for their specific application.

 

PIC16F84A Microcontroller Pinout

Here are the pinout information of PIC16F84A

PIC16F84A Microcontroller Pinout

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.

 

PIC16F84A Microcontroller Specifications and Features

Specifications:

 

  • Architecture: Harvard architecture with a reduced instruction set computer (RISC) design.
  • Bit Width: 8-bit, which means it processes data in 8-bit chunks at a time.
  • Clock Speed: Typically operates at clock speeds up to 20 MHz.

 

Memory:

 

  • 1,024 words of flash program memory (reprogrammable).
  • 68 bytes of RAM (Random Access Memory).
  • I/O Pins: 13 I/O pins that can be configured as digital input or output.

 

Peripherals:

 

  • Timers: Includes Timer0 for basic timing and delay functions.
  • Interrupt System: Supports external and internal interrupts.
  • Watchdog Timer: For system reset or periodic reset.
  • Master Clear (MCLR): For reset and programming voltage input.

 

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:

 

  • Crystal Oscillator Mode: Supports external crystal oscillators.
  • RC Oscillator Mode: Can operate with an internal RC oscillator.
  • Clock Output (CLKOUT): In RC mode, it outputs a clock signal that is a quarter of the frequency of the input clock.
  • Power-Saving Modes: The microcontroller can enter a low-power mode when not actively processing, helping to conserve energy.

 

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.

 

PIC16F84A Microcontroller Functions

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.

 

PIC16F84A Microcontroller Application

Embedded Control Systems: The PIC16F84A is often used as the central processing unit in various embedded control systems, including:

 

  • Home automation and control systems.
  • Appliance control (e.g., microwave ovens, washing machines).
  • Temperature and environmental monitoring and control.

 

Hobbyist Projects: It's a popular choice among hobbyists and electronics enthusiasts for DIY projects, such as:

 

  • LED displays and lighting control.
  • Simple robotics and motor control.
  • Digital thermometer and weather station projects.

 

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:

 

  • Interval timers in sports equipment.
  • Digital clocks and countdown timers.

 

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.

 

PIC16F84A Microcontroller Datasheet

Download PIC16F84A microcontroller datasheet here>>

 

PIC16F84A Microcontroller Manufacturer

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.

 

  • Microcontroller Minimum System Design Based on MSP430F149
  • Programming the STM32 Blue Pill with the Arduino IDE

FAQ

  • What is the maximum clock speed of the PIC16F84A?
  • The PIC16F84A can operate at a maximum clock speed of 20 MHz.
  • What programming languages are commonly used with the PIC16F84A?
  • The PIC16F84A is typically programmed using assembly language or high-level languages like C. Microchip provides the MPLAB IDE and XC8 compiler for programming in C.
  • What is the architecture of the PIC16F84A microcontroller?
  • The PIC16F84A follows the Harvard architecture, which means it has separate program memory and data memory. It uses an 8-bit instruction set and has a Von Neumann-style memory organization, where data and program memory share the same address space.
  • Can I use the PIC16F84A in battery-powered applications?
  • Yes, the PIC16F84A is suitable for battery-powered applications because it has low power consumption features, including a low-power sleep mode and various power-saving options.
  • What are some common development tools and programmers used with the PIC16F84A?
  • Microchip provides development tools like the MPLAB IDE and compilers like the XC8 C compiler for programming the PIC16F84A. There are also various third-party programmers and development boards available for PIC microcontrollers.

Author

Kristina Moyes is an experienced writer who has been working in the electronics industry for the past five years. With a deep passion for electronics and the industry as a whole, she has written numerous articles on a wide range of topics related to electronic products and their development. Kristina's knowledge and expertise in the field have earned her a reputation as a trusted and reliable source of information for readers interested in the latest advancements in electronics.

Hot Products

  • TMX320C6678ACYP

    Manufacturer: Texas Instruments

    IC DSP FIX/FLOAT POINT 841FCBGA

    Product Categories: DSP

    Lifecycle:

    RoHS:

  • PIC18LF25K22-I/SO

    Manufacturer: Microchip

    IC MCU 8BIT 32KB FLASH 28SOIC

    Product Categories: 8bit MCU

    Lifecycle:

    RoHS:

  • TMS320DM647CUTD7

    Manufacturer: Texas Instruments

    IC DGTL MEDIA PROCESSOR 529FCBGA

    Product Categories: DSP

    Lifecycle:

    RoHS:

  • PIC24F16KA101-I/SO

    Manufacturer: Microchip

    IC MCU 16BIT 16KB FLASH 20SOIC

    Product Categories: 16bit MCU

    Lifecycle:

    RoHS:

Customer Comments

  • Looking forward to your comment

  • Comment

    Verification Code * 

Compare products

Compare Empty