What is PIC?
Introducing PIC
PIC is a family of RISC (Reduced Instruction Set Computer) microcontrollers
made by Microchip Technology, derived from the PIC1650 originally
developed by General Instrument's Microelectronics Division. Microchip
Technology does not use PIC as an acronym; in fact the brand name is
PICmicro.
What the name PIC stands for and who actually came up with the first PIC is an open dispute, some think it is an acronym of Peripheral Interface Controller.
However, I have been looking thru out the net and found that original
General Instruments' acronym for the PIC1650 was "Programmable Intelligent Computer".
The original PIC was built to be used with GI's new 16-bit CPU, the
CP1600. While generally a good CPU, the CP1600 had poor I/O performance,
and the 8-bit PIC was developed in 1975 to improve performance of the
overall system by offloading I/O tasks from the CPU. The PIC used simple
microcode stored in ROM to perform its tasks, and although the term
wasn't used at the time, it is a RISC design that runs one instruction
per cycle (4 oscillator cycles).
The PIC is a small computer
The PIC,
like the CPU, has calculation functions and memory which can be
controlled by software. However, the throughput and the memory capacity
are low. Depending on the kind of PIC, the maximum clock operating
frequency is about 20 MHz and the memory capacity (to write the program)
is about 1K to 4K words.The clock frequency determines the speed at
which a program is read and an instruction is executed. The throughput
cannot be judged with the clock frequency alone. It changes with the
processor architecture. However within the same architecture, the one
with the highest clock frequency has the highest throughput.I use a
14-bit WORD for program memory capacity. An instruction is a word long.
Program memory is measured in BYTES, one byte is 8 bits. The bit is the
smallest unit, and can have the value of 1 or 0. The instruction word of
the PIC16F84A is composed of 14 bits. 1K words is equal to 1 x 1,024 x
14 = 14,336 bits. To convert this to Kbytes divide it by 8 x 1024,
(14,336 / 8 x 1024 = 1.75K bytes).
A
memory capacity of 1G bytes = 1,024M bytes, 1M bytes = 1,024K bytes, 1K
bytes = 1,024 bytes. 1K bytes is not equal to 1000 bytes. This is
because the calculation is in binary (2 to the tenth power = 1,024).
The PIC 16x8x Family
The
PIC16F8X family of devices are CMOS (Complementary Metal Oxide
Semiconductor) microcontrollers consisting of the PIC16F83, PIC16C83,
PIC16F84, PIC16C84, PIC16LCR8X and PIC16LF8X types. CMOS technology
offers a number of advantages over other technologies. For example, CMOS
circuits consume very little power, operate over quite a wide voltage
range and are quite forgiving of bad layout and electrical noise. The
PIC16X8X is available in an 18 pin IC package. The IC consists of two
pins for the power supply, two pins for the oscillator, OSC1 and OSC2, a
pin for the master reset clear line MCLR and 13 pins for input/output (I/O) ports, RA0 to RA4 and RB0 to RB7.
All PICmicro™ microcontrollers employ an advanced RISC
architecture. PIC16F8X devices have enhanced core features, eight-level
deep stack, and multiple internal and external interrupt sources. The
separate instruction and data buses of the Harvard architecture allow a
14-bit wide instruction word with a separate 8-bit wide data bus. The
two stage instruction pipeline allows all instructions to execute in a
single cycle, except for program branches (which require two cycles). A
total of 35 instructions (reduced instruction set) are available.
Additionally, a large register set is used to achieve a very high
performance level. PIC16F8X microcontrollers typically achieve a 2:1
code compression and up to a 4:1 speed improvement (at 20MHz) over other
8-bit microcontrollers in their class. The PIC16F8X has up to 68 bytes
of RAM, 64 bytes of Data EEPROM memory, and 13 I/O pins. A timer/counter
is also available. The PIC16CXX family has special features to reduce
external components, thus reducing cost, enhancing system reliability
and reducing power consumption. There are four oscillator options, of
which the single pin RC oscillator provides a low-cost solution, the LP
oscillator minimizes power consumption, XT is a standard crystal, and
the HS is for High Speed crystals. The SLEEP (power-down) mode offers
power saving. The user can wake the chip from sleep through several
external and internal interrupts and resets. A highly reliable Watchdog
Timer with its own on-chip RC oscillator provides protection against
software lock-up.
Features of PIC16x8x:
PIC16F83 | PIC16CR83 | PIC16F84 | PIC16CR84 | |
Maximum Frequency of Operation (MHz) | 10 | 10 | 10 | 10 |
Flash Program Memory | 512 | - | 1k | - |
ROM Program Memory | - | 512 | - | 1K |
Data Memory (bytes) | 36 | 36 | 68 | 68 |
Data EEPROM (bytes) | 64 | 64 | 64 | 64 |
Timer Module(s) | TMR0 | TMR0 | TMR0 | TMR0 |
Interrupt Sources | 4 | 4 | 4 | 4 |
I/O Pins | 13 | 13 | 13 | 13 |
Voltage Range (Volts) | 2.0-6.0 | 2.0-6.0 | 2.0-6.0 | 2.0-6.0 |
Packages | 18-pin DIP, SOIC | 18-pin DIP, SOIC | 18-pin DIP, SOIC | 18-pin DIP, SOIC |
What Dose the F,C,CR & LF in the PIC device number mean
- F, as in PIC16F84. These devices have Flash program memory and operate over the standard voltage range.
- LF, as in PIC16LF84. These devices have Flash program memory and operate over an extended voltage range.
- CR, as in PIC16CR83. These devices have ROM program memory and operate over the standard voltage range.
- LCR, as in PIC16LCR84. These devices have ROM program memory and operate over an extended voltage range.
Special Features of the PIC 16f84
What
sets a microcontroller apart from other processors are special circuits
to deal with the needs of real time applications. The PIC16F8X has a
host of such features intended to maximize system reliability, minimize
cost through elimination of external components, provide power saving
operating modes and offer code protection. These features are:
• OSC Selection
• Reset
- Power-on Reset (POR)
- Power-up Timer (PWRT)
- Oscillator Start-up Timer (OST)
• Interrupts
• Watchdog Timer (WDT)
• SLEEP
• Code protection
• ID locations
• In-circuit serial programming
The
PIC16F8X has a Watchdog Timer which can be shut off only through
configuration bits. It runs off its own RC oscillator for added
reliability. There are two timers that offer necessary delays on
power-up. One is the Oscillator Start-up Timer (OST), intended to keep
the chip in reset until the crystal oscillator is stable. The other is
the Power-up Timer (PWRT), which provides a fixed delay of 72 ms
(nominal) on power-up only. This
design keeps the device in reset while the power supply stabilizes. With these two timers on-chip, most applications need no external reset circuitry. SLEEP mode offers a very low current power-down mode. The user can wake-up from SLEEP through external reset, Watchdog Timer time-out or through an interrupt. Several oscillator options are provided to allow the part to fit the application. The RC oscillator option saves system cost while the LP crystal option saves power. A set of configuration bits are used to select the various options.
design keeps the device in reset while the power supply stabilizes. With these two timers on-chip, most applications need no external reset circuitry. SLEEP mode offers a very low current power-down mode. The user can wake-up from SLEEP through external reset, Watchdog Timer time-out or through an interrupt. Several oscillator options are provided to allow the part to fit the application. The RC oscillator option saves system cost while the LP crystal option saves power. A set of configuration bits are used to select the various options.