PIC CONTROLLERS

16
2:24 PM Tanmay Bakshi 1 Peripheral Interface Controller

Transcript of PIC CONTROLLERS

Page 1: PIC CONTROLLERS

2:24 PM Tanmay Bakshi 1

Peripheral Interface Controller

Page 2: PIC CONTROLLERS

TOPICS TO BE DISCUSSED

PIC Families

8-bit PIC-MCUs architecture

Pipeline operation

Clock types

Power issue

Interrupts

Registers

9:05 AM Tanmay Bakshi 2

PIC

Page 3: PIC CONTROLLERS

9:05 AM Tanmay Bakshi 3

PIC FAMILIES

Data Width => Higher Precision Arithmetic

Instruction Width =>

complex instructions + higher precision arithmetic

Page 4: PIC CONTROLLERS

9:05 AM Tanmay Bakshi 4

PIC

Gates, Simple

Logic Machines,

Disposable

Electronics.

Digital Sensors,

Displays,

Telecom

equipments

Peripheral

Integration

And Higher Level

Analog

Interfacing, USB,

Ethernet,MCU-MCU

16 bit ALU with

Integrated DSP

General purpose

RISC

Microprocessor.

Page 5: PIC CONTROLLERS

9:05 AM Tanmay Bakshi 5

8 bit MCUs

Data memory Organised as 8-bit registers

Some use EEPROM, 16B to 4B

At 0000h – “goto Mainline”-

0005h

Program memory Addressable unit = instruction

word=12/14/16 bits

Smallest = 2Kword

Largest = 64 Kword

Architecture Pipelined RISC

33 to 77 instructions

Stack Stores 0 to 31 instruction

addresses.

Used for function calls

I/O devices 8-bit parallel ports

Synch/Asynch serial ports

Timers+Watchdog timers

A/D + D/A converters

PWM units

Page 6: PIC CONTROLLERS

10:37 AM Tanmay Bakshi 6

8 bit MCUs

Page 7: PIC CONTROLLERS

ALU source: special WORKING

register or data register

ALU destination :

data register or W

Transfer operation:

Data register<-> W

Status register –

Flags produced by ALU

W register: 8 bit wide-

source operand

as well as destination folder.

9:05 AM Tanmay Bakshi 7

8 bit MCUs – Operation Model

Page 8: PIC CONTROLLERS

Status register:

• C- carry bit

• DC- digits carry(same as AC)

• Z= Zero

• TO- reset status bar

• PD- Reset status bar( power down)

• RP0- register bank selection

10:01 AM Tanmay Bakshi 8

8 bit MCUs – Operation Model

Page 9: PIC CONTROLLERS

1:43 PM Tanmay Bakshi 9

PIC- Architecture

Page 10: PIC CONTROLLERS

FSR

It is a pointer used for indirect addressing.

Write the address byte in FSR and then use INDF

instruction.

PCLATH

-> can be independently read or written.

-> Size 5 bits

-> PCL

1:43 PM Tanmay Bakshi 10

PIC-Architecture

Page 11: PIC CONTROLLERS

9:56 AM Tanmay Bakshi 11

Pipeline Operation

Instruction 1

Instruction 2

Instruction 3

Instruction 4

FETCH

FETCH

FETCH

FETCH

EXECUTE

EXECUTE

EXECUTE

EXECUTE

1 2 3 4 5

Page 12: PIC CONTROLLERS

• RC Oscillator

• Crystal Oscillator

• External clock

• Specific modes

LP Mode 32kHz-200kHz

XT Mode 100kHz-4MHz

HS Mode 8MHz-20MHz

9:05 AM Tanmay Bakshi 12

Clock Types

Page 13: PIC CONTROLLERS

• Low power mode - Main Oscillator

• Instruction SLEEP – MCU, data register

• Pipeline locked – Fetch

• On wake up – Next Instruction, WDT reset

9:05 AM Tanmay Bakshi 13

Power Issue

Page 14: PIC CONTROLLERS

3 interrupts

• External Interrupt:

It also wakes up the processor. This must be set before going

to „sleep‟.

• Timer 0 –

Timer 0 overflow.

• Port B change interrupt:

A high to low signal at port B also acts as an interrupt.

9:05 AM Tanmay Bakshi 14

PIC-Interrupts

Page 15: PIC CONTROLLERS

GPRs

General Purpose registers.

SFRs

Special Function registers.

1:58 PM Tanmay Bakshi 15

PIC- registers

Page 16: PIC CONTROLLERS

2:14 PM Tanmay Bakshi 16

Thanks