SlideShare a Scribd company logo
PIC Microcontroller
• PIC microcontroller was developed in the year
1993 by microchip technology.
• The term PIC stands for Peripheral Interface
Controller. Initially this was developed for
supporting PDP(programmed data processor)
computers to control its peripheral devices,
and therefore, named as a peripheral interface
device.
Features of the PIC18 microcontroller
• - 8-bit CPU
• - 2 MB program memory space
• - 256 bytes to 1KB of data EEPROM
• - Up to 3968 bytes of on-chip SRAM
• - 4 KB to 128KB flash program memory
• - Sophisticated timer functions that include: input capture, output compare,
• PWM, real-time interrupt, and watchdog timer
• - Serial communication interfaces: SCI, SPI, I2C, and CAN
• - Background debug mode (BDM)
• - 10-bit A/D converter
• - Memory protection capability
• - Instruction pipelining
• - Operates at up to 40 MHz crystal oscillator
Architecture of PIC Microcontroller
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
• WREG – working register
– 8-bit accumulator
Microprocessor Unit
– Registers
• Program Counter (PC)
– 21-bit register that holds the Program Memory address
• Bank Select Register (BSR)
– 4-bit register used in direct addressing the Data Memory
• File Select Registers (FSRs)
– 12-bit registers used as memory pointers in indirect
addressing Data Memory
– Control unit
• Provides timing and control signals
– Read and Write operations
PIC18F - Address Buses
• Address bus
– 21-bit address bus for Program Memory
• Addressing capacity: 2 MB
– 12-bit address bus for Data Memory
• Addressing capacity: 4 KB
Data Bus and Control Signals
• Data bus
– 16-bit instruction/data bus for Program Memory
– 8-bit data bus for Data Memory
• Control signals
– Read and Write
PIC18F – MPU and Memory
435303149-PIC-ppt microcontroller introduct
PROGRAM COUNTER AND ROM MEMORY
SPACE
STATUS REGISTER FLAG
The PIC18 Memory Organization
• Data Memory and Program Memory are
separated
• - Separation of data memory and program
memory makes possible the simultaneous access
of data and instruction.
• - Data memory are used as general-purpose
registers or special function registers
• - On-chip Data EEPROM are provided in some
PIC18 MCUs
1. PIC18F452/4520 Memory
• Program Memory: 32 K
– Address range: 000000 to 007FFFH
• Data Memory: 4 K
– Address range: 000 to FFFH
• Data EEPROM
– Not part of the data memory space
– Addressed through special function registers
2. Data Memory Banks/BSR SELECTION
PIC18 I/O Ports
• Five I/O ports
– PORT A through PORT E
– Most I/O pins are multiplexed
– Generally have eight I/O pins
– Addresses already assigned to these ports
– Each port is identified by its assigned SFR
PIC18 I/O Ports
• The series of PIC16 consists of five ports such as Port A, Port B, Port
C, Port D & Port E.
• Port A is an 16-bit port that can be used as input or output port based
on the status of the TRISA (Tradoc Intelligence Support Activity)
register.
• Port B is an 8- bit port that can be used as both input and output port.
• Port C is an 8-bit and the input of output operation is decided by the
status of the TRISC register.
• Port D is an 8-bit port acts as a slave port for connection to the
microprocessor BUS.
• Port E is a 3-bit port which serves the additional function of the
control signals to the analog to digital converter
Diagram of I/O Ports
435303149-PIC-ppt microcontroller introduct
435303149-PIC-ppt microcontroller introduct
Feature of Timer 0
• 8-bit timer/counter
• Readable and writable
• 8-bit software programmable prescaler
• Internal (4 Mhz) or external clock select
• Interrupt on overflow from FFh to 00h
• Edge select (rising or falling) for external clock
TimerO Control Register
Timer 1 Timer 1 (TMR1)
16-bit timer/counter
overflow occurs, an interrupt is generated
TMR1 module can operate in 2 basic modes-
(i). a timer (ii).a counter
TMR1 increments from 0000h to FFFFh and rolls over to
000h
TMR1 operating mode is determined by the clock select
bit, TMR1CS
R.Hariharan AP / EEE - SECE
R.Hariharan AP / EEE - SECE
Example
Timer 2 Timer 2 (TMR2)
8-bit timer with Prescaler and Postscaler
TMR2 can be used as – PWM
TMR2 register is R/W – cleared on any device reset.
Timer2 module has an 8-bit period register PR2
Timer2 increments from 00h till reaches PR2
PR2 is initialized to FFh upon reset.
R.Hariharan AP / EEE - SECE
R.Hariharan AP / EEE - SECE
Interrupts
Polling
Interrupts
External
System
Software
Interrupt
Hardware
Interrupt
Request from software Request from external
Hardware device
R.Hariharan AP / EEE - SECE
PIC16C7X family has up to 12 sources of interrupt External
• Timer 0
• Timer 1
• RB Port Change
• Parallel Slave Port Read/Write
• A/D Converter
• USART Receive
• USART Transmit
• Synchronous Serial Port
• CCP1 (Capture, Compare, PWM)
• CCP2 (Capture, Compare, PWM)
• TMR2 to PR2 Match
R.Hariharan AP / EEE - SECE

More Related Content

PDF
Pic microcontroller architecture
PDF
UNIT-V (PIC16F877-Microcontrollers).pdf
PPTX
Class 5 an 8 bit embedded platform
PPT
PIC Introduction and explained in detailed
PDF
Microcontroller pic 16 f877 registers memory ports
DOC
PIC MICROCONTROLLERS -CLASS NOTES
PPT
Chp4 introduction to the pic microcontroller copy
PPTX
MICROCONTROLLER.pptx
Pic microcontroller architecture
UNIT-V (PIC16F877-Microcontrollers).pdf
Class 5 an 8 bit embedded platform
PIC Introduction and explained in detailed
Microcontroller pic 16 f877 registers memory ports
PIC MICROCONTROLLERS -CLASS NOTES
Chp4 introduction to the pic microcontroller copy
MICROCONTROLLER.pptx

Similar to 435303149-PIC-ppt microcontroller introduct (20)

PPT
Introduction2_PIC.ppt
PDF
PIC Microcontrollers: Powering Versatile Embedded Solutions"
PPTX
PIC Presentation_final updated.pptx
PDF
Ee6008 mcbsd notes
PPTX
Pic microcontroller [autosaved] [autosaved]
PDF
EE6008 MCBSD - Introduction to PIC Micro controller
PDF
EE6008 MBSD
PDF
Introduction to pic microcontroller
PPT
PICPICPICPICPICPICPICPICPICPICPICPIC .ppt
PPTX
PIC 16F877 micro controller by Gaurav raikar
PPTX
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PPTX
Pic architecture done by Priyanga KR
PPTX
PIC introduction + mapping
PDF
8051,chapter1,architecture and peripherals
PPT
Microcontroller 8051
PDF
PIC18F458_Ritula Thakur.pptx.pdf
PPTX
Introduction to PIC.pptx
Introduction2_PIC.ppt
PIC Microcontrollers: Powering Versatile Embedded Solutions"
PIC Presentation_final updated.pptx
Ee6008 mcbsd notes
Pic microcontroller [autosaved] [autosaved]
EE6008 MCBSD - Introduction to PIC Micro controller
EE6008 MBSD
Introduction to pic microcontroller
PICPICPICPICPICPICPICPICPICPICPICPIC .ppt
PIC 16F877 micro controller by Gaurav raikar
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
Pic architecture done by Priyanga KR
PIC introduction + mapping
8051,chapter1,architecture and peripherals
Microcontroller 8051
PIC18F458_Ritula Thakur.pptx.pdf
Introduction to PIC.pptx
Ad

Recently uploaded (20)

PPTX
Geodesy 1.pptx...............................................
PPTX
Sustainable Sites - Green Building Construction
PPTX
Current and future trends in Computer Vision.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
PPT on Performance Review to get promotions
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPT
Project quality management in manufacturing
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Geodesy 1.pptx...............................................
Sustainable Sites - Green Building Construction
Current and future trends in Computer Vision.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Internet of Things (IOT) - A guide to understanding
UNIT 4 Total Quality Management .pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
CYBER-CRIMES AND SECURITY A guide to understanding
Safety Seminar civil to be ensured for safe working.
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPT on Performance Review to get promotions
III.4.1.2_The_Space_Environment.p pdffdf
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Fundamentals of safety and accident prevention -final (1).pptx
Project quality management in manufacturing
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Ad

435303149-PIC-ppt microcontroller introduct

  • 1. PIC Microcontroller • PIC microcontroller was developed in the year 1993 by microchip technology. • The term PIC stands for Peripheral Interface Controller. Initially this was developed for supporting PDP(programmed data processor) computers to control its peripheral devices, and therefore, named as a peripheral interface device.
  • 2. Features of the PIC18 microcontroller • - 8-bit CPU • - 2 MB program memory space • - 256 bytes to 1KB of data EEPROM • - Up to 3968 bytes of on-chip SRAM • - 4 KB to 128KB flash program memory • - Sophisticated timer functions that include: input capture, output compare, • PWM, real-time interrupt, and watchdog timer • - Serial communication interfaces: SCI, SPI, I2C, and CAN • - Background debug mode (BDM) • - 10-bit A/D converter • - Memory protection capability • - Instruction pipelining • - Operates at up to 40 MHz crystal oscillator
  • 3. Architecture of PIC Microcontroller
  • 4. 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 • WREG – working register – 8-bit accumulator
  • 5. Microprocessor Unit – Registers • Program Counter (PC) – 21-bit register that holds the Program Memory address • Bank Select Register (BSR) – 4-bit register used in direct addressing the Data Memory • File Select Registers (FSRs) – 12-bit registers used as memory pointers in indirect addressing Data Memory – Control unit • Provides timing and control signals – Read and Write operations
  • 6. PIC18F - Address Buses • Address bus – 21-bit address bus for Program Memory • Addressing capacity: 2 MB – 12-bit address bus for Data Memory • Addressing capacity: 4 KB
  • 7. Data Bus and Control Signals • Data bus – 16-bit instruction/data bus for Program Memory – 8-bit data bus for Data Memory • Control signals – Read and Write
  • 8. PIC18F – MPU and Memory
  • 10. PROGRAM COUNTER AND ROM MEMORY SPACE
  • 12. The PIC18 Memory Organization • Data Memory and Program Memory are separated • - Separation of data memory and program memory makes possible the simultaneous access of data and instruction. • - Data memory are used as general-purpose registers or special function registers • - On-chip Data EEPROM are provided in some PIC18 MCUs
  • 13. 1. PIC18F452/4520 Memory • Program Memory: 32 K – Address range: 000000 to 007FFFH • Data Memory: 4 K – Address range: 000 to FFFH • Data EEPROM – Not part of the data memory space – Addressed through special function registers
  • 14. 2. Data Memory Banks/BSR SELECTION
  • 15. PIC18 I/O Ports • Five I/O ports – PORT A through PORT E – Most I/O pins are multiplexed – Generally have eight I/O pins – Addresses already assigned to these ports – Each port is identified by its assigned SFR
  • 16. PIC18 I/O Ports • The series of PIC16 consists of five ports such as Port A, Port B, Port C, Port D & Port E. • Port A is an 16-bit port that can be used as input or output port based on the status of the TRISA (Tradoc Intelligence Support Activity) register. • Port B is an 8- bit port that can be used as both input and output port. • Port C is an 8-bit and the input of output operation is decided by the status of the TRISC register. • Port D is an 8-bit port acts as a slave port for connection to the microprocessor BUS. • Port E is a 3-bit port which serves the additional function of the control signals to the analog to digital converter
  • 17. Diagram of I/O Ports
  • 20. Feature of Timer 0 • 8-bit timer/counter • Readable and writable • 8-bit software programmable prescaler • Internal (4 Mhz) or external clock select • Interrupt on overflow from FFh to 00h • Edge select (rising or falling) for external clock
  • 22. Timer 1 Timer 1 (TMR1) 16-bit timer/counter overflow occurs, an interrupt is generated TMR1 module can operate in 2 basic modes- (i). a timer (ii).a counter TMR1 increments from 0000h to FFFFh and rolls over to 000h TMR1 operating mode is determined by the clock select bit, TMR1CS R.Hariharan AP / EEE - SECE
  • 23. R.Hariharan AP / EEE - SECE
  • 25. Timer 2 Timer 2 (TMR2) 8-bit timer with Prescaler and Postscaler TMR2 can be used as – PWM TMR2 register is R/W – cleared on any device reset. Timer2 module has an 8-bit period register PR2 Timer2 increments from 00h till reaches PR2 PR2 is initialized to FFh upon reset. R.Hariharan AP / EEE - SECE
  • 26. R.Hariharan AP / EEE - SECE
  • 28. PIC16C7X family has up to 12 sources of interrupt External • Timer 0 • Timer 1 • RB Port Change • Parallel Slave Port Read/Write • A/D Converter • USART Receive • USART Transmit • Synchronous Serial Port • CCP1 (Capture, Compare, PWM) • CCP2 (Capture, Compare, PWM) • TMR2 to PR2 Match R.Hariharan AP / EEE - SECE

Editor's Notes

  • #2: I2c – inter integrated circuit
  • #3: CCP – CAPTURE, COMPARE AND PWM
  • #8: Wreg-working register