Introduction to PIC 16f877a

PIC stands for Peripheral Interface Controller. It can be programmed using flash memory technology, this lets stored data be electrically erased and reprogrammed, making this microcontroller very convenient and widely used in a huge number of devices like remote sensors, security and safety devices and home automation. This microcontroller is pretty cheap and can be handled easily. We will be discussing the introduction to PIC 16f877a, the pin diagram and its uses below.

PIC16f877a Pin Diagram

Total number of pins are 40 with 33 of them being i/o pins. Some pins for these I/O ports are multiplexed with an alternate function for the peripheral features on the device. In general, when a peripheral is enabled, that pin may not be used as a general-purpose I/O pin. When programmed smartly, a single pin can switch between functionalities however multi-funtion mode is pretty advanced and should not be used as a beginner. 

Introduction to PIC 16f877a

1. MCLR/Vpp

This acts as a reset pin. When the pin is pulled low, it will hold the device in reset mode. When the PIC is normally operated, this pin is pulled high through a resistor connected to Vdd. An addition of a capacitor facilitates in holding the device in reset mode longer which helps when a short signal is used to pull the pin low.

Introduction to PIC 16f877a

2. RA0/AN0

Analog pin 0 or 0th pin of PORTA; bidirectional input/output pin

3. RA1/AN1

Analog pin 1 or 1st pin of PORTA; bidirectional input/output pin

4. RA2/AN2/Vref-

Analog pin 2 or 2nd pin of PORTA; bidirectional input/output pin. It can also be assigned negative analog voltage.

5. RA3/AN3/Vref+

Analog pin 3 or 3rd pin of PORTA; bidirectional input/output pin. It can also be assigned positive analog voltage.

6. RA4/T0CKI/C1out

4th pin of PORTA; bidirectional input/output pin. This acn also work as the clock input pin.

7. RA5/AN4/SS/C2out

Analog pin 4 or 5th pin of PORTA; bidirectional input/output pin. It can also be used as the slave select for synchronous serial port in the microcontroller.

8. RE0/RD/AN5

Analog pin 5 or 0th pin of PORT E; bidirectional input/output pin. It can also act as ‘read control’ pin which will be active low.

9. RE1/WR/AN6

Analog pin 6 or 1st pin of PORT E; bidirectional input/output pin. It can also act as ‘write control’ pin which will be active low

10. RE2/CS/AN7

7th pin of PORT E; bidirectional input/output pin. It can also act as a ‘control select’ pin which will be active low

11. Vdd

Positive voltage supply for input/output and logic pins. Should be connected to 5V.

12. Vss

Positive pin of MCU (+5V)

13. OSC1/CLKI

External Oscillator/clock input pin

14. OSC2/CLKO

External Oscillator/clock output pin

15. RC0/T1OSO/T1CKI

0th pin of PORT C; bidirectional input/output pin

16. RC1/T1OSI/CCP2

1st pin of PORT C; bidirectional input/output pin or Timer/PWM pin

17. RC2/CCP1

2nd pin of PORT C; bidirectional input/output pin or Timer/PWM pin

18. RC3/SCK/SCL

3rd pin of PORT C; bidirectional input/output pin. It can be the output for SPI or I2C modes. Cam also be used as the input/output for synchronous serial clock.

19. RD0/PSP0

0th pin of PORT D; bidirectional input/output pin

20. RD1/PSPI

1st pin of PORT D; bidirectional input/output pin

21. RD2/PSP2

2nd pin of PORT D; bidirectional input/output pin

22. RD3/PSP3

3rd pin of PORT D; bidirectional input/output pin

23. RC4/SDI/SDA

4th pin of PORT C; bidirectional input/output pin or Serial Data in pin

24. RC5/SDO

5th pin of PORT C; bidirectional input/output pin or Serial Data Out pin

25. RC6/Tx/CK

6th pin of PORT C; bidirectional input/output pin or Transmitter pin of Microcontroller

26. RC7/Rx/DT

7th pin of PORT C; bidirectional input/output pin or Receiver pin of Microcontroller

27. RD4/PSP4

4th pin of PORT D; bidirectional input/output pin

28. RD5/PSP5

5th pin of PORT D; bidirectional input/output pin

29. RD6/PSP6

6th pin of PORT D; bidirectional input/output pin

30. RD7/PSP7

7th pin of PORT D; bidirectional input/output pin

31. Vss

Positive pin of MCU (+5V)

32. Vdd

Positive voltage supply for input/output and logic pins. Should be connected to 5V.

33. RB0/INT

0th pin of PORT B or External Interrupt pin

34. RB1

1st pin of PORT B

35. RB2

2nd pin of PORT B

36. RB3/PGM

3rd pin of PORT B or connected to the programmer

37. RB4

4th pin of PORT B

38. RB5

5th pin of PORT B

39. RB6/PGC

6th pin of PORT B or connected to the programmer

40. RB7/PGD

7th pin of PORT B or connected to the programmer

The article Introduction to PIC 16f877a is referred from the following articles –

https://microcontrollerslab.com/pic16f877a-introduction-features/

https://roboticelectronics.in/introduction-of-8051-microcontroller/

https://roboticelectronics.in/introduction-to-processors/

Spread knowledge

Leave a Comment

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