Home > Electronic Tutorials > Microcontroller Tutorials > PIC 16F877A Project Tutorial > How to Hook up the PIC so it will run?

PIC16F877A Microcontroller Project Tutorial

How to Hook up the PIC so it will run?

  • PIC16F877A
  • Breadboard
  • 20 Megahertz crystal oscillator
  • 2 7-20pf capacitor
  • Black & red wires
  • >7.2 volt battery

For use with a higher voltage supply, you will need to use a voltage regulator to convert the higher voltage to 5v. Typically a 7805 is used. Look up the datasheet by searching Google “7805 voltage regulator”.

7805 voltage regulator block diagram

If you don’t know how these materials work or what they look like, look it up online.


  1. Insert PIC on breadboard. Refer to pin diagram above for pin numbers. To prevent confusion, orient the PIC so the dimple on top faces the same way as the pin diagram.
  2. Connect breadboard side strips - power to power (red strips), ground to ground (black strips. Just like the bottom 2 wires below. Those strips are now referred to as “power” & “ground”.

Breadboard Diagram

  1. Power to Pin 1 (Vpp) – red wire (connected via 47k Resistor in between)
  2. Power to Pin 11 (Vdd) – red wire
  3. Ground to Pin 12 (Vss) – black wire
  4. Power to Pin 32 (Vdd) – red wire
  5. Ground to Pin 31 (Vss) – black wire
  6. Crystal Oscillator to Pins 13 & 14 (OSC1, OSC2), the polarity doesn’t matter. (polarity = which of the 2 wires goes in which hole).
  7. Capacitor into power & ground – make sure the polarity is correct according to the datasheet for the capacitor. If not it could damage the circuit.
  8. Ground to battery ground (-) – black wire.
  9. Power (red) to battery power (+) – red wire. Or, solder that wire to a switch & run another wire from the switch to battery power, so you can switch the power on & off.

If using voltage regulator:

  • raw battery power wire goes into voltage regulator input.
  • breadboard ground strip goes to battery ground.
  • voltage regulator output wire (+5 volts) goes to breadboard power strip.
  • voltage regulator ground wire goes to breadboard ground strip.
Note: To report broken links or to submit your projects please send email to Webmaster