• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
Circuits Gallery

Circuits Gallery

All about Electronics and Circuits

  • Home
  • Basics
    • Components
    • Wiring
    • Circuitry
    • Oscilloscope
    • Conductivity
  • Project
    • Using 555 Timer
    • Using Op-Amp
  • MicroController
    • PIC
  • Arduino
  • Simulation
  • Digital
  • Communication
  • How To
  • About Us

Pic Microcontroller Beginner’s Guide Basic Connection Circuit

April 30, 2022 by Charles Clark Leave a Comment

What is a pic microcontroller? The PIC microcontroller is a low-cost ‘ computer on a chip’ manufactured by Microchip. They allow electronic designers and hobbyists to impart intelligence and logic to a single chip for special purpose applications and products. The PIC microcontroller programming is done using the popular software ‘Mikro C’. This powerful yet easy to program into a 40-pin package is upwards compatible with the PIC16C5X, PIC12CXXX, and PIC16C7X devices.

How to program a microcontroller? Which is the program for microcontrollers? These are the commonly asked questions by microcontroller beginners. Here we are going to explore the world of microcontroller, microcontroller programming, and embedded systems with PIC16F877A. It has five ports- port A, port B, port C, port D, and port E.

An embedded system design is easy with the help of embedded C programming. Let’s start studying microcontrollers and embedded C programming for microcontroller PIC using Mikro C Pro. This article deals with the basic connection diagram and a LED blinking program for the PIC microcontroller.

Why PIC is used/ Why PIC is Popular?

  • High speed
  • High-performance RISC (Reduced Instruction Set Computer) CPU
  • Instruction Set simplicity
  • Integration of operation features
  • Programmable timer options
  • Interrupt control
  • EPROM/OTP/ROM options
  • Inbuilt modules
  • Low power consumption
  • Wide operating voltage range: 2.5 to 6 volt
  • Programmable code protection mode
  • Power-saving sleep mode

PIC16F877A Features

  • High-performance CPU
  • Only 35 instructions
  • All are single cycle instruction excluding program branches.
  • The operating speed is DC to 20 MHz.
  • 8Kx14 words of flash memory
  • 368×8 bytes of data memory
  • 256×8 bytes of EEPROM data memory
  • Interrupt compatibility
  • Power-on reset
  • Power up timer and oscillator start-up timer
  • Watchdog timer with its own chip RC oscillator for reliable operation
  • Programmable code protection power-saving SLEEP mode
  • Low power, high-speed CMOS FLASH/EEPROM technology
  • In-circuit serial programming capability via two pins
  • Processor read-write access to program memory
  • Single 5v in-circuit serial programming capability
  • In-circuit debugging via two pins
  • Wide operating voltage range
  • High sink or source current
  • Low power consumption

Basic connection diagram of PIC Microcontroller

To start a microcontroller project you need to configure the PIC as follows (Basic requirements)

(LED connected at the 7th pin of Port B is just an example)

Components required

  1. Power supply
  2. PIC16F877A microcontroller
  3. Resistors ¼ watt (1kΩ x 2)
  4. Capacitors (22pF x 2)
  5. An electrolytic capacitor (1µF)
  6. Push-button switch (for resetting the PIC)
  7. Crystal (4MHz)
  8. LED

Example Program [LED Blinking]

The program codes are well commented on for better understanding.

[cc lang=”C”]void main()
{
TRISB=0X00; //Initializing PORT B as output port
while(1) //Infinite loop
{
PORTB=0XFF; //Setting all bits of PORT B as HIGH
delay_ms(100); //Calling inbuilt delay program
PORTB=0X00; // Setting all bits of PORT B as LOW
delay_ms(100); //Calling inbuilt delay program
}
}[/cc]

Conclusion

This article will give you a brief idea about PIC microcontrollers and their work. We have discussed two popular PIC and their features. later on, we’ve also provided a sample code that could be a perfect starter for you with the PIC microcontroller.

Filed Under: MicroController, PIC

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

More To See

How Far Can You Run Low Voltage Lighting

How Far Can You Run Low Voltage Lighting? Exploring the Limits of Low Voltage Lighting Installations

What is the Difference between RC Coupling and Transformer Coupling

What is the Difference between RC Coupling and Transformer Coupling? In-Depth Guide

Oscilloscope Probe X1 X10 Difference

Oscilloscope Probe X1 X10 Difference | Detection and Compensation of Probes

How to Measure Amps on 240V Circuit With Multimeter

How to Measure Amps on 240V Circuit With Multimeter | Step-By-Step Guide

More About

  • Arduino
  • Basics
  • Circuitry
  • Communication
  • Components
  • Conductivity
  • Digital
  • How To
  • MicroController
  • Oscilloscope
  • PIC
  • Project
  • Simulation
  • Using 555 Timer
  • Using Op-Amp
  • Wiring

Footer

QUICK LINKS

  • About Us
  • Privacy Policy
  • Terms and Conditions
  • Contact

AFFILIATE DISCLOSER

Circuits Gallery is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for website owners to earn advertising fees by advertising and linking to amazon (.com, .co.uk, .ca etc) and any other website that may be affiliated with Amazon Service LLC Associates Program

© 2023 · Circuits Gallery | All Rights Reserved