RSS Daily tech news
  • Mysterious Milky Way object accelerates protons beyond one quadrillion electron volts
    Scientists have identified LHAASO J1912+1014u as a cosmic accelerator that can push protons beyond one quadrillion electron volts. The finding may help reveal where the Milky Way’s most energetic cosmic rays come from and how they influence the galaxy.
  • New process turns plastic waste into hydrogen fuel while trapping the carbon
    A new chemical process can transform three of the most common plastics into high-purity hydrogen without sorting them first. The technique operates at much lower temperatures than traditional gasification and captures most of the plastic’s carbon in solid or liquid forms instead of releasing it as carbon dioxide.
  • Scientists built a camera that can track invisible particles in 3D
    A new particle detector called PLATON could replace millions of tiny detector components with a single block of light-producing material. Using a light-field camera, highly sensitive photon sensors, and AI, it reconstructs particle paths in fast, detailed 3D. Simulations suggest it could match or surpass today’s best detectors while being far easier to scale. The […]
  • These tiny holes could change how the world cleans water
    A new nature-inspired membrane uses perfectly uniform one-nanometer pores to filter molecules with remarkable precision. The technology could transform industries such as pharmaceuticals and textiles by reducing energy consumption, improving water reuse, and delivering separation performance far beyond current filters.
  • Scientists discover a hidden quantum world inside cobalt
    Scientists have uncovered unexpected quantum complexity inside cobalt, a metal long thought to be fully understood. Advanced measurements revealed a dense network of topological electronic states that remain robust at room temperature. These states enable extremely fast electron behavior and can be switched or controlled using magnetism. The discovery could open new paths toward next-generation […]
  • A 100-year-old piano mystery has finally been solved
    For more than a century, pianists and music teachers have argued over whether a performer’s touch can actually change the tone color of a piano note — and now scientists say the answer is yes. Using a cutting-edge sensor system that tracked piano key movements at 1,000 frames per second, researchers discovered that elite pianists […]

Pin diagram of the PIC16F877A microcontroller

by Florius
Illustration showing the 40-pin layout of the PIC16F877A microcontroller. Each pin is labeled with its corresponding port (e.g., RA0, RB7), alternate functions (such as ADC inputs, UART, SPI, I2C), and power supply pins (VDD, VSS). Used to guide hardware interfacing in MPLAB X IDE projects.

Pin diagram

The important pins

For accurate and dependable information, referring to the datasheets provided by Microchip Technology is advisable; these documents can be accessed here. Additionally, a brief overview of the pin diagram is recommended, detailing their functionalities and locations. Let’s begin by outlining the pins essential either for MCU operation or Pickit3 programmer-based programming:

  1. Pin 1 houses the MLCR/VPP, serving as a microchip reset mechanism.
  2. Pins 11 and 32, designated as VDD, necessitate a voltage range of 3.3V to 5V for proper functioning.
  3. Pins 12 and 31, denoted as VSS, are connecting to the ground
  4. To establish a connection with the Pickit3 programmer, pins 40 and 39 host PGD and PGC, respectively.
  5. Pins 13 and 14, namely OSC1 and OSC2, deliver a stable clock signal to the microcontroller. When utilizing the Pickit3 programmer, connecting these pins is unnecessary, thanks to the internal oscillator within the programmer facilitating MCU programming.

The exact method to program with your PICKIT3 programming tool, can be found here.

Pin diagram of the PIC16F877A; Programming pins
Pin diagram of the PIC16F877A; Programming pins
Pickit3 programming pins
Pickit3 programming pins

Port structure in the PIC16F877A

The PIC16F877A has 5 ports, namely A to E, where each pin can be configured as an input or output. However, it is important to note that not all ports consist of the same number of bits, due to some pins being taken by VSS or VDD, for example. In detail, port A consists of 6 bits, ports B, C, and D have 8 bits, while port E consists of only 3 bits.

Apart from being used for General Purpose Input Output (GPIO), most pins on this MCU have dedicated roles for specific functions. For instance, some pins on port C function as the TX and RX pins for the UART communication module, enabling the transmission and reception of serial data. Additionally, analog input channels for the ADC module on ports A and E can convert analog signals into digital values, opening up opportunities for further processing. When choosing IO pins, check the requirements of your project adequately to make the best possible decisions.

Labeled diagram of the PIC16F877A microcontroller showing all 40 pins with their port names (RA0–RA5, RB0–RB7, etc.), analog inputs, digital I/O, and special functions like USART, SPI, I2C, ADC, and oscillator pins. Useful for hardware design and firmware development in embedded applications.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.