SlideShare a Scribd company logo
1 of 19
Register File Structure in PIC
16F877a or16F8XX
Presented By
Nirbhay Kumar Singh
nirbhaykumar2008@gmail.com
Roll No. 151607
ME – ECE – 2015 Batch
NITTTR Chandigarh
27-Dec-16 1
27-Dec-16 2
Register File Structure in PIC 16F8xx
The Registers
A register is a place inside the PIC that can be written to, read from or
both. Think of a register as a piece of paper where you can look at and
write information on.
Register File Structure
• Register file → locations that an instruction can access via an address.
• Register file consists of two component:-
1. General purpose register file (same as RAM)
2. Special purpose register file
27-Dec-16 Nirbhay Kr Singh, Roll No. 151607, ME-MOD-ECE-2015 3
RAM
(96 bytes)
Special purpose
Register
(32 bytes)
27-Dec-16 Nirbhay Kr Singh, Roll No. 151607, ME-MOD-ECE-2015 4
Extra 64
bytes of RAM
in
PIC 16 C63
16 C65A
16 C73A
16 C74A
RAM
(32 bytes)
Special purpose
Register
(32 bytes)
Bank 0
128 bytes
Bank 1
128 bytes
7F
20
1F
00
FF
C0
BF
A0
9F
80
27-Dec-16 5
Register File Structure in PIC 16F8xx
Registers in PIC
16F8XX
W or working
register (8 bit)
Status Register
(8 bits)
SFR (Special
Function
Registers)
GPR (General
Purpose
Registers)
27-Dec-16 6
Register File Structure in PIC 16F8xx
• 8 bits wide
• Contains one of the source
operands during the execution of
instructions.
• Serve as the destination for the
result of the operation.
• Only used for ALU operations..
W or
Working
Register
27-Dec-16 7
Register File Structure in PIC 16F8xx
Status Register (8 bits)
• 1 - Banks 0 and 1 are active (memory location 00h-FFh)
• 0 - Banks 2 and 3 are active (memory location 100h-1FFh)
IRP - Bit selects register bank. It is
used for indirect addressing.
• Bits select register bank. They are used for direct addressing.RP1,RP0
• 1 - After power-on or after executing CLRWDT instruction which resets watch-dog timer or SLEEP
instruction which sets the microcontroller into low-consumption mode.
• 0 - After watch-dog timer time-out has occurred.
TO - Time-out bit.
• 1 - After power-on or after executing CLRWDT instruction which resets watch-dog timer.
• 0 - After executing SLEEP instruction which sets the microcontroller into low-consumption
mode.
PD - Power-down bit.
• 1 - The result of an arithmetic or logic operation is zero.
• 0 - The result of an arithmetic or logic operation is different from zero.Z - Zero bit
• 1 - A carry-out from the 4th low-order bit of the result has occurred.
• 0 - No carry-out from the 4th low-order bit of the result has occurred.
DC - Digit carry/borrow bit is changed during addition
and subtraction if an “overflow” or a “borrow” of the
result occurs.
• 1 - A carry-out from the most significant bit of the result has occurred.
• 0 - No carry-out from the most significant bit of the result has occurred.
C - Carry/Borrow bit is changed during addition and
subtraction if an “overflow” or a “borrow” of the result
occurs, i.e. if the result is greater than 255 or less than 0.
27-Dec-16 8
Register File Structure in PIC 16F8xx
 Microchip has provided only direct addressing mode
for the register file with 7-bits address plus
remaining 8th and 9th bits frozen in the STATUS
REGISTER bits RP1:RP0.
11 = Bank 3 (180h-1FFh)
10 = Bank 2 (100h-17Fh)
01 = Bank 1 (80h-FFh)
00 = Bank 0 (00h-7Fh)
As shown in figure
27-Dec-16 9
Register File Structure in PIC 16F8xx
Use of IPR bit in indirect addressing mode
27-Dec-16 10
Register File Structure in PIC 16F8xx
Indirect addressing mode
 IRP bit is used for indirect addressing.
 The IRP bit allows selecting either
1= Bank 2 & bank 3
0= Bank 0 & bank 1
 The IPR bit and FSR decide the effective 9 bit address.
As shown in figure
27-Dec-16 11
Register File Structure in PIC 16F8xx
Use of IPR bit in indirect addressing mode
27-Dec-16 12
Register File Structure in PIC 16F8xx
Special Function Register
 PCL and PCLATH Registers: The size of the program memory of the
PIC16F887 is 8K. Therefore, it has 8192 locations for program
storing. For this reason the program counter must be 13-bits wide
(2^13 = 8192). In order that the contents of some location may be
changed in software during operation, its address must be
accessible through some SFR. Since all SFRs are 8-bits wide, this
register is “artificially” created by dividing its 13 bits into two
independent registers: PCLATH and PCL.
27-Dec-16 13
Register File Structure in PIC 16F8xx
 Eight lower bits (the low byte) come from the PCL register which is
readable and writable, whereas five upper bits coming from the
PCLATH register are writable only.
 The PCLATH register is cleared on any reset.
27-Dec-16 14
Register File Structure in PIC 16F8xx
PCL
 Program Counter byte.
 PCL is the lower byte of the PC.
 Cause PCLATH contents to be transferred to the PC higher bit
locations.
 PC of PIC is associated with an 8-level stack.
 PC always points to the next instruction to be executed.
 In case of call to subroutines, the returned address is pushed onto
the stack.
 After the return from called subroutine, this return address is
retrieved.
 Stack width and PC width should be same.
27-Dec-16 15
Register File Structure in PIC 16F8xx
Power control register
 Contains the flags which can differentiate between the type of reset
occurred namely
o Power on reset
o Brown out reset
27-Dec-16 16
Register File Structure in PIC 16F8xx
Stack
 The entire PIC chip has an area for storing the return addresses.
 This area or unit called Stack is used in some Peripheral interface
controllers.
27-Dec-16 17
Register File Structure in PIC 16F8xx
PIC16F87XA Data Memory Organization
 Data memory is divided in two four banks, Each bank holds 128
bytes of addressable memory.
 Contain GPR and SPR.
 The banked arrangement is necessary because there are only 7 bits
are available in the instruction word for the addressing of a register,
which gives only 128 addresses.
 The selection of the banks are determined by control bits RP1, RP0
in the STATUS registers
 Together the RP1, RP0 and the specified 7 bits effectively form a 9
bit address.
27-Dec-16 18
Register File Structure in PIC 16F8xx
27-Dec-16 19
Register File Structure in PIC 16F8xx
Thanks

More Related Content

What's hot

8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architectureprasadpawaskar
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESDr.YNM
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingAnkur Mahajan
 
SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERSkumari36
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architectureDominicHendry
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Ganesh Ram
 
Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...NimeshSingh27
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051Muthu Manickam
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 IntroductionDr. Pankaj Zope
 
Introduction to ARM LPC2148
Introduction to ARM LPC2148Introduction to ARM LPC2148
Introduction to ARM LPC2148Veera Kumar
 
Introduction to arm processor
Introduction to arm processorIntroduction to arm processor
Introduction to arm processorRAMPRAKASHT1
 

What's hot (20)

8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTES
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
 
SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERS
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
 
MICROCONTROLLER - INTEL 8051
MICROCONTROLLER - INTEL 8051MICROCONTROLLER - INTEL 8051
MICROCONTROLLER - INTEL 8051
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
 
Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
 
ARM Architecture
ARM ArchitectureARM Architecture
ARM Architecture
 
Introduction to ARM LPC2148
Introduction to ARM LPC2148Introduction to ARM LPC2148
Introduction to ARM LPC2148
 
Introduction to arm processor
Introduction to arm processorIntroduction to arm processor
Introduction to arm processor
 
program status word
program status wordprogram status word
program status word
 
Interrupts in pic
Interrupts in picInterrupts in pic
Interrupts in pic
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
 

Viewers also liked

Smart lamp with gsm modul sim800 l
Smart lamp with gsm modul sim800 lSmart lamp with gsm modul sim800 l
Smart lamp with gsm modul sim800 lrikkjo29
 
Analog I/O in PIC16F877A
Analog I/O in PIC16F877AAnalog I/O in PIC16F877A
Analog I/O in PIC16F877AMohamed Bedair
 
Introduction to 80386 microprocessor
Introduction to 80386 microprocessorIntroduction to 80386 microprocessor
Introduction to 80386 microprocessorShehrevar Davierwala
 
Ie Storage, Multimedia And File Organization
Ie   Storage, Multimedia And File OrganizationIe   Storage, Multimedia And File Organization
Ie Storage, Multimedia And File OrganizationMISY
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecturesatish1jisatishji
 
Disk structure & File Handling
Disk structure & File HandlingDisk structure & File Handling
Disk structure & File HandlingMomina Idrees
 
Gps file structure explained
Gps file structure explainedGps file structure explained
Gps file structure explainedJaap Oosterhoff
 
DC VOLTAGE MEASUREMENT USİNG THE WITH PIC MICROCONTROLLER
DC VOLTAGE MEASUREMENT USİNG THE WITH PIC MICROCONTROLLERDC VOLTAGE MEASUREMENT USİNG THE WITH PIC MICROCONTROLLER
DC VOLTAGE MEASUREMENT USİNG THE WITH PIC MICROCONTROLLERDursun Kalpak
 
File Structure Concepts
File Structure ConceptsFile Structure Concepts
File Structure ConceptsDileep Kodira
 
Discussion : File structure of Meteor Apps
Discussion : File structure of Meteor AppsDiscussion : File structure of Meteor Apps
Discussion : File structure of Meteor AppsSangwon Lee
 
04.01 file organization
04.01 file organization04.01 file organization
04.01 file organizationBishal Ghimire
 
Embedded systems notes
Embedded systems notesEmbedded systems notes
Embedded systems notesSARITHA REDDY
 
Intel® 80386 microprocessor registers
Intel® 80386 microprocessor registersIntel® 80386 microprocessor registers
Intel® 80386 microprocessor registersNeel Shah
 
File organization and processing
File organization and processingFile organization and processing
File organization and processingburhan123456
 
Ch 1-final-file organization from korth
Ch 1-final-file organization from korthCh 1-final-file organization from korth
Ch 1-final-file organization from korthRupali Rana
 
Concept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learnersConcept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learnerswellingtonoboh
 
File organization techniques
File organization techniquesFile organization techniques
File organization techniquesMeghlal Khan
 

Viewers also liked (20)

Smart lamp with gsm modul sim800 l
Smart lamp with gsm modul sim800 lSmart lamp with gsm modul sim800 l
Smart lamp with gsm modul sim800 l
 
Pic16F87XA
Pic16F87XAPic16F87XA
Pic16F87XA
 
Analog I/O in PIC16F877A
Analog I/O in PIC16F877AAnalog I/O in PIC16F877A
Analog I/O in PIC16F877A
 
Introduction to 80386 microprocessor
Introduction to 80386 microprocessorIntroduction to 80386 microprocessor
Introduction to 80386 microprocessor
 
CS215 - Lec 2 file organization
CS215 - Lec 2   file organizationCS215 - Lec 2   file organization
CS215 - Lec 2 file organization
 
Ie Storage, Multimedia And File Organization
Ie   Storage, Multimedia And File OrganizationIe   Storage, Multimedia And File Organization
Ie Storage, Multimedia And File Organization
 
2 introduction to arm architecture
2 introduction to arm architecture2 introduction to arm architecture
2 introduction to arm architecture
 
Disk structure & File Handling
Disk structure & File HandlingDisk structure & File Handling
Disk structure & File Handling
 
Gps file structure explained
Gps file structure explainedGps file structure explained
Gps file structure explained
 
CS215 - Lec 9 indexing and reclaiming space in files
CS215 - Lec 9  indexing and reclaiming space in filesCS215 - Lec 9  indexing and reclaiming space in files
CS215 - Lec 9 indexing and reclaiming space in files
 
DC VOLTAGE MEASUREMENT USİNG THE WITH PIC MICROCONTROLLER
DC VOLTAGE MEASUREMENT USİNG THE WITH PIC MICROCONTROLLERDC VOLTAGE MEASUREMENT USİNG THE WITH PIC MICROCONTROLLER
DC VOLTAGE MEASUREMENT USİNG THE WITH PIC MICROCONTROLLER
 
File Structure Concepts
File Structure ConceptsFile Structure Concepts
File Structure Concepts
 
Discussion : File structure of Meteor Apps
Discussion : File structure of Meteor AppsDiscussion : File structure of Meteor Apps
Discussion : File structure of Meteor Apps
 
04.01 file organization
04.01 file organization04.01 file organization
04.01 file organization
 
Embedded systems notes
Embedded systems notesEmbedded systems notes
Embedded systems notes
 
Intel® 80386 microprocessor registers
Intel® 80386 microprocessor registersIntel® 80386 microprocessor registers
Intel® 80386 microprocessor registers
 
File organization and processing
File organization and processingFile organization and processing
File organization and processing
 
Ch 1-final-file organization from korth
Ch 1-final-file organization from korthCh 1-final-file organization from korth
Ch 1-final-file organization from korth
 
Concept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learnersConcept of computer files for Grade 12 learners
Concept of computer files for Grade 12 learners
 
File organization techniques
File organization techniquesFile organization techniques
File organization techniques
 

Similar to register file structure of PIC controller

Microcontroller pic 16 f877 registers memory ports
Microcontroller pic 16 f877 registers memory portsMicrocontroller pic 16 f877 registers memory ports
Microcontroller pic 16 f877 registers memory portsNilesh Bhaskarrao Bahadure
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copymkazree
 
Embedded system (Chapter 2) part A
Embedded system (Chapter 2) part AEmbedded system (Chapter 2) part A
Embedded system (Chapter 2) part AIkhwan_Fakrudin
 
B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051MahiboobAliMulla
 
My seminar new 28
My seminar new 28My seminar new 28
My seminar new 28rajeshkvdn
 
PIC 16F877 micro controller by Gaurav raikar
PIC 16F877 micro controller by Gaurav raikarPIC 16F877 micro controller by Gaurav raikar
PIC 16F877 micro controller by Gaurav raikarGauravRaikar3
 
PIC1jjkkkkkkkjhgfvjitr c its GJ tagging hugg
PIC1jjkkkkkkkjhgfvjitr c its GJ tagging huggPIC1jjkkkkkkkjhgfvjitr c its GJ tagging hugg
PIC1jjkkkkkkkjhgfvjitr c its GJ tagging huggHebaEng
 
PIC Introduction and explained in detailed
PIC Introduction and explained in detailedPIC Introduction and explained in detailed
PIC Introduction and explained in detailedAnkita Tiwari
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentseceprinter6
 
chapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptxchapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptxSangeetaTripathi8
 
15CS44 MP & MC Module 1
15CS44 MP & MC Module 115CS44 MP & MC Module 1
15CS44 MP & MC Module 1RLJIT
 
PIC introduction + mapping
PIC introduction + mappingPIC introduction + mapping
PIC introduction + mappingOsaMa Hasan
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontrollerAshish Ranjan
 
Computer architecture 3
Computer architecture 3Computer architecture 3
Computer architecture 3Dr.Umadevi V
 
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080Vivek Venugopal
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller nitugatkal
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdfSrikrishna Thota
 

Similar to register file structure of PIC controller (20)

PIC
PICPIC
PIC
 
Microcontroller pic 16 f877 registers memory ports
Microcontroller pic 16 f877 registers memory portsMicrocontroller pic 16 f877 registers memory ports
Microcontroller pic 16 f877 registers memory ports
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copy
 
Embedded system (Chapter 2) part A
Embedded system (Chapter 2) part AEmbedded system (Chapter 2) part A
Embedded system (Chapter 2) part A
 
B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051B sc e5.2 mp unit 4 mc-8051
B sc e5.2 mp unit 4 mc-8051
 
My seminar new 28
My seminar new 28My seminar new 28
My seminar new 28
 
PIC 16F877 micro controller by Gaurav raikar
PIC 16F877 micro controller by Gaurav raikarPIC 16F877 micro controller by Gaurav raikar
PIC 16F877 micro controller by Gaurav raikar
 
PIC1jjkkkkkkkjhgfvjitr c its GJ tagging hugg
PIC1jjkkkkkkkjhgfvjitr c its GJ tagging huggPIC1jjkkkkkkkjhgfvjitr c its GJ tagging hugg
PIC1jjkkkkkkkjhgfvjitr c its GJ tagging hugg
 
PIC Introduction and explained in detailed
PIC Introduction and explained in detailedPIC Introduction and explained in detailed
PIC Introduction and explained in detailed
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
 
chapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptxchapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptx
 
15CS44 MP & MC Module 1
15CS44 MP & MC Module 115CS44 MP & MC Module 1
15CS44 MP & MC Module 1
 
PIC introduction + mapping
PIC introduction + mappingPIC introduction + mapping
PIC introduction + mapping
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontroller
 
Computer architecture 3
Computer architecture 3Computer architecture 3
Computer architecture 3
 
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
Pic full note
Pic full notePic full note
Pic full note
 
Unit 4.pptx
Unit 4.pptxUnit 4.pptx
Unit 4.pptx
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf
 

Recently uploaded

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 

Recently uploaded (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 

register file structure of PIC controller

  • 1. Register File Structure in PIC 16F877a or16F8XX Presented By Nirbhay Kumar Singh nirbhaykumar2008@gmail.com Roll No. 151607 ME – ECE – 2015 Batch NITTTR Chandigarh 27-Dec-16 1
  • 2. 27-Dec-16 2 Register File Structure in PIC 16F8xx The Registers A register is a place inside the PIC that can be written to, read from or both. Think of a register as a piece of paper where you can look at and write information on.
  • 3. Register File Structure • Register file → locations that an instruction can access via an address. • Register file consists of two component:- 1. General purpose register file (same as RAM) 2. Special purpose register file 27-Dec-16 Nirbhay Kr Singh, Roll No. 151607, ME-MOD-ECE-2015 3
  • 4. RAM (96 bytes) Special purpose Register (32 bytes) 27-Dec-16 Nirbhay Kr Singh, Roll No. 151607, ME-MOD-ECE-2015 4 Extra 64 bytes of RAM in PIC 16 C63 16 C65A 16 C73A 16 C74A RAM (32 bytes) Special purpose Register (32 bytes) Bank 0 128 bytes Bank 1 128 bytes 7F 20 1F 00 FF C0 BF A0 9F 80
  • 5. 27-Dec-16 5 Register File Structure in PIC 16F8xx Registers in PIC 16F8XX W or working register (8 bit) Status Register (8 bits) SFR (Special Function Registers) GPR (General Purpose Registers)
  • 6. 27-Dec-16 6 Register File Structure in PIC 16F8xx • 8 bits wide • Contains one of the source operands during the execution of instructions. • Serve as the destination for the result of the operation. • Only used for ALU operations.. W or Working Register
  • 7. 27-Dec-16 7 Register File Structure in PIC 16F8xx Status Register (8 bits) • 1 - Banks 0 and 1 are active (memory location 00h-FFh) • 0 - Banks 2 and 3 are active (memory location 100h-1FFh) IRP - Bit selects register bank. It is used for indirect addressing. • Bits select register bank. They are used for direct addressing.RP1,RP0 • 1 - After power-on or after executing CLRWDT instruction which resets watch-dog timer or SLEEP instruction which sets the microcontroller into low-consumption mode. • 0 - After watch-dog timer time-out has occurred. TO - Time-out bit. • 1 - After power-on or after executing CLRWDT instruction which resets watch-dog timer. • 0 - After executing SLEEP instruction which sets the microcontroller into low-consumption mode. PD - Power-down bit. • 1 - The result of an arithmetic or logic operation is zero. • 0 - The result of an arithmetic or logic operation is different from zero.Z - Zero bit • 1 - A carry-out from the 4th low-order bit of the result has occurred. • 0 - No carry-out from the 4th low-order bit of the result has occurred. DC - Digit carry/borrow bit is changed during addition and subtraction if an “overflow” or a “borrow” of the result occurs. • 1 - A carry-out from the most significant bit of the result has occurred. • 0 - No carry-out from the most significant bit of the result has occurred. C - Carry/Borrow bit is changed during addition and subtraction if an “overflow” or a “borrow” of the result occurs, i.e. if the result is greater than 255 or less than 0.
  • 8. 27-Dec-16 8 Register File Structure in PIC 16F8xx  Microchip has provided only direct addressing mode for the register file with 7-bits address plus remaining 8th and 9th bits frozen in the STATUS REGISTER bits RP1:RP0. 11 = Bank 3 (180h-1FFh) 10 = Bank 2 (100h-17Fh) 01 = Bank 1 (80h-FFh) 00 = Bank 0 (00h-7Fh) As shown in figure
  • 9. 27-Dec-16 9 Register File Structure in PIC 16F8xx Use of IPR bit in indirect addressing mode
  • 10. 27-Dec-16 10 Register File Structure in PIC 16F8xx Indirect addressing mode  IRP bit is used for indirect addressing.  The IRP bit allows selecting either 1= Bank 2 & bank 3 0= Bank 0 & bank 1  The IPR bit and FSR decide the effective 9 bit address. As shown in figure
  • 11. 27-Dec-16 11 Register File Structure in PIC 16F8xx Use of IPR bit in indirect addressing mode
  • 12. 27-Dec-16 12 Register File Structure in PIC 16F8xx Special Function Register  PCL and PCLATH Registers: The size of the program memory of the PIC16F887 is 8K. Therefore, it has 8192 locations for program storing. For this reason the program counter must be 13-bits wide (2^13 = 8192). In order that the contents of some location may be changed in software during operation, its address must be accessible through some SFR. Since all SFRs are 8-bits wide, this register is “artificially” created by dividing its 13 bits into two independent registers: PCLATH and PCL.
  • 13. 27-Dec-16 13 Register File Structure in PIC 16F8xx  Eight lower bits (the low byte) come from the PCL register which is readable and writable, whereas five upper bits coming from the PCLATH register are writable only.  The PCLATH register is cleared on any reset.
  • 14. 27-Dec-16 14 Register File Structure in PIC 16F8xx PCL  Program Counter byte.  PCL is the lower byte of the PC.  Cause PCLATH contents to be transferred to the PC higher bit locations.  PC of PIC is associated with an 8-level stack.  PC always points to the next instruction to be executed.  In case of call to subroutines, the returned address is pushed onto the stack.  After the return from called subroutine, this return address is retrieved.  Stack width and PC width should be same.
  • 15. 27-Dec-16 15 Register File Structure in PIC 16F8xx Power control register  Contains the flags which can differentiate between the type of reset occurred namely o Power on reset o Brown out reset
  • 16. 27-Dec-16 16 Register File Structure in PIC 16F8xx Stack  The entire PIC chip has an area for storing the return addresses.  This area or unit called Stack is used in some Peripheral interface controllers.
  • 17. 27-Dec-16 17 Register File Structure in PIC 16F8xx PIC16F87XA Data Memory Organization  Data memory is divided in two four banks, Each bank holds 128 bytes of addressable memory.  Contain GPR and SPR.  The banked arrangement is necessary because there are only 7 bits are available in the instruction word for the addressing of a register, which gives only 128 addresses.  The selection of the banks are determined by control bits RP1, RP0 in the STATUS registers  Together the RP1, RP0 and the specified 7 bits effectively form a 9 bit address.
  • 18. 27-Dec-16 18 Register File Structure in PIC 16F8xx
  • 19. 27-Dec-16 19 Register File Structure in PIC 16F8xx Thanks