What is a pic microcontroller?

The PIC microcontroller

LCD Displays have several types of interfaces to drive them. Some of the most common include:

  • SPI
  • I2C
  • Parallel
  • USB
  • Multiplex
  • Direct drive

No matter which interface you choose, you will need a processor on your board to talk to the LCD.

PIC is a family of microcontroller products made by Microchip Technology. The acronym PIC microcontroller stands for Programmable Interface Controller and more recently Programmable Intelligent Computer. Modern controllers were derived from the PIC1650 which was originally created by General Instruments Microelectronics Division. It was created to offload the I/O (Input/Output) traffic from the CP1600, a 16-bit Central Processing Unit. While it was a decent CPU at the time it had poor performance in handling I/O traffic. From its new product conception and first public availability in 1976 to today an astounding 12 billion units have been sold!

The early models of PIC used ROM which stands for Read Only Memory. This type of memory was used for field-programmable EPROM and could be used for program storage. Some had provisions for erasing memory as well.

Today’s models use Flash memory for program storage. This enables the newer models to reprogram itself if the application calls for it. Newer enhancements including separating program and data memory. Data memory can be utilized as 8, 16 and in the newest models 32 or 64 bit wide. In contrast to the data memory, the program instructions vary by family of PIC and can be 12, 14, 16 or 24 bits long.

The most powerful chips have added instructions for digital signal processing capability.

The PIC microcontroller hardware spans from 8-pin DIP type chips up to 100-pin SMD. New offerings can have discrete I/O, ADC and DAC along with communication ports such as CAN, UART, USB and I2C.

Following the trend in higher end computer technology, high-speed and low-power variations are now available.

Software development tools:

Many software developers have written tools to support PICs. Among the programmer/debugger hardware tools are MPLAB and PICkit. Most development suites utilize C/C++ compilers. Open source code and development are also available to use.

Many entry level circuits and programming classes in today’s public university and junior college levels utilize the PIC microcontroller as a means for hands on development in both hardware and software projects. They are preferred my teachers in these classes due to low cost, reliability, a large user base and extensive collection of application notes.

How Does the PIC Work?

The computer you are using now, whether it’s a laptop or a desktop PC, is essentially ran by a microprocessor. A pic microcontroller is similar but on a much smaller scale. While the desktop computer is a “generic purpose computer” capable of running thousands of programs, the pic microcontroller is more of a “special purpose computer”.

PIC Microcontrollers are intended for a more specific purpose.

PIC Microcontrollers usually have direct contact with the consumer. For a microwave the display’s information is directed to the microcontroller which then turns on the microwave to cook and starts a timer for the timer function. For a TV, the user interacts with the remote control. The microcontroller then receives this data and will adjust the gain for the volume control, video features such as brightness, color, aspect ratio, etc. For the microcontroller, the remote control is the input device and the TV screen is the output device. Another use for a microcontroller is in the engine of your car. It will take information from sensors and use it to adjust fuel mixture and spark plug timing.

A microcontroller is usually embedded. Meaning it is within the device or consumer product being used. This has led to another term for the microcontroller – “embedded controller”. They usually run one program which is stored in ROM and does not change. They are extremely low power as compared to a microprocessor type device. A desktop may consume 50 Watts vs a battery-operated microcontroller which may consume 50 milliwatts or less! Imagine replacing your power bill to 1/1000th!

A microprocessor is usually small and low cost. They can be ruggedized to meet the demands of the environment as well. A microprocessor specialized for a car may be required to work from as low as -30°F in Alaska to 125°F in Phoenix. When considering the heat generated by the car’s engine it may reach 180°F.

The architecture of a microcontroller is complex and may contain the following:

  • A CPU(ranging from a 4-bit processor in more simple applications to a newer architecture 64-bit processor for much more complex applications.)
  • Data-Bus
  • Serial Ports
  • A2D (Analog to Digital) Converter
  • A clock generator for timers, interrupts, etc.
  • ROM, EPROM, EEPROM or flash memory to hold the program and operating parameters. Programming capabilities

How to choose the best ALU (Arithmetic Logic Unit)

It used to be the choices of microcontrollers were very limited. Hobbyists and professionals picking one for a project had a limited list. Now the choices available have grown exponentially to well over thousands on Allied Electronics alone.

Currently a hobbyist should choose a current microcontroller which uses flash or EEPROM memory. These can be programmed then erased and programmed again many times. The cost advantage of one-time-only programmable units have decreased considerably. While external memory options are available, they are usually pricey and can add complexity.

Make a list of the peripherals your microcontroller will be required to support. Some of the options supported are: UART, SPI, I2C, USB, Ethernet and CAN are some of the current examples. Finding an option which supports every peripheral narrows the list considerably. Also is this a low power and relatively simple 4 bit application, or will it support 32 or 64 bit instructions?

Packaging is another consideration. A 256 BGA package type could be great for production but for hobbyists and professionals working in debug mode, the 0.1inch DIP packaging is easier. This type of packaging supports projects many will see at a Junior College or University level. It works well in a development style prototype boards as well.

Memory can range from as little as 256 instructions and 16 bytes of RAM to as much as 8k of instructions. RAM memory in general is scarce in microcontrollers but a lot can be accomplished with 8k of instructions!

Need to interface your LCD or touch panel?

Need help with the design of your custom LCD or resistive touch screen? Contact a technical support person at Focus Displays now by filling out the form here or call us at 480-503-4295.

This article was provided by: Paul Hay, Electrical Engineer.