Materials
- 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”.

If you don’t know how these materials work or what they look like, look it up
online.
Circuit
- 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.
- 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”.

- Power to Pin 1 (Vpp) – red wire (connected via 47k Resistor in
between)
- Power to Pin 11 (Vdd) – red wire
- Ground to Pin 12 (Vss) – black wire
- Power to Pin 32 (Vdd) – red wire
- Ground to Pin 31 (Vss) – black wire
- Crystal Oscillator to Pins 13 & 14 (OSC1, OSC2), the polarity doesn’t
matter. (polarity = which of the 2 wires goes in which hole).
- Capacitor into power & ground – make sure the polarity is correct according
to the datasheet for the capacitor. If not it could damage the circuit.
- Ground to battery ground (-) – black wire.
- 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.
|