A PIC microcontroller is a microcontroller family made by Microchip Technology that combines the processor, program memory, RAM, EEPROM and peripherals in a single IC. For many years it has been widely used in industrial control boards, measuring devices and electronics education. In this article we cover the basic structure of the PIC18 family and its two most popular models, the PIC18F4520 and the PIC18F4620, for those looking into “what is a PIC microcontroller” and “which PIC model should I choose”.
How PIC Microcontrollers Work
PIC microcontrollers use the Harvard architecture: program memory and data memory are accessed over separate buses, so the next instruction can be fetched while one instruction is executed. The program is stored in Flash memory, which can be electrically erased and rewritten, so the same IC can be programmed many times. The PIC18 family reaches 10 MIPS at a 40 MHz clock frequency.
Thanks to the on-chip peripherals, fewer external components are needed: analog sensors are read with the 10-bit ADC, PWM is generated with the CCP/ECCP modules, timers measure time, and the MSSP (SPI/I²C) and EUSART units communicate with other ICs and with a computer. Programming is usually done in C with the MPLAB X IDE and the XC8 compiler and uploaded with ICSP (in-circuit serial programming) while on the board.
Where Is It Used?
PIC18 series microcontrollers are used in a wide range of applications:
- Industrial Control and Automation: Relay boards, timer controllers, temperature and level control devices.
- Measurement and Data Logging: Reading sensors with the multi-channel ADC and saving data to EEPROM or external memory.
- Motor and Power Control: DC motor, fan and LED brightness control with PWM outputs.
- Communication Interfaces: RS-232/RS-485 lines with EUSART, sensor, display and memory ICs with I²C and SPI.
- Education and Prototyping: The DIP-40 package allows easy prototyping on a breadboard and student projects.
- Maintenance and Repair: Repair of PIC-based boards in existing devices and spare part needs.
Why Choose a PIC Microcontroller?
The PIC family is known for long product life, a wide range of models and mature development tools. Since you can move between models with the same pinout, you can switch to a model with more memory when the software grows, without redesigning the board. Being able to work with 5 V makes compatibility with older industrial systems easier. Through-hole (DIP) package options also simplify assembly in both prototypes and small series production.
The Solution: Microchip PIC18F4520 and PIC18F4620

The PIC18F4520-I/P is a 40-pin PDIP microcontroller from the PIC18 family with nanoWatt technology. It has 32 KB Flash program memory, 1,536 bytes of RAM and 256 bytes of EEPROM. It offers a 13-channel 10-bit ADC, 2 analog comparators, MSSP (SPI/I²C) and EUSART units, PWM with CCP/ECCP and 4 timers. Its internal oscillator, Watchdog and Brown-out Reset features make it suitable for reliable industrial designs.
If your software does not fit in 32 KB, the PIC18F4620-I/P is a natural upgrade path: it has the same pinout and peripherals as the PIC18F4520 but offers 64 KB Flash, 3,968 bytes of RAM and 1,024 bytes of EEPROM. This way you can run more extensive software, graphic display menus or communication protocols without changing the board. The -I/P version of both models has the -40 … +85 °C industrial temperature range.
You can order these ICs from Fark Tedarik with a company invoice:
You can browse other ICs in our Integrated Circuits category.
Additional Advantages and Usage Tips
When working with the PIC18F4520 or PIC18F4620, placing a 100 nF decoupling capacitor close to each supply pin, connecting the MCLR pin to the supply with a suitable resistor and leaving the ICSP connector on the board make both development and field updates easier. Starting the project with the PIC18F4520 and moving to the pin-compatible PIC18F4620 as the software grows is a practical way to reduce cost and risk.
If you are looking for lower power consumption and a 28-pin solution, you can also take a look at our AVR microcontroller article. For bulk purchases and project-based needs contact Fark Tedarik: https://farktedarik.com/iletisim/.
Frequently Asked Questions
What is the difference between the PIC18F4520 and the PIC18F4620?
The two models have the same pinout and peripherals. The difference is the memory size: the PIC18F4520 has 32 KB Flash, 1,536 bytes of RAM and 256 bytes of EEPROM, the PIC18F4620 has 64 KB Flash, 3,968 bytes of RAM and 1,024 bytes of EEPROM.
How is a PIC microcontroller programmed?
The software is usually written with the XC8 C compiler in Microchip’s free MPLAB X IDE and uploaded to the IC via ICSP with a programmer such as a PICkit.
What does the “-I/P” suffix mean?
“I” stands for the industrial temperature range (-40 … +85 °C) and “P” for the PDIP (plastic through-hole DIP) package.
Does the PIC18F4520 work with 3.3 V?
The standard PIC18F4520 works in the 4.2–5.5 V range. For designs that need a lower voltage, the PIC18LF versions that work with 2.0–5.5 V should be preferred.

