Microchip PIC processors - an overview

This overview intended for electronics professionals and hobbyists.

In recent years, microcontrollers have taken over more and more fields in electronics thanks to their low cost.
Small microcontrollers are replacing logical gates, signal generators, timers, etc.
Larger microcontrollers can control entire robots, identify sounds, control automobile systems, manage a smart home and even wash dishes and make coffee. Any dishwasher and coffee machine nowadays are controlled by a microcontroller.
Unlike "classic" electronics, where all components operate simultaneously, microcontrollers work much like computers that run programs, command by command.
That is why the simplest application would be a consecutive series of actions (such as a washing machine's cycle program or a lighting program).
In order to program the components, the human programmer writes the code on a PC, and then uses a hardware which is also called a Programmer to transfer the code to the microcontroller.
Another tool is the emulator, which allows to follow the course of code execution on a PC. The common microcontroller programming languages are Assembler, C, and Basic.
The microcontroller's bigger brother is the microprocessor, which requires external memory and other components.

PIC are microcontrollers made by Microchip. Here are some of their features:

  • The size of the component is miniature, as small as 3 by 3mm, and so is the price, starting at 50 cents for a basic controller in commercial quantities.
  • The number of input/output (I/O) pins ranges between 4 to 69. The I/O is designed for relatively high currents: 25 mA source/sink (suitable for an LED, a buzzer, etc) and each one can be separately designated as an input or an output.
  • The operation voltage ranges between 2V and 5.5V which can be provided by many battery types or other power sources.
  • The power consumption is one of the controllers' main achievements. For instance, while waiting for buttons to be pressed, the microcontroller switches to stand-by mode and consumes less than 1 micro-ampere (Allowing a theoretical life of 1,000 years on 2 AA batteries).
  • During processing (calculations, timekeeping, etc.) the consumption is just a few mA.
  • Some of the controllers have an 8MHz internal clock, allowing 2 million instructions per second, and 10 million instructions per second can be performed using an external clock. This speed allows fast communication, Real Time signal processing, multitasking and more.
  • The memory volume is very small when compared to a PC (Up to 4KB RAM. Up to 128KB program memory. Up to 1KB data flash memory), but there is usually no need for more than that. External memory and hard disks may also be connected.

The long list of peripherals contains:

  • Analog and digital inputs, comparators
  • PWM (pseudo-analog) and digital outputs
  • Capture/Compare for frequency measurement, pulse width measurement, pulse counting, etc.
  • Hardware communication protocols:USART (RS-232/422/485), SPI, I2C, LIN, CAN, USB
  • In-Circuit programming (ICSP) - useful for post-production programming and firmware updates
  • Data protection circuits: Watchdog timer, Brownout reset, Low voltage detection
  • Code protection against duplication/modification/reading the code from the controller

Microchip is the world leader in 8-bit microcontroller production. It is a trusted and a well established company, with an extensive solution line catering for the automotive, telecommunication and industrial markets and the general embedded electronics market.
Microchip caters also for development teams and offers free development software tools, sample components and technical support via its national representatives and its extensive website.

Examples for programs and applications can be found on Microchip's website, under "Design/Application Notes".
An example of a clock's program and hardware (PDF file)