Monday 4 June 2012

Pin Diagram 16F877A

Before doing any circuit on the 16F877A, we must understand and memorize the pin diagram of the 16F877A. Let's us review on the picture below,


Basically, this is a DIP (Dual in Line) package having 40 pins. The first impression on some students of mine are "what a lot of pins you have there...(while drooling)". Yes there are a lot of pins but let us simplify the pin diagram.

There are 7 main pins that need to be wired first. If there are any problems in the PIC system, I will check these 7 pins before looking to any interfaces on the PIC. The 7 pins are:
  • Pin 1   - MCLR (always give +5V. if momentarily give a 0V, it will reset)
  • Pin 11 & 32 - Vdd (give +5V)
  • Pin 12 & 31 - Vss  (give 0V)
  • Pin 13 & 14 - OSC1 & OSC2 (connect a resonator / crystal oscillator ranging from 4MHz to 20MHz)
  *reset refers to the program to jump back at the 1st line of the programming.
  *for Pin 1, if supplied with +5V at all time the PIC will be on standby but cannot reset. To do that, we must     
    add a push button and a resistor to supply with 0V. The circuit symbol are as follows:

  *crystal oscillator and resonator are like this:


Now we have stated that 7 pins needs to be connected to PIC16F877A, therefore 40 - 7 = 33pins. These 33 pins are bidirectional meaning that it can be an input or an output. 16F877A have 5 ports and each ports have different pins as described below:

1 comment:

  1. thank you.but is it for pic16f877a? itis pic16f877/84

    ReplyDelete