EC501 EMBEDDED SYSTEM APPLICATION

Topics: Central processing unit, Microcontroller, PIC microcontroller Pages: 35 (1009 words) Published: October 12, 2014
7/15/2013

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 instructions, few in number.
Usually execute in a single cycle.
Fixed length instructions.
Few addressing modes.
CPU is smaller.
Only LOAD/STORE instructions access
memory.

3

7/15/2013

Harvard architecture
• 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
widths!
• 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)

4

7/15/2013

Features

Families

PIC18

Architecture

Instruction
Set

PIC18 Families

5

7/15/2013

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
debugger
• Operates at up to 40 MHz crystal oscillator

6

7/15/2013

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

330_02

13

Microcontroller Unit

330_02

14

7

7/15/2013

PIC18F – MPU and Memory

330_02

15

Microprocessor Unit
• Includes Arithmetic Logic Unit (ALU), Registers,
and Control Unit
– Arithmetic Logic Unit (ALU)
• Instruction decoder
– 16-bit instructions

• Status register that stores flags
– 5-bits
– Carry (C ), Digital Carry (DC), Overflow (OV), Negative (N), Zero (Z)

• WREG –...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Embedded Systems Essay
  • Embedded System Essay
  • Embedded System Essay
  • Embedded Systems Essay
  • Avr Microcontroller and Embedded Systems Essay
  • Embedded System Design Essay
  • Embedded Essay
  • Definition of: Embedded System Essay

Become a StudyMode Member

Sign Up - It's Free