CHAPTER 2
MICROCONTROLLER ARCHITECTURE &
ASSEMBLY LANGUAGE PROGRAMMING
PIC Microcontrollers – History
• Peripheral Interface Controller (PIC) was originally designed by
General Instruments (GI), to be used with the new CPU, CP1600.
• While generally a good CPU, the CP1600 had poor I/O performance.
• In the late 1970s, GI introduced PIC® 1650 and 1655 – RISC with 30 instructions, to improve performance of the overall system.
• General Instrument recognized the potential for the PIC and eventually spun off Microchip, headquartered in Chandler, AZ to fabricate and market the PICmicro..
• Features: low-cost, self-contained, 8-bit, Harvard structure, pipelined, RISC, single accumulator, with fixed reset and interrupt vectors. 2
1
7/15/2013
PIC Families
PIC Family
Stack Size
Instruction
Word Size
No of
Instructions
Interrupt
Vectors
12CX/12FX
2
12- or 14-bit
33
None
16C5X/16F5X
2
12-bit
33
None
16CX/16FX
8
14-bit
35
1
17CX
16
16-bit
58
4
18CX/18FX
32
16-bit
75
2
‘C’ implies CMOS technology; Complementary Metal Oxide Semiconductor
‘F’ insert indicates incorporation of Flash memory technology
Example: 16C84 was the first of its kind. It was later reissued as the 16F84, incorporating Flash memory technology. It was then reissued as 16F84A.
Dr. Gheith Abandah
3
PIC – At a glance….
•
•
•
•
Range of low end 8 bit microcontrollers.
Smallest have only 8 pins, largest 40 pins.
Typical chip is an 18 pin one.
Very cheap, you can pick them up at less than
RM20.
• Targeted at consumer products, burglar alarms etc.
2
7/15/2013
PIC – At a glance…
• PIC is a RISC design and using a Harvard
Architecture…
RISC??!
Harvard Architecture??!
Don’t worry… It’s not the end of the world yet. Let us take a look what are both! RISC Architecture
•
•
•
•
•
•
•
Reduced Instruction Set Computers (RISC).
Simple