You are on page 1of 16

PIC Microcontrollers

Chapter 3: The PIC Microcontrollers:


History & Features

Gaby Abou Haidar M.S. Fall 2017 - 2018


• Microcontroller versus Microprocessor
▫ What is the difference between a microprocessor and
microcontroller?
• Microcontrollers for embedded systems
▫ An embedded product is controlled by its own internal
microprocessor (or microcontroller) as opposed to an external
controller.
▫ Typically, in an embedded system, the microcontroller's ROM is
burned with a purpose for specific functions needed for the system
• Choosing a microcontroller
▫ There are 8-bit, 16-bit and 32-bit microcontrollers made by various
chip makers.
▫ With all these different microcontrollers, what criteria do designers
consider in choosing one?

Gaby Abou Haidar M.S. Fall 2017 - 2018


Gaby Abou Haidar M.S. Fall 2017 - 2018
• The first and foremost criterion: it must be efficient and cost
effective.
▫ Analyzing the needs: 8-bit, l6-bit, or 32-bit microcontroller.
▫ Among other considerations in this category are:
 Speed.
 Packaging. This is important in terms of space, assembling, and
prototyping the end product.
 Power consumption. This is especially critical for battery-powered
products.
 The amount of RAM and ROM on the chip.
 The number of I/O pins and the timer on the chip.
 Ease of upgrade to higher-performance or lower-power-consumption
versions.
 Cost per unit.
Gaby Abou Haidar M.S. Fall 2017 - 2018
• The second criterion in choosing a microcontroller is how easy it
is to develop products around it.
▫ Key considerations include the availability of an assembler, debugger,
a code-efficient C language compiler, emulator, technical support,
and both in-house and outside expertise.
• The third criterion in choosing a microcontroller is its ready
availability in needed quantities both now and in the future.
▫ For some designers this is even more important than the first two
criteria.

Gaby Abou Haidar M.S. Fall 2017 - 2018


• The microcontroller is playing a major role in mechatronics.
• Many technical processes and products in the area of mechanical
and electrical engineering show an increasing integration of
mechanics with electronics and information processing.

Gaby Abou Haidar M.S. Fall 2017 - 2018


• A brief history of the PIC microcontroller
▫ In 1989, Microchip Technology Corporation introduced an 8-bit
microcontroller called the PIC, which stands for Peripheral Interface
Controller.
▫ This microcontroller had small amounts of data RAM, a few hundred
bytes of on-chip ROM for the program, one timer, and a few pins for I/O
ports, all on a single chip with only 8 pins.
▫ 8-bit processors: the CPU can work on only 8 bits of data at a time.
▫ Data larger than 8 bits has to be broken into 8-bit pieces to be processed
by the CPU.
▫ One of the problems with the PIC family is that they are not all 100%
upwardly compatible in terms of software when going from one family to
another family.

Gaby Abou Haidar M.S. Fall 2017 - 2018


• PIC18 features
▫ The PIC 18 has a RISC architecture that comes with some standard
features such as on-chip program (code) ROM, data RAM, data
EEPROM, timers, ADC, and USART and I/O ports.
▫ Although the size of the program ROM, data RAM, data EEPROM, and
I/O ports varies among the family members, they all have peripherals
such as timers, ADC, and USART.
▫ Due to the importance of these peripherals, we have dedicated an entire
chapter to each one of them.
▫ The details of the RAM/ROM memory and I/O features of the PIC 18 are
given in the next few chapters.

Gaby Abou Haidar M.S. Fall 2017 - 2018


Gaby Abou Haidar M.S. Fall 2017 - 2018
Gaby Abou Haidar Fall 2017 - 2018
Gaby Abou Haidar M.S. Fall 2017 - 2018
Gaby Abou Haidar M.S. Fall 2017 - 2018
• PIC microcontroller program ROM
▫ the ROM is used to store programs and for that reason it is called program
or code ROM.
▫ Although the PIC18 has 2MB of program (code) ROM space, not all
family members come with that much ROM installed.
▫ The program ROM size can vary from 4K to 128K depending on the
family member.
▫ The PICl8 program ROM is available in different memory types, such as
flash, OTP, and masked, all of which have different part numbers.
• PIC microcontroller with UV-EPROM
▫ Some of the PIC microcontrollers use UV-EPROM, for on-chip program
ROM.
▫ To use these kinds of chips for development requires access to a PROM
burner, as well as a UV-EPROM eraser to erase the contents of ROM.

Gaby Abou Haidar M.S. Fall 2017 - 2018


• PIC18Fxxx with flash
▫ Many PIC18 chips have on-chip program ROM in the form of flash memory.
▫ The flash version uses the letter F in the part number to indicate that the on-chip
ROM is flash.
▫ The flash version is ideal for fast development because flash memory can be
erased in seconds compared to the 20 minutes or more needed for the UV-
EPROM version.
• OTP version of the PIC
▫ OTP (one-time-programmable) versions of the PIC are also available from
Microchip.
▫ The letter C indicates the OTP ROM, while the letter F is for the flash.
▫ The flash version is typically used for product development.
▫ When a product is designed and absolutely finalized, the OTP version of the PIC
is used for mass production (it is cheaper than flash in terms of price per unit).

Gaby Abou Haidar M.S. Fall 2017 - 2018


• Masked version of PIC
▫ Microchip Corporation provides a service in which you can send in your program
and they will burn the program into the PIC chip during the fabrication process of
the chip.
▫ This chip is commonly referred to as masked PIC.
▫ Masked PIC is the cheapest of all types, if the unit numbers are high enough.
• PIC microcontroller data RAM and EEPROM
▫ While ROM is used to store program (code), the RAM space is for data storage.
▫ The PICI 8 has a maximum of 4096 bytes (4K) of data RAM space.
▫ The data RAM size for the PIC 18 varies from 256 bytes to 4096 bytes.
▫ The data RAM space has two components: General-Purpose RAM (GPR) and
Special Function Registers (SFRs).
▫ Because the SFRs are fixed and every microcontroller must have them, it is the
GPR's size that varies from chip to chip.
▫ Microchip gives only the GPR size. The RAM GPR space is used for read/write
scratch pad and data manipulation and is divided into banks of 256 bytes each
Gaby Abou Haidar M.S. Fall 2017 - 2018
• PIC microcontroller peripherals
▫ All the members of the PIC18 family come with ADC (analog-to-digital
converter), timers, and USART (Universal Synchronous Asynchronous
Receiver Transmitter) as standard peripherals.
▫ The ADC is I/O bit and the number of ADC channels in each PIC chip
varies from 5 to 16, depending on the number of pins in the package.
▫ The PICI 8 can have up to 4 timers besides the watchdog timer.
▫ The USART peripheral allows us to connect the PIC 18-based system to
serial ports such as the COM port.

Gaby Abou Haidar M.S. Fall 2017 - 2018

You might also like