SlideShare a Scribd company logo
MICROPROCESSORS
&
MICROCONTROLLERS
Khalil Zeineddine
2021
KAFAZ
Microprocessors & Microcontrollers KAFAZ- 1
Version 2021 Khalil Zeineddine
P
I
C
1
6
F
8
7
7
A
Chapter _1:
To know:
1. Introduction to PIC16F877a
2. Pin out of PIC
3. Internal architecture of PIC
4. Basic elements of PIC
Contents_1:
PIC Introduction
Peripheral Interface Controllers (PIC) is one of the advanced
microcontrollers developed by microchip technologies. These microcontrollers
are widely used in modern electronics applications. A PIC controller
integrates all type of advanced interfacing ports and memory modules.
These controllers are more advanced than normal microcontroller like
8051. The first PIC chip was announced in 1975 (PIC1650). As like normal
microcontroller, the PIC chip also combines a microprocessor unit called
CPU and is integrated with various types of memory modules (RAM, ROM,
EEPROM ,etc), I/O ports, timers/counters, communication ports, etc.
All PIC microcontroller family uses Harvard architecture. This architecture
has the program and data accessed from separate memories so the device has
a program memory bus and a data memory bus (more than 8 lines in a normal
bus).
This improves the bandwidth (data throughput) over traditional von
Neumann architecture where program and data are fetched from the same
memory (accesses over the same bus). Separating program and data memory
Microprocessors & Microcontrollers KAFAZ- 2
Version 2021 Khalil Zeineddine
P
I
C
1
6
F
8
7
7
A
further allows instructions to be sized differently than the 8-bit wide data
word. Now we will move to PIC16F877A.
Introduction au PIC16F877a
The essential elements of the PIC 16F877 are:
• A flash EEPROM type program memory of 8K 14-bit words,
• A data RAM of 368 bytes,
• A 256-byte EEPROM memory,
• 05 input output ports, A (6 bits), B (8 bits), C (8 bits), D (8 bits) and E (3
bits)
• 10-bit Analog to Digital converter with 8 selectable inputs,
• USART, Universal serial port, asynchronous mode and synchronous
mode
• SSP, Synchronous serial port
• Three TIMERS with their Prescaler, TMR0, TMR1, TMR2
• Two comparison modules and Capture CCP1 and CCP2
• 15 interrupt sources,
• Clock generator, quartz (up to 20 MHz)
• Code protection,
• Operating voltage from 2 to 5V,
• Sets of 35 instructions.
Microprocessors & Microcontrollers KAFAZ- 3
Version 2021 Khalil Zeineddine
P
I
C
1
6
F
8
7
7
A
Pin out :
The PIC 16F877A box described in the figure below includes 40 pins:
1. 33 input / output pins (5 following ports):
• Port A: 6 I / O pins numbered from RA0 to RA5
• Port B: 8 I / O pins numbered from RB0 to RB7
• Port C: 8 I / O pins numbered from RC0 to RC7
• Port D: 8 I / O pins numbered from RD0 to RD7
• Port E: 3 I / O pins numbered from RE0 to RE2
Max output current: 20mA / pin; 200mA / port
Microprocessors & Microcontrollers KAFAZ- 4
Version 2021 Khalil Zeineddine
P
I
C
1
6
F
8
7
7
A
2. The VDD and VSS pins are used to power the PIC. Note that we have 2
"VDD" connections and 2 "VSS" connections.
3. The pins OSC1 and OSC2 or CLKIN and CLOUT are used to operate the
internal oscillator of the PIC.
4. The MCLR pin is used to initialize the MC in the event of power-up,
external reset, watchdog and in the event of supply voltage drop.
Internal Architecture
1. The CPU executes the program instructions (encoded in 14 bits),
processes and generates operations on digital information.
2. The 368 byte Random Access Memory (RAM) is used for temporary
storage of data and results.
3. The 256-byte read-only memory (EEPROM) keeps valuable data
semi-permanently.
4. The 8k x 14bits FLASH memory is used to store the program
(instructions).
5. The clock generates the signal that rates the execution of instructions.
6. Bidirectional ports (A - E) allow communication with the outside; the
lines of each port can be programmed as input or output.
7. The timers (3), programmable modules whose functions are:
• Astable (periodic signals)
• Monostable (impulse)
• Counter
• PWM signals (direct current motor control).
8. The 10-bit analog / digital converter ADC - 8 inputs available from 0
to 5V; the results of the conversions are stored in internal registers.
Microprocessors & Microcontrollers KAFAZ- 5
Version 2021 Khalil Zeineddine
P
I
C
1
6
F
8
7
7
A
The basic elements of the PIC 16F877A
1. The clock
The clock can be either internal or external. The internal clock consists of a
crystal oscillator or an RC oscillator. With the Quartz oscillator, we can
have frequencies up to 20 MHz depending on the type of μC.
2. The ALU and the W accumulator
The ALU is an 8-Bit Arithmetic and Logic Unit which performs basic
arithmetic and logic operations.
Accumulator W is an 8-bit working register, all two-operand operations go
through it.
Can we have :
 An instruction on a single operand which is usually a register
located in RAM.
 An instruction on 2 operands. In this case, one of the two
operands is always the accumulator W, the other can be either a
register or a constant.
3. RAM memory
The addressable RAM memory space is 512 positions of 1 byte each:
Microprocessors & Microcontrollers KAFAZ- 6
Version 2021 Khalil Zeineddine
P
I
C
1
6
F
8
7
7
A
 96 positions are reserved for the SFR (Special Function Registers)
which are the PIC configuration registers.
 The remaining 416 positions constitute the GPR registers (General
Propose Registers) or user RAM. On the 16F877, 3 blocks of 16
bytes each are not physically implanted resulting in a user RAM
capacity of 368 GPR.
4. Permanent memories
The PIC 16F877 has 2 permanent memories.
 PROGRAM EEPROM memory with a capacity of 8k 14-bit words.
 The DATA EEPROM memory with a capacity of 256 bytes.

More Related Content

What's hot (20)

PDF
174085193 pic-prgm-manual
Arun Shan
 
PPTX
Architecture of 16C6X
v Kalairajan
 
PPTX
PIC16F877A interfacing with LCD
sunil polo
 
PPTX
PIC introduction + mapping
OsaMa Hasan
 
PDF
Pic microcontroller architecture
Jamia Hamdard
 
PDF
Programming pic microcontrollers
MAIYO JOSPHAT
 
PPTX
Pic16cxx instruction set
v Kalairajan
 
PPT
Pic16f84
Homoud Alsohaibi
 
PPTX
PIC Microcontrollers
Abdullah Saghir Ahmad
 
PPTX
Atmel and pic microcontroller
Tearsome Llantada
 
PPTX
Pic 18 microcontroller
Ashish Ranjan
 
PPT
PIC Microcontroller
Divya Bansal
 
PDF
PIC CONTROLLERS
Tanmay Bakshi
 
PPTX
Pic microcontroller [autosaved] [autosaved]
gauravholani
 
PDF
Test
guest1e2941
 
PPT
PIC Introduction and explained in detailed
Ankita Tiwari
 
PDF
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
Vivek Venugopal
 
PPTX
register file structure of PIC controller
Nirbhay Singh
 
174085193 pic-prgm-manual
Arun Shan
 
Architecture of 16C6X
v Kalairajan
 
PIC16F877A interfacing with LCD
sunil polo
 
PIC introduction + mapping
OsaMa Hasan
 
Pic microcontroller architecture
Jamia Hamdard
 
Programming pic microcontrollers
MAIYO JOSPHAT
 
Pic16cxx instruction set
v Kalairajan
 
PIC Microcontrollers
Abdullah Saghir Ahmad
 
Atmel and pic microcontroller
Tearsome Llantada
 
Pic 18 microcontroller
Ashish Ranjan
 
PIC Microcontroller
Divya Bansal
 
PIC CONTROLLERS
Tanmay Bakshi
 
Pic microcontroller [autosaved] [autosaved]
gauravholani
 
PIC Introduction and explained in detailed
Ankita Tiwari
 
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
Vivek Venugopal
 
register file structure of PIC controller
Nirbhay Singh
 

Similar to MICROPROCESSORS & MICROCONTROLLERS (20)

PPTX
Overview of Microcontroller and ATMega32 microcontroller
Rup Chowdhury
 
DOC
89s52 2
Sagari Bhaviri
 
DOC
Pic microcontrollers
G.Ramachandran M.Tech
 
PPTX
CHAPTER1.pptx ON 8051 MICROCONTROLLER INTRODUCTION CHAPTER
NagarathnaRajur2
 
DOC
Pc based wire less data aquisition system using rf(1)
Vishalya Dulam
 
PDF
Atmega8u2 mur
Nickyhoney
 
PPT
Chp4 introduction to the pic microcontroller copy
mkazree
 
PDF
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
eceprinter6
 
PPT
Introduction2_PIC.ppt
AakashRawat35
 
PDF
Ee6008 mcbsd notes
vlkumashankardeekshi th
 
DOC
PIC MICROCONTROLLERS -CLASS NOTES
Dr.YNM
 
PPTX
Introduction to PIC.pptx
Anbuselvi Mathivanan
 
PDF
2 unit-es-printed
twinkleratna
 
PDF
EE6008 MBSD
rmkceteee
 
PPTX
8051 architecture and pin configuration
NITHIN KALLE PALLY
 
PPT
PICPICPICPICPICPICPICPICPICPICPICPIC .ppt
DrHamdyMMousa
 
PPTX
LPC 2148 ARM MICROCONTROLLER
sravannunna24
 
PPTX
3.TechieNest microcontrollers
TechieNest Pvt. Ltd .
 
PPT
Ii avr-basics(1)
Thakur Satyajeetsinh Dodiya
 
PDF
A tmega16A Microcontroller Data Sheet
Microtech Solutions
 
Overview of Microcontroller and ATMega32 microcontroller
Rup Chowdhury
 
Pic microcontrollers
G.Ramachandran M.Tech
 
CHAPTER1.pptx ON 8051 MICROCONTROLLER INTRODUCTION CHAPTER
NagarathnaRajur2
 
Pc based wire less data aquisition system using rf(1)
Vishalya Dulam
 
Atmega8u2 mur
Nickyhoney
 
Chp4 introduction to the pic microcontroller copy
mkazree
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
eceprinter6
 
Introduction2_PIC.ppt
AakashRawat35
 
Ee6008 mcbsd notes
vlkumashankardeekshi th
 
PIC MICROCONTROLLERS -CLASS NOTES
Dr.YNM
 
Introduction to PIC.pptx
Anbuselvi Mathivanan
 
2 unit-es-printed
twinkleratna
 
EE6008 MBSD
rmkceteee
 
8051 architecture and pin configuration
NITHIN KALLE PALLY
 
PICPICPICPICPICPICPICPICPICPICPICPIC .ppt
DrHamdyMMousa
 
LPC 2148 ARM MICROCONTROLLER
sravannunna24
 
3.TechieNest microcontrollers
TechieNest Pvt. Ltd .
 
Ii avr-basics(1)
Thakur Satyajeetsinh Dodiya
 
A tmega16A Microcontroller Data Sheet
Microtech Solutions
 
Ad

Recently uploaded (20)

PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
PPTX
REINFORCEMENT AS CONSTRUCTION MATERIALS.pptx
mohaiminulhaquesami
 
PDF
monopile foundation seminar topic for civil engineering students
Ahina5
 
PPTX
EC3551-Transmission lines Demo class .pptx
Mahalakshmiprasannag
 
PPTX
ISO/IEC JTC 1/WG 9 (MAR) Convenor Report
Kurata Takeshi
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PDF
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
PPTX
Destructive Tests corrosion engineer (1).pptx
zeidali3
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PDF
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
PPTX
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PDF
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PPTX
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
REINFORCEMENT AS CONSTRUCTION MATERIALS.pptx
mohaiminulhaquesami
 
monopile foundation seminar topic for civil engineering students
Ahina5
 
EC3551-Transmission lines Demo class .pptx
Mahalakshmiprasannag
 
ISO/IEC JTC 1/WG 9 (MAR) Convenor Report
Kurata Takeshi
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
Destructive Tests corrosion engineer (1).pptx
zeidali3
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
Day2 B2 Best.pptx
helenjenefa1
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
Ad

MICROPROCESSORS & MICROCONTROLLERS

  • 2. Microprocessors & Microcontrollers KAFAZ- 1 Version 2021 Khalil Zeineddine P I C 1 6 F 8 7 7 A Chapter _1: To know: 1. Introduction to PIC16F877a 2. Pin out of PIC 3. Internal architecture of PIC 4. Basic elements of PIC Contents_1: PIC Introduction Peripheral Interface Controllers (PIC) is one of the advanced microcontrollers developed by microchip technologies. These microcontrollers are widely used in modern electronics applications. A PIC controller integrates all type of advanced interfacing ports and memory modules. These controllers are more advanced than normal microcontroller like 8051. The first PIC chip was announced in 1975 (PIC1650). As like normal microcontroller, the PIC chip also combines a microprocessor unit called CPU and is integrated with various types of memory modules (RAM, ROM, EEPROM ,etc), I/O ports, timers/counters, communication ports, etc. All PIC microcontroller family uses Harvard architecture. This architecture has the program and data accessed from separate memories so the device has a program memory bus and a data memory bus (more than 8 lines in a normal bus). This improves the bandwidth (data throughput) over traditional von Neumann architecture where program and data are fetched from the same memory (accesses over the same bus). Separating program and data memory
  • 3. Microprocessors & Microcontrollers KAFAZ- 2 Version 2021 Khalil Zeineddine P I C 1 6 F 8 7 7 A further allows instructions to be sized differently than the 8-bit wide data word. Now we will move to PIC16F877A. Introduction au PIC16F877a The essential elements of the PIC 16F877 are: • A flash EEPROM type program memory of 8K 14-bit words, • A data RAM of 368 bytes, • A 256-byte EEPROM memory, • 05 input output ports, A (6 bits), B (8 bits), C (8 bits), D (8 bits) and E (3 bits) • 10-bit Analog to Digital converter with 8 selectable inputs, • USART, Universal serial port, asynchronous mode and synchronous mode • SSP, Synchronous serial port • Three TIMERS with their Prescaler, TMR0, TMR1, TMR2 • Two comparison modules and Capture CCP1 and CCP2 • 15 interrupt sources, • Clock generator, quartz (up to 20 MHz) • Code protection, • Operating voltage from 2 to 5V, • Sets of 35 instructions.
  • 4. Microprocessors & Microcontrollers KAFAZ- 3 Version 2021 Khalil Zeineddine P I C 1 6 F 8 7 7 A Pin out : The PIC 16F877A box described in the figure below includes 40 pins: 1. 33 input / output pins (5 following ports): • Port A: 6 I / O pins numbered from RA0 to RA5 • Port B: 8 I / O pins numbered from RB0 to RB7 • Port C: 8 I / O pins numbered from RC0 to RC7 • Port D: 8 I / O pins numbered from RD0 to RD7 • Port E: 3 I / O pins numbered from RE0 to RE2 Max output current: 20mA / pin; 200mA / port
  • 5. Microprocessors & Microcontrollers KAFAZ- 4 Version 2021 Khalil Zeineddine P I C 1 6 F 8 7 7 A 2. The VDD and VSS pins are used to power the PIC. Note that we have 2 "VDD" connections and 2 "VSS" connections. 3. The pins OSC1 and OSC2 or CLKIN and CLOUT are used to operate the internal oscillator of the PIC. 4. The MCLR pin is used to initialize the MC in the event of power-up, external reset, watchdog and in the event of supply voltage drop. Internal Architecture 1. The CPU executes the program instructions (encoded in 14 bits), processes and generates operations on digital information. 2. The 368 byte Random Access Memory (RAM) is used for temporary storage of data and results. 3. The 256-byte read-only memory (EEPROM) keeps valuable data semi-permanently. 4. The 8k x 14bits FLASH memory is used to store the program (instructions). 5. The clock generates the signal that rates the execution of instructions. 6. Bidirectional ports (A - E) allow communication with the outside; the lines of each port can be programmed as input or output. 7. The timers (3), programmable modules whose functions are: • Astable (periodic signals) • Monostable (impulse) • Counter • PWM signals (direct current motor control). 8. The 10-bit analog / digital converter ADC - 8 inputs available from 0 to 5V; the results of the conversions are stored in internal registers.
  • 6. Microprocessors & Microcontrollers KAFAZ- 5 Version 2021 Khalil Zeineddine P I C 1 6 F 8 7 7 A The basic elements of the PIC 16F877A 1. The clock The clock can be either internal or external. The internal clock consists of a crystal oscillator or an RC oscillator. With the Quartz oscillator, we can have frequencies up to 20 MHz depending on the type of μC. 2. The ALU and the W accumulator The ALU is an 8-Bit Arithmetic and Logic Unit which performs basic arithmetic and logic operations. Accumulator W is an 8-bit working register, all two-operand operations go through it. Can we have :  An instruction on a single operand which is usually a register located in RAM.  An instruction on 2 operands. In this case, one of the two operands is always the accumulator W, the other can be either a register or a constant. 3. RAM memory The addressable RAM memory space is 512 positions of 1 byte each:
  • 7. Microprocessors & Microcontrollers KAFAZ- 6 Version 2021 Khalil Zeineddine P I C 1 6 F 8 7 7 A  96 positions are reserved for the SFR (Special Function Registers) which are the PIC configuration registers.  The remaining 416 positions constitute the GPR registers (General Propose Registers) or user RAM. On the 16F877, 3 blocks of 16 bytes each are not physically implanted resulting in a user RAM capacity of 368 GPR. 4. Permanent memories The PIC 16F877 has 2 permanent memories.  PROGRAM EEPROM memory with a capacity of 8k 14-bit words.  The DATA EEPROM memory with a capacity of 256 bytes.