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.
12- or 14-bit
‘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
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
• Targeted at consumer products, burglar
PIC – At a glance…
• PIC is a RISC design and using a Harvard
Don’t worry… It’s not the
end of the world yet. Let
us take a look what are
Reduced Instruction Set Computers (RISC).
Simple instructions, few in number.
Usually execute in a single cycle.
Fixed length instructions.
Few addressing modes.
CPU is smaller.
Only LOAD/STORE instructions access
• Harvard architecture is a newer concept than vonNeumann's. It rose out of the need to speed up the work of a microcontroller.
• In Harvard architecture, Data Access and Address
Access are separate. Thus a greater flow of data is
possible through the central processing unit.
• Separate program bus and data bus: can be different
• For example, PICs use:
– Data memory (RAM): a small number of 8 bit registers
– Program memory (ROM): 12bit, 14bit or 16bit wide (in
EPROM, FLASH, or ROM)
Features of the PIC18 microcontroller
• 8-bit CPU
• 2 MB program memory space (ROM), available in
different memory types such as flash, OTP and masked.
• A maximum of 4K of data RAM space
• 256 bytes to 1KB of data EEPROM
• Can have from 16 to 72 pins dedicated to I/O.
• Standard peripherals: ADC, timers and USART.
• Special features: sleep mode, watchdog timer, Code
protection, In-circuit serial programming, In-circuit
• Operates at up to 40 MHz crystal oscillator
PIC18F Microcontroller Families
• Microcontroller Unit (MCU)
– Microprocessor unit (MPU)
– Harvard Architecture
• Program memory for instructions
• Data memory for data
– I/O ports
– Support devices such as timers
PIC18F – MPU and Memory
• Includes Arithmetic Logic Unit (ALU), Registers,
and Control Unit
– Arithmetic Logic Unit (ALU)
• Instruction decoder
– 16-bit instructions
• Status register that stores flags
– Carry (C ), Digital Carry (DC), Overflow (OV), Negative (N), Zero (Z)
• WREG –...
Please join StudyMode to read the full document