pic controllers
TRANSCRIPT
2:24 PM Tanmay Bakshi 1
Peripheral Interface Controller
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
9:05 AM Tanmay Bakshi 3
PIC FAMILIES
Data Width => Higher Precision Arithmetic
Instruction Width =>
complex instructions + higher precision arithmetic
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.
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
10:37 AM Tanmay Bakshi 6
8 bit MCUs
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
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
1:43 PM Tanmay Bakshi 9
PIC- Architecture
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
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
• 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
• 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
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
GPRs
General Purpose registers.
SFRs
Special Function registers.
1:58 PM Tanmay Bakshi 15
PIC- registers
2:14 PM Tanmay Bakshi 16
Thanks