SlideShare a Scribd company logo
PIC-18 MICROCONTROLLER
PRESENTED BY:-
ASHISHRANJAN
What is Microcontroller ?
Microcontroller
8051 PIC ARM
TYPES OF MICROCONTROLLER
Features of PIC-18 Microcontroller
 It is 8-bit Microcontroller.
 It has 16-bit Instruction sets.
 256 byte of EPROM.
 2 KB SRAM.
 32 KB Flash Memory.
 It Operates at 40 MHz Crystal Oscillator.
 It has 10-bit A/D Converter.
 It supports Instruction Pipelining.
 It is implemented with nano watt Technology
(low power consumption ).
PIN DIAGRAM OF PIC-18 MICROCONTROLLER
ARCHITECTURE OF PIC-18 MICROCONTROLLER
PIC-18 ADDRESSING MODES
 Register Direct : Use an 8-bit value to specify a data register.
Ex:- movwf 0x20,A ; the value 0x20 is register direct mode
 Immediate Mode : A value in the instruction to be used as an operand.
Ex:- addlw 0x10 ; add hex value 0x10 to WREG
movlw 0x30 ; load 0x30 into WREG
 Inherent Mode : an implied operand.
Ex:- andlw 0x3C ; the operand WREG is implied
daw ; the operand WREG is implied
 Indirect Mode : A special function register (FSRx) is used as a pointer to
the actual data register.
Ex:- movwf INDFx (where x = 0,1,2,3)
PIC-18 MEMORY ORGANIZATION
Data Memory and Program Memory are separated.
Separation of Data memory and Program memory makes possible the
the simultaneous access of data and instruction.
Data memory are used as general purpose registers or special function
registers.
On-chip Data EPROM are provided in some PIC-18 MCUs
Separation of Data Memory and Program Memory
Program
Memory
Space
PIC-18
CPU
21-bit program
address
16-bit
instruction bus
Data
Memory
Space
12-bit Register
address
8-bit Data Bus
Fig:- The PIC-18 Memory Spaces
PIC-18 DATA MEMORY
 It consist of General purpose register and Special function registers.
Both are referred to as Data Registers.
 PIC-18 has 4KB Data Memory.
 Data Memory is Divided into Banks and each Bank has 256 bytes.
 General purpose registers are used to hold dynamic data.
 Special function register are used to control the Operation of Peripheral functions.
Only on bank is active at any time.
 It implement access bank to reduce problem caused by bank switching.
 Access bank Consists of the lowest 96 bytes and the highest 160 bytes of the data
memory space.
Fig : Data Memory map for PIC-18 Device
PROGRAM MEMORY ORGANIZATION
 The program counter (PC) is 21-bit long, which enables the user program to
access up to 2MB program memory.
 After Power On it starts to execute the instruction from address 0.
 The Location 0x08 is reserved for high-priority interrupt service routine.
 The Location 0x18 is reserved for low-priority interrupt service routine.
 Up to 128 KB of Program Memory is inside the MCU chip.
 Rest Part of the program memory is located outside of the MCU chip.
Fig: Program Memory Organization for PIC-18 Device
PIC-18 PIPELINING
 The PIC18 Divide most of the instruction execution into two
stages: instruction fetch and instruction execution.
 Up to two instructions are overlapped in their execution. One instruction
is inexecution fetch stage while the second instruction is in execution stage.
 Because of pipelining, each instruction appears to take one instruction
cycle to complete.
Fetch 2
Execute 1
Fetch 4
Fetch 3
Fetch 1
Execute 2
Execute 3
Execute sub_1Fetch sub_1
Flush
TCY0 TCY1 TCY2 TCY3 TCY4 TCY5
Fig : An Example of Instruction Pipeline flow
THANK YOU…..
Ad

More Related Content

What's hot (20)

Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontroller
Ashish Ranjan
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
Sudhanshu Janwadkar
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
Dr. Pankaj Zope
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 complete
Shubham Singh
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
Andri Prastiyo
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentation
mahalakshmimalini
 
Interrupts in pic
Interrupts in picInterrupts in pic
Interrupts in pic
v Kalairajan
 
8251 USART
8251 USART8251 USART
8251 USART
coolsdhanesh
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
Rahul Kumar
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
Monica Gunjal
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
kamlesh deshmukh
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
Aarav Soni
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
Mathivanan Natarajan
 
8086
80868086
8086
Ravi Anand
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
Dr. Pankaj Zope
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
yash sawarkar
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
sobhadevi
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
abhikalmegh
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
Srikrishna Thota
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
Mustapha Fatty
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontroller
Ashish Ranjan
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
Dr. Pankaj Zope
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 complete
Shubham Singh
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
Rahul Kumar
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
Aarav Soni
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
Dr. Pankaj Zope
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
yash sawarkar
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
sobhadevi
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
abhikalmegh
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
Srikrishna Thota
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
Mustapha Fatty
 

Viewers also liked (15)

CARWEB2 BRUKERMANUAL, V-3, april 2015 pdf
CARWEB2 BRUKERMANUAL, V-3, april 2015 pdfCARWEB2 BRUKERMANUAL, V-3, april 2015 pdf
CARWEB2 BRUKERMANUAL, V-3, april 2015 pdf
Wiggo E. Ryhjell
 
Sept 11 grade level meetings
Sept 11 grade level meetingsSept 11 grade level meetings
Sept 11 grade level meetings
St. James-Assiniboia School Division
 
Fys research paper
Fys research paperFys research paper
Fys research paper
dandelet1
 
Progetto quadricottero 1
Progetto quadricottero 1Progetto quadricottero 1
Progetto quadricottero 1
Vincenzo Virgilio
 
Video analysis fys
Video analysis fysVideo analysis fys
Video analysis fys
dandelet1
 
14-09-09-NR Advisory Note 1
14-09-09-NR Advisory Note 114-09-09-NR Advisory Note 1
14-09-09-NR Advisory Note 1
Scott Carlson
 
BasicsofClimateChangeGlobal Warming
BasicsofClimateChangeGlobal WarmingBasicsofClimateChangeGlobal Warming
BasicsofClimateChangeGlobal Warming
Diana Langie
 
Tips dietku(1)
Tips dietku(1)Tips dietku(1)
Tips dietku(1)
cintaitucantiq
 
Arduino day2015 Libertà a scuola
Arduino day2015 Libertà a scuolaArduino day2015 Libertà a scuola
Arduino day2015 Libertà a scuola
Vincenzo Virgilio
 
Android insecurity
Android insecurityAndroid insecurity
Android insecurity
Vincenzo Virgilio
 
GWMS 2015 open house
GWMS 2015 open houseGWMS 2015 open house
GWMS 2015 open house
St. James-Assiniboia School Division
 
Android e sensori
Android e sensoriAndroid e sensori
Android e sensori
Vincenzo Virgilio
 
ICSC Panel Members - Financing in Today’s Market Current Underwriting and the...
ICSC Panel Members - Financing in Today’s Market Current Underwriting and the...ICSC Panel Members - Financing in Today’s Market Current Underwriting and the...
ICSC Panel Members - Financing in Today’s Market Current Underwriting and the...
Nicholas Maloof
 
Identitas nasional
Identitas nasionalIdentitas nasional
Identitas nasional
MAHASISWI
 
Ariyaratne Introduction
Ariyaratne IntroductionAriyaratne Introduction
Ariyaratne Introduction
Rudi Maier
 
CARWEB2 BRUKERMANUAL, V-3, april 2015 pdf
CARWEB2 BRUKERMANUAL, V-3, april 2015 pdfCARWEB2 BRUKERMANUAL, V-3, april 2015 pdf
CARWEB2 BRUKERMANUAL, V-3, april 2015 pdf
Wiggo E. Ryhjell
 
Fys research paper
Fys research paperFys research paper
Fys research paper
dandelet1
 
Video analysis fys
Video analysis fysVideo analysis fys
Video analysis fys
dandelet1
 
14-09-09-NR Advisory Note 1
14-09-09-NR Advisory Note 114-09-09-NR Advisory Note 1
14-09-09-NR Advisory Note 1
Scott Carlson
 
BasicsofClimateChangeGlobal Warming
BasicsofClimateChangeGlobal WarmingBasicsofClimateChangeGlobal Warming
BasicsofClimateChangeGlobal Warming
Diana Langie
 
Arduino day2015 Libertà a scuola
Arduino day2015 Libertà a scuolaArduino day2015 Libertà a scuola
Arduino day2015 Libertà a scuola
Vincenzo Virgilio
 
ICSC Panel Members - Financing in Today’s Market Current Underwriting and the...
ICSC Panel Members - Financing in Today’s Market Current Underwriting and the...ICSC Panel Members - Financing in Today’s Market Current Underwriting and the...
ICSC Panel Members - Financing in Today’s Market Current Underwriting and the...
Nicholas Maloof
 
Identitas nasional
Identitas nasionalIdentitas nasional
Identitas nasional
MAHASISWI
 
Ariyaratne Introduction
Ariyaratne IntroductionAriyaratne Introduction
Ariyaratne Introduction
Rudi Maier
 
Ad

Similar to PIC-18 Microcontroller (20)

Chapter 1 Introductuon to Microcontrollers_2023.pptx
Chapter 1 Introductuon to Microcontrollers_2023.pptxChapter 1 Introductuon to Microcontrollers_2023.pptx
Chapter 1 Introductuon to Microcontrollers_2023.pptx
huypmg22git
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTES
Dr.YNM
 
Pic microcontrollers
Pic microcontrollersPic microcontrollers
Pic microcontrollers
G.Ramachandran M.Tech
 
Introduction_PIC18F458_Ritula Thakur.pptx
Introduction_PIC18F458_Ritula Thakur.pptxIntroduction_PIC18F458_Ritula Thakur.pptx
Introduction_PIC18F458_Ritula Thakur.pptx
AvinashJain66
 
Overview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerOverview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontroller
Rup Chowdhury
 
MICROPROCESSORS & MICROCONTROLLERS
MICROPROCESSORS & MICROCONTROLLERSMICROPROCESSORS & MICROCONTROLLERS
MICROPROCESSORS & MICROCONTROLLERS
khalil zeineddine
 
Introduction to pic microcontroller
Introduction to pic microcontrollerIntroduction to pic microcontroller
Introduction to pic microcontroller
Siva Kumar
 
435303149-PIC-ppt microcontroller introduct
435303149-PIC-ppt microcontroller introduct435303149-PIC-ppt microcontroller introduct
435303149-PIC-ppt microcontroller introduct
sindhujam30
 
Microchip's 16-bit and 32-bit PIC MCUs
Microchip's 16-bit and 32-bit PIC MCUsMicrochip's 16-bit and 32-bit PIC MCUs
Microchip's 16-bit and 32-bit PIC MCUs
Premier Farnell
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
Jamia Hamdard
 
Embedded system (Chapter 2) part A
Embedded system (Chapter 2) part AEmbedded system (Chapter 2) part A
Embedded system (Chapter 2) part A
Ikhwan_Fakrudin
 
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
Vivek Venugopal
 
8 bit microcontroller
8 bit microcontroller8 bit microcontroller
8 bit microcontroller
محمدعبد الحى
 
Unit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notesUnit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notes
Prabhu Mali
 
Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50 Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50
Premier Farnell
 
8-bit PIC Microcontrollers
8-bit PIC Microcontrollers8-bit PIC Microcontrollers
8-bit PIC Microcontrollers
Premier Farnell
 
Architecture of 16C6X
Architecture of 16C6XArchitecture of 16C6X
Architecture of 16C6X
v Kalairajan
 
3.TechieNest microcontrollers
3.TechieNest  microcontrollers3.TechieNest  microcontrollers
3.TechieNest microcontrollers
TechieNest Pvt. Ltd .
 
Introduction to PIC.pptx
Introduction to PIC.pptxIntroduction to PIC.pptx
Introduction to PIC.pptx
Anbuselvi Mathivanan
 
Arm7 document
Arm7  documentArm7  document
Arm7 document
N Harisha
 
Chapter 1 Introductuon to Microcontrollers_2023.pptx
Chapter 1 Introductuon to Microcontrollers_2023.pptxChapter 1 Introductuon to Microcontrollers_2023.pptx
Chapter 1 Introductuon to Microcontrollers_2023.pptx
huypmg22git
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTES
Dr.YNM
 
Introduction_PIC18F458_Ritula Thakur.pptx
Introduction_PIC18F458_Ritula Thakur.pptxIntroduction_PIC18F458_Ritula Thakur.pptx
Introduction_PIC18F458_Ritula Thakur.pptx
AvinashJain66
 
Overview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerOverview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontroller
Rup Chowdhury
 
MICROPROCESSORS & MICROCONTROLLERS
MICROPROCESSORS & MICROCONTROLLERSMICROPROCESSORS & MICROCONTROLLERS
MICROPROCESSORS & MICROCONTROLLERS
khalil zeineddine
 
Introduction to pic microcontroller
Introduction to pic microcontrollerIntroduction to pic microcontroller
Introduction to pic microcontroller
Siva Kumar
 
435303149-PIC-ppt microcontroller introduct
435303149-PIC-ppt microcontroller introduct435303149-PIC-ppt microcontroller introduct
435303149-PIC-ppt microcontroller introduct
sindhujam30
 
Microchip's 16-bit and 32-bit PIC MCUs
Microchip's 16-bit and 32-bit PIC MCUsMicrochip's 16-bit and 32-bit PIC MCUs
Microchip's 16-bit and 32-bit PIC MCUs
Premier Farnell
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
Jamia Hamdard
 
Embedded system (Chapter 2) part A
Embedded system (Chapter 2) part AEmbedded system (Chapter 2) part A
Embedded system (Chapter 2) part A
Ikhwan_Fakrudin
 
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
Vivek Venugopal
 
Unit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notesUnit1 5-mpi-lecture-notes
Unit1 5-mpi-lecture-notes
Prabhu Mali
 
Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50 Introduction to nanoWatt XLP: PIC18F46J50
Introduction to nanoWatt XLP: PIC18F46J50
Premier Farnell
 
8-bit PIC Microcontrollers
8-bit PIC Microcontrollers8-bit PIC Microcontrollers
8-bit PIC Microcontrollers
Premier Farnell
 
Architecture of 16C6X
Architecture of 16C6XArchitecture of 16C6X
Architecture of 16C6X
v Kalairajan
 
Arm7 document
Arm7  documentArm7  document
Arm7 document
N Harisha
 
Ad

PIC-18 Microcontroller

  • 4. Features of PIC-18 Microcontroller  It is 8-bit Microcontroller.  It has 16-bit Instruction sets.  256 byte of EPROM.  2 KB SRAM.  32 KB Flash Memory.  It Operates at 40 MHz Crystal Oscillator.  It has 10-bit A/D Converter.  It supports Instruction Pipelining.  It is implemented with nano watt Technology (low power consumption ).
  • 5. PIN DIAGRAM OF PIC-18 MICROCONTROLLER
  • 6. ARCHITECTURE OF PIC-18 MICROCONTROLLER
  • 7. PIC-18 ADDRESSING MODES  Register Direct : Use an 8-bit value to specify a data register. Ex:- movwf 0x20,A ; the value 0x20 is register direct mode  Immediate Mode : A value in the instruction to be used as an operand. Ex:- addlw 0x10 ; add hex value 0x10 to WREG movlw 0x30 ; load 0x30 into WREG  Inherent Mode : an implied operand. Ex:- andlw 0x3C ; the operand WREG is implied daw ; the operand WREG is implied  Indirect Mode : A special function register (FSRx) is used as a pointer to the actual data register. Ex:- movwf INDFx (where x = 0,1,2,3)
  • 8. PIC-18 MEMORY ORGANIZATION Data Memory and Program Memory are separated. Separation of Data memory and Program memory makes possible the the simultaneous access of data and instruction. Data memory are used as general purpose registers or special function registers. On-chip Data EPROM are provided in some PIC-18 MCUs
  • 9. Separation of Data Memory and Program Memory Program Memory Space PIC-18 CPU 21-bit program address 16-bit instruction bus Data Memory Space 12-bit Register address 8-bit Data Bus Fig:- The PIC-18 Memory Spaces
  • 10. PIC-18 DATA MEMORY  It consist of General purpose register and Special function registers. Both are referred to as Data Registers.  PIC-18 has 4KB Data Memory.  Data Memory is Divided into Banks and each Bank has 256 bytes.  General purpose registers are used to hold dynamic data.  Special function register are used to control the Operation of Peripheral functions. Only on bank is active at any time.  It implement access bank to reduce problem caused by bank switching.  Access bank Consists of the lowest 96 bytes and the highest 160 bytes of the data memory space.
  • 11. Fig : Data Memory map for PIC-18 Device
  • 12. PROGRAM MEMORY ORGANIZATION  The program counter (PC) is 21-bit long, which enables the user program to access up to 2MB program memory.  After Power On it starts to execute the instruction from address 0.  The Location 0x08 is reserved for high-priority interrupt service routine.  The Location 0x18 is reserved for low-priority interrupt service routine.  Up to 128 KB of Program Memory is inside the MCU chip.  Rest Part of the program memory is located outside of the MCU chip.
  • 13. Fig: Program Memory Organization for PIC-18 Device
  • 14. PIC-18 PIPELINING  The PIC18 Divide most of the instruction execution into two stages: instruction fetch and instruction execution.  Up to two instructions are overlapped in their execution. One instruction is inexecution fetch stage while the second instruction is in execution stage.  Because of pipelining, each instruction appears to take one instruction cycle to complete. Fetch 2 Execute 1 Fetch 4 Fetch 3 Fetch 1 Execute 2 Execute 3 Execute sub_1Fetch sub_1 Flush TCY0 TCY1 TCY2 TCY3 TCY4 TCY5 Fig : An Example of Instruction Pipeline flow
  翻译: