SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Introduction to theIntroduction to the
PIC MicrocontrollerPIC Microcontroller
OutlineOutline
 What is Microcontroller?
 ”C vs General-Purpose ”P
 A Brief History of PIC ”C
 PIC16F84 Features
 PIC Clock Generator
 Reset
 PORTS
 Center Processing Unit (CPU)
 MEMORY ORGANIZATION
 Timer & Prescalar
 Flash Memory
 RAM
 ROM
 EEPROM
What is Microcontroller?What is Microcontroller?
 Integrated chip that
contains CPU, RAM,
some form of ROM, I/O
ports, and timers
 Designed for a very
specific task to control
a particular system
 reduce production cost
”C”C vs General-Purposevs General-Purpose ””PP
Microcontroller Microprocessor
Devices Microchip’s PIC’s
series, Atmel’s AVR
series
Intel’s x86 family (8086,
80286, 80386, 80486 &
the Pentium) or
(Motorola’s PowerPC
family)
Components Internal CPU, RAM,
ROM, I/O ports and
timers
External RAM, ROM, and
I/O ports
Application Perform specific
function: A small set of
signal processing
functions for digital
signal processor
Perform more tasks that
related to general
requirements: calculations
of software, personal
computer
”C”C vs General-Purposevs General-Purpose ””PP Cont

CPU / ÎŒP
RegisterRegister
Control UnitControl Unit
ALUALU
DATA BUSCPU / ÎŒP
Register
Register
Control Unit
Control Unit
ALU
ALU
ADDRESS BUS
CONTROL BUS
ÎŒC
RAM ROM I/O Timer
Serial
COM
”C”C vs General-Purposevs General-Purpose ””PP Cont

Microprocessor
EEPROM
RAM
Input
and
output
ports
Serial I/O
Parallel I/O
Timer
PWM
Input
and
output
ports
A/D
D/A
Analog
I/O
ROM
Microprocessor
EEPROM
RAM
Input
and
output
ports
Serial I/O
Parallel I/O
Timer
PWM
Input
and
output
ports
A/DA/D
D/AD/A
Analog
I/O
ROM
Microprocessor-based System Microcontroller-based System
A Brief History of PIC ”CA Brief History of PIC ”C
 In 1989, Microchip Technology Corporation introduced
an 8-bit ”C called PIC (Peripheral Interface Controller).
 This 8 pins chip contains a small amounts of data RAM, a
few hundred bytes of on-chip ROM for program, one
timer, and a few pins for I/O ports.
 The family of 8-bit ”C: 10xxx, 12xxx, 14xxx, 16xxx,
17xxx, and 18xxx
A Brief History of PIC ”CA Brief History of PIC ”C Cont

http://www.microchip.com
A Brief History of PIC ”CA Brief History of PIC ”C
 They are all 8-bit processors that the CPU can work on
only 8 bits of data a time.
 Problem: not all 100% upwardly compatible in terms of
software when going from one family to another family.
 Ex.: 12xxx - 12-bit wide instructions
16xxx- 14-bit wide instructions
PIC18xxx - 16-bit wide with many
new instructions
Cont

A Brief History of PIC ”CA Brief History of PIC ”C
Advantages of PIC:
 30 to 100 times faster than other ”Cs (program memory is
integrated to the chip)
 Smaller size (on-board memory)
 Easy to program, reusable and inexpensive
Cont

A Brief History of PIC ”CA Brief History of PIC ”C
Architecture:
Cont

CPU
Program &
Data Memory
Von Neumann architecture
CPU
Program
Memory
Data
Memory
Harvard architecture
PIC16F84 FeaturesPIC16F84 Features
ï€Č 18 pins, DIP18 type (Dual in Package) or SMD type
Remarks:
RA0 - RA3 : Pins on port A. No additional function
RA4 : TOCK1 which functions as a timer
RB0 : Interrupt input is an additional function.
RB1 - RB5: Pins on port B. No additional function.
RB6 : 'Clock' line in program mode.
RB7 : 'Data' line in program mode
MCLR : Reset input and Vpp programming voltage
Vss : Ground of power supply.
Vdd : Positive power supply pole.
OSC1 - OSC2 : Pins for connecting with oscillator.
PIC16F84 FeaturesPIC16F84 Features Cont

BlockBlock
diagram ofdiagram of
PIC16F84PIC16F84
PIC Clock GeneratorPIC Clock Generator
 To provide a clock for executing a program or program
instructions of ”C.
 Types of PIC clock generator:
 A crystal & two capacitors
 Resonators or external resistor-capacitor pair
 Built-in resistor-capacitor
PIC Clock GeneratorPIC Clock Generator
 PIC16F84 can operate in four different oscillation
modes:
- LP low power crystal
- XT crystal/resonator
- HS high speed crystal/resonator
- RC resistor/capacitor
 Two configuration bits, FOSC1 & FOSC0 are used to
select one of these four modes
Cont

PIC Clock GeneratorPIC Clock Generator
Crystal Oscillator/Ceramic Resonators
 For XT, LP or HS OSC configurations
 Crystal or ceramic resonator is connected to
the OSC1/CLKIN & OSC2/CLKOUT pins
Cont

PIC Clock GeneratorPIC Clock Generator
ï‚Č A parallel cut crystal is used to design PIC16F84A
ï‚Č The use of a series cut crystal may give a freq. out of the crystal
manufacturer’s specifications
Cont

External clock input operations
PIC Clock GeneratorPIC Clock Generator Cont

Capacitor selection for ceramic resonators
Capacitor selection for crystal resonators
PIC Clock GeneratorPIC Clock Generator
RC Oscillator
 Reduce cost for timing insensitive applications
 Variation of the oscillator frequency:
- operating temperature
- process parameter variation
- difference in lead frame capacitance between package types (low
CEXT values)
- tolerance of the external R & C components
Cont

ResetReset
ï€Č Power-on Reset (POR)
ï€Č MCLR during normal operation
ï€Č MCLR during SLEEP
ï€Č WDT Reset (during normal
operation)
ï€Č WDT Wake-up (during SLEEP)
Register Reset value (hex)
PC 000000
WREG 00
SP 00
TRISA-TRISB FF
Value registers upon reset
PORTSPORTS
ï€Č Physical connection of CPU and outside world – monitor
@ control other components @ devices
ï€Č A group of pins which can be accessed simultaneously @
set the desired combination of zeros and ones
ï€Č All port pins can be designated as input @ output
PORTS:PORTS: PORTA & TRISAPORTA & TRISA
 PORTA is a 5-bit wide, bi-directional port
 TRISA: data direction register of PORTA
 TRISA = 1, PORTA is
an input (output
driver in HI-
impedance mode)
 TRISA = 0, PORTA is
an output (contents
of the output latch
on the selected pin)
PORTS:PORTS: PORTB & TRISBPORTB & TRISB
 PORTB is a 8-bit wide, bi-directional port
 TRISB: data direction register of PORTB
 TRISB = 1, PORTB
is an input (output
driver in HI-
impedance mode)
 TRISB = 0, PORTB
is an output
(contents of the
output latch on the
selected pin)
Center Processing UnitCenter Processing Unit
(CPU)(CPU) The brain of the ”C
 Connect all parts of the ”C through a data bus
& and an address bus
 Find, fetch, decode & execute the right
instruction
 CPU resources:
 Registers: store temporary information
 ALU: performing arithmetic functions
 Program counter: point to the address of the next
instruction to be executed
 Instruction decoder: interpret the instruction
fetched into the CPU
Center Processing UnitCenter Processing Unit
(CPU)(CPU)
MOVLW 0x20
Program
Memory
Temporary
storage
executeexecute
Memory
11 00xx 0010 0000
opcode
Assembler (translator)
Decoder
Fetch
instruction
Fetch
instruction
Center Processing UnitCenter Processing Unit
(CPU)(CPU)
Arithmetic Logic Unit (ALU)
 Add, subtract, move (left @ right within a register)
and logic operations
 PIC16F84 contains an 8-bit ALU & 8-bit working
registers (WREG)
 ALU instructions: two operands @ one operand
 Two operands: WREG + file register @ immediate
constant
 Registers: GPR (General Purposes Registers) & SFP
(Special Function Registers)
 One operand: WREG @ a file register
 Execution of ALU instructions can affect STATUS bits
which are carry (C), digit carry (DC), and zero (Z).
Cont

Center Processing UnitCenter Processing Unit
(CPU)(CPU)
Cont

ALU
STATUS
register
8-bit literal (from
instruction word)
WREG
register
8-
bit
8-
bit
8-bit
Z, DC, C flags
Carry bit
MEMORY ORGANIZATIONMEMORY ORGANIZATION
 PIC16F84 has two separate memory blocks: data &
program
 Data block: GPR and SFP registers in RAM memory
(read/write memory- static memory), EEPROM memory
 Program block: FLASH memory
Memory
organization
of PIC16F84
MEMORY ORGANIZATION:MEMORY ORGANIZATION: Program MemoryProgram Memory
 Used for storing programs (opcodes), directly
under control of program counter (PC)
 Wake up memory (address 0000H) when PIC is
powered up.
 Has been carried out in FLASH technology
(indicated by the letter F in the part number, C for
one-time programmable (OTP)): possible to
program a ”C many times
 Size of 1024 locations, 14 bits width
 Locations 0000h & 0004h are reserved for
reset & interrupt vector, respectively
 The 1st
1Kx14 (0000h-03FFh) are physically
implemented address
 Accessing a location of physically
implemented address will cause a wraparound
MEMORY ORGANIZATION:MEMORY ORGANIZATION: Program MemoryProgram Memory
MEMORY ORGANIZATION:MEMORY ORGANIZATION: Data MemoryData Memory
 Also known as file register: data storage, scratch pad & registers for internal use and
functions
 Special Function Registers (SFR)
- 8-bit wide
- ALU status, timers, serial communication, I/O ports, ADC, & etc.
- function of each SFR is fixed in design, used to control ”C or peripheral
- access either directly (names @ addresses) or indirectly (FSR – File Select
Register)
- classified into core and peripheral sets
- control bits (RP1, RP0) in STATUS register are used for bank selection
 General Purpose Registers (GPR)
- 8-bit wide
- also called general purpose RAM (GP RAM)
- used for data storage & scratch pad
- accessed directly
- addresses in Bank 0 & Bank 1 are mapped together
 Location of SFR and GPR vary from chip to chip, even among members of the
same family
Data Memory
Organization
SFR File
Memory
Legend: x = unknown, u = unchanged, - = unimplemented, read as '0', q = value depends on condition
Note
1: The upper byte of the program counter is not directly accessible. PCLATH is a slave register for PC<12:8>. The contents of PCLATH can be
transferred to the upper byte of the program counter, but the contents of PC<12:8> are never transferred to PCLATH.
2: The TO and PD status bits in the STATUS register are not affected by a MCLR Reset.
3: Other (non power-up) RESETS include: external RESET through MCLR and the Watchdog Timer Reset.
4: On any device RESET, these pins are configured as inputs.
5: This is the value that will be in the port output latch.
Timer & PrescalarTimer & Prescalar
 Establish relation between a real dimension such
as “time” and a variable which represents status
of a time within a microcontroller
 PIC16F84 has an 8-bit timer, whose its value is
continually increasing to 255 and then it starts all
over again: 0, 1, 2, 3, 
, 255, 0, 1,
 etc
 Prescaler divides oscillator clock before it reaches
logic that increases timer status.
 The first three bits in OPTION register defines
divisor
 256 is the highest divisor, means timer clock
would increase by one at every 256th
clock
Timer & PrescalarTimer & Prescalar Cont

Flash MemoryFlash Memory
 Store permanent information on some
palm-sized computers (operating
system & core applications)
 Unlike RAM (random-access memory),
flash memory can continue to store
information in the absence of a power
source.
 Unlike ROM (read-only memory), we
can write/update to flash memory
 More expensive than ROM
RAMRAM
ï€ż Random-access memory
ï€ż The most common computer memory to perform
necessary tasks while the computer is on
ï€ż An integrated circuit memory chip allows information
to be stored or accessed in any order and all storage
locations are equally accessible.
ROMROM
 Read Only Memory
 Non-volatile: hold programs and data
that must be retained even the
computer is turned off
 data cannot be easily written to ROM;
depending on the technology used in
the ROM, writing may require special
hardware, or may be impossible.
 A computer's BIOS may be stored in
ROM.
EEPROMEEPROM
 Electrically Erasable Programmable
Read Only Memory
 ROM that can be erased electronically
and reprogrammed in-circuit (or with a
device programmer).
 EEPROM is very similar to flash
memory. The biggest difference is that
the bytes (words) of an EEPROM can be
erased individually.
PIC Introduction and explained in detailed

Weitere Àhnliche Inhalte

Was ist angesagt?

Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Mahmoud Sadat
 
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
 
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
 
PIC 16F877A by PARTHIBAN. S.
PIC 16F877A   by PARTHIBAN. S.PIC 16F877A   by PARTHIBAN. S.
PIC 16F877A by PARTHIBAN. S.parthi_arjun
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C ProtocolAnurag Tomar
 
Introduction to pic microcontroller
Introduction to pic microcontrollerIntroduction to pic microcontroller
Introduction to pic microcontrollerSiva Kumar
 
8259 updated
8259 updated 8259 updated
8259 updated jemimajerome
 
Programming ATmega microcontroller using Embedded C
Programming ATmega microcontroller using Embedded CProgramming ATmega microcontroller using Embedded C
Programming ATmega microcontroller using Embedded CVarun A M
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Dhaval Kaneria
 
Embedded C - Lecture 1
Embedded C - Lecture 1Embedded C - Lecture 1
Embedded C - Lecture 1Mohamed Abdallah
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051guest70d48b1
 
Features of 89c51,pic,avr &amp; arm processors
Features of 89c51,pic,avr &amp; arm processorsFeatures of 89c51,pic,avr &amp; arm processors
Features of 89c51,pic,avr &amp; arm processorsVikas Dongre
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basicssagar Ramdev
 
8051 memory
8051 memory8051 memory
8051 memoryMayank Garg
 

Was ist angesagt? (20)

Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Introduction to AVR Microcontroller
Introduction to AVR Microcontroller
 
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
 
I2C
I2CI2C
I2C
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 
Uart
UartUart
Uart
 
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
 
PIC 16F877A by PARTHIBAN. S.
PIC 16F877A   by PARTHIBAN. S.PIC 16F877A   by PARTHIBAN. S.
PIC 16F877A by PARTHIBAN. S.
 
I2C introduction
I2C introductionI2C introduction
I2C introduction
 
Timers and pwm
Timers and pwmTimers and pwm
Timers and pwm
 
I2C
I2CI2C
I2C
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Introduction to pic microcontroller
Introduction to pic microcontrollerIntroduction to pic microcontroller
Introduction to pic microcontroller
 
8259 updated
8259 updated 8259 updated
8259 updated
 
Programming ATmega microcontroller using Embedded C
Programming ATmega microcontroller using Embedded CProgramming ATmega microcontroller using Embedded C
Programming ATmega microcontroller using Embedded C
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
Embedded C - Lecture 1
Embedded C - Lecture 1Embedded C - Lecture 1
Embedded C - Lecture 1
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Features of 89c51,pic,avr &amp; arm processors
Features of 89c51,pic,avr &amp; arm processorsFeatures of 89c51,pic,avr &amp; arm processors
Features of 89c51,pic,avr &amp; arm processors
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
 
8051 memory
8051 memory8051 memory
8051 memory
 

Ähnlich wie PIC Introduction and explained in detailed

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
 
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
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf818Farida
 
Introduction2_PIC.ppt
Introduction2_PIC.pptIntroduction2_PIC.ppt
Introduction2_PIC.pptAakashRawat35
 
Nvidia tegra K1 Presentation
Nvidia tegra K1 PresentationNvidia tegra K1 Presentation
Nvidia tegra K1 PresentationANURAG SEKHSARIA
 
Introduction to microprocessor
Introduction to microprocessorIntroduction to microprocessor
Introduction to microprocessorRamaPrabha24
 
Atmega8u2 mur
Atmega8u2 murAtmega8u2 mur
Atmega8u2 murNickyhoney
 
2014 ii c08t-sbc pic para ecg
2014 ii c08t-sbc pic para ecg 2014 ii c08t-sbc pic para ecg
2014 ii c08t-sbc pic para ecg Aland Bravo Vecorena
 
MICROPROCESSORS & MICROCONTROLLERS
MICROPROCESSORS & MICROCONTROLLERSMICROPROCESSORS & MICROCONTROLLERS
MICROPROCESSORS & MICROCONTROLLERSkhalil zeineddine
 
microprocessor8085 power point presentation
microprocessor8085 power point presentationmicroprocessor8085 power point presentation
microprocessor8085 power point presentationrohitkuarm5667
 
embedded system and microcontroller
 embedded system and microcontroller embedded system and microcontroller
embedded system and microcontrollerSHILPA Sillobhargav
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESDr.YNM
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxMeghdeepSingh
 
Overview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerOverview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerRup Chowdhury
 

Ähnlich wie PIC Introduction and explained in detailed (20)

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
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
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
 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf
 
Introduction2_PIC.ppt
Introduction2_PIC.pptIntroduction2_PIC.ppt
Introduction2_PIC.ppt
 
89s52 2
89s52 289s52 2
89s52 2
 
Nvidia tegra K1 Presentation
Nvidia tegra K1 PresentationNvidia tegra K1 Presentation
Nvidia tegra K1 Presentation
 
Introduction to microprocessor
Introduction to microprocessorIntroduction to microprocessor
Introduction to microprocessor
 
pic_1.pdf
pic_1.pdfpic_1.pdf
pic_1.pdf
 
unit-2.pptx
unit-2.pptxunit-2.pptx
unit-2.pptx
 
Atmega8u2 mur
Atmega8u2 murAtmega8u2 mur
Atmega8u2 mur
 
Ii avr-basics(1)
Ii avr-basics(1)Ii avr-basics(1)
Ii avr-basics(1)
 
2014 ii c08t-sbc pic para ecg
2014 ii c08t-sbc pic para ecg 2014 ii c08t-sbc pic para ecg
2014 ii c08t-sbc pic para ecg
 
MICROPROCESSORS & MICROCONTROLLERS
MICROPROCESSORS & MICROCONTROLLERSMICROPROCESSORS & MICROCONTROLLERS
MICROPROCESSORS & MICROCONTROLLERS
 
microprocessor8085 power point presentation
microprocessor8085 power point presentationmicroprocessor8085 power point presentation
microprocessor8085 power point presentation
 
embedded system and microcontroller
 embedded system and microcontroller embedded system and microcontroller
embedded system and microcontroller
 
Pic full note
Pic full notePic full note
Pic full note
 
PIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTESPIC MICROCONTROLLERS -CLASS NOTES
PIC MICROCONTROLLERS -CLASS NOTES
 
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptxINDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
INDUSTRIAL TRAINING REPORT EMBEDDED SYSTEM.pptx
 
Overview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerOverview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontroller
 

Mehr von Ankita Tiwari

EssentialsOfMachineLearning.pdf
EssentialsOfMachineLearning.pdfEssentialsOfMachineLearning.pdf
EssentialsOfMachineLearning.pdfAnkita Tiwari
 
surveyofdnnlearning.pdf
surveyofdnnlearning.pdfsurveyofdnnlearning.pdf
surveyofdnnlearning.pdfAnkita Tiwari
 
Basic_Digital_Circuits_Implementation_using_Virtuoso.pdf
Basic_Digital_Circuits_Implementation_using_Virtuoso.pdfBasic_Digital_Circuits_Implementation_using_Virtuoso.pdf
Basic_Digital_Circuits_Implementation_using_Virtuoso.pdfAnkita Tiwari
 
Relation of Big Data and E-Commerce
Relation of Big Data and E-CommerceRelation of Big Data and E-Commerce
Relation of Big Data and E-CommerceAnkita Tiwari
 
Study of various Data Compression Techniques used in Lossless Compression of ...
Study of various Data Compression Techniques used in Lossless Compression of ...Study of various Data Compression Techniques used in Lossless Compression of ...
Study of various Data Compression Techniques used in Lossless Compression of ...Ankita Tiwari
 
What is IEEE and why?
What is IEEE and why?What is IEEE and why?
What is IEEE and why?Ankita Tiwari
 
To implement Water level control using LabVIEW and analog input signals from ...
To implement Water level control using LabVIEW and analog input signals from ...To implement Water level control using LabVIEW and analog input signals from ...
To implement Water level control using LabVIEW and analog input signals from ...Ankita Tiwari
 
To count number of external events using LabVIEW
To count number of external events using LabVIEWTo count number of external events using LabVIEW
To count number of external events using LabVIEWAnkita Tiwari
 
To control the dc motor speed using PWM from LabVIEW
To control the dc motor speed using PWM from LabVIEWTo control the dc motor speed using PWM from LabVIEW
To control the dc motor speed using PWM from LabVIEWAnkita Tiwari
 
To measure the intensity of light using LDR sensor by calibrating voltage wit...
To measure the intensity of light using LDR sensor by calibrating voltage wit...To measure the intensity of light using LDR sensor by calibrating voltage wit...
To measure the intensity of light using LDR sensor by calibrating voltage wit...Ankita Tiwari
 
To interface temperature sensor with microcontroller and perform closed loop ...
To interface temperature sensor with microcontroller and perform closed loop ...To interface temperature sensor with microcontroller and perform closed loop ...
To interface temperature sensor with microcontroller and perform closed loop ...Ankita Tiwari
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Ankita Tiwari
 
To study the relay operation from digital control signal using LabVIEW.
To study the relay operation from digital control signal using LabVIEW.To study the relay operation from digital control signal using LabVIEW.
To study the relay operation from digital control signal using LabVIEW.Ankita Tiwari
 
Linux operating systems and Bootable Pendrive
Linux operating systems and Bootable PendriveLinux operating systems and Bootable Pendrive
Linux operating systems and Bootable PendriveAnkita Tiwari
 
Design the implementation of Robotic Simulator: Goalkeeper.
Design the implementation of Robotic Simulator: Goalkeeper.Design the implementation of Robotic Simulator: Goalkeeper.
Design the implementation of Robotic Simulator: Goalkeeper.Ankita Tiwari
 
Design the implementation of Forward Dynamic for PUMA560.
Design the implementation of Forward Dynamic for PUMA560.Design the implementation of Forward Dynamic for PUMA560.
Design the implementation of Forward Dynamic for PUMA560.Ankita Tiwari
 
Design the implementation of Anytime D Star on an Occupancy Grid
Design the implementation of Anytime D Star on an Occupancy GridDesign the implementation of Anytime D Star on an Occupancy Grid
Design the implementation of Anytime D Star on an Occupancy GridAnkita Tiwari
 
Design the implementation of CDEx Robust DC Motor.
Design the implementation of CDEx Robust DC Motor.Design the implementation of CDEx Robust DC Motor.
Design the implementation of CDEx Robust DC Motor.Ankita Tiwari
 
Design the implementation of CDEx PID with Constraints
Design the implementation of CDEx PID with ConstraintsDesign the implementation of CDEx PID with Constraints
Design the implementation of CDEx PID with ConstraintsAnkita Tiwari
 
Design the implementation of CDEx flexible joints
Design the implementation of CDEx flexible jointsDesign the implementation of CDEx flexible joints
Design the implementation of CDEx flexible jointsAnkita Tiwari
 

Mehr von Ankita Tiwari (20)

EssentialsOfMachineLearning.pdf
EssentialsOfMachineLearning.pdfEssentialsOfMachineLearning.pdf
EssentialsOfMachineLearning.pdf
 
surveyofdnnlearning.pdf
surveyofdnnlearning.pdfsurveyofdnnlearning.pdf
surveyofdnnlearning.pdf
 
Basic_Digital_Circuits_Implementation_using_Virtuoso.pdf
Basic_Digital_Circuits_Implementation_using_Virtuoso.pdfBasic_Digital_Circuits_Implementation_using_Virtuoso.pdf
Basic_Digital_Circuits_Implementation_using_Virtuoso.pdf
 
Relation of Big Data and E-Commerce
Relation of Big Data and E-CommerceRelation of Big Data and E-Commerce
Relation of Big Data and E-Commerce
 
Study of various Data Compression Techniques used in Lossless Compression of ...
Study of various Data Compression Techniques used in Lossless Compression of ...Study of various Data Compression Techniques used in Lossless Compression of ...
Study of various Data Compression Techniques used in Lossless Compression of ...
 
What is IEEE and why?
What is IEEE and why?What is IEEE and why?
What is IEEE and why?
 
To implement Water level control using LabVIEW and analog input signals from ...
To implement Water level control using LabVIEW and analog input signals from ...To implement Water level control using LabVIEW and analog input signals from ...
To implement Water level control using LabVIEW and analog input signals from ...
 
To count number of external events using LabVIEW
To count number of external events using LabVIEWTo count number of external events using LabVIEW
To count number of external events using LabVIEW
 
To control the dc motor speed using PWM from LabVIEW
To control the dc motor speed using PWM from LabVIEWTo control the dc motor speed using PWM from LabVIEW
To control the dc motor speed using PWM from LabVIEW
 
To measure the intensity of light using LDR sensor by calibrating voltage wit...
To measure the intensity of light using LDR sensor by calibrating voltage wit...To measure the intensity of light using LDR sensor by calibrating voltage wit...
To measure the intensity of light using LDR sensor by calibrating voltage wit...
 
To interface temperature sensor with microcontroller and perform closed loop ...
To interface temperature sensor with microcontroller and perform closed loop ...To interface temperature sensor with microcontroller and perform closed loop ...
To interface temperature sensor with microcontroller and perform closed loop ...
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.
 
To study the relay operation from digital control signal using LabVIEW.
To study the relay operation from digital control signal using LabVIEW.To study the relay operation from digital control signal using LabVIEW.
To study the relay operation from digital control signal using LabVIEW.
 
Linux operating systems and Bootable Pendrive
Linux operating systems and Bootable PendriveLinux operating systems and Bootable Pendrive
Linux operating systems and Bootable Pendrive
 
Design the implementation of Robotic Simulator: Goalkeeper.
Design the implementation of Robotic Simulator: Goalkeeper.Design the implementation of Robotic Simulator: Goalkeeper.
Design the implementation of Robotic Simulator: Goalkeeper.
 
Design the implementation of Forward Dynamic for PUMA560.
Design the implementation of Forward Dynamic for PUMA560.Design the implementation of Forward Dynamic for PUMA560.
Design the implementation of Forward Dynamic for PUMA560.
 
Design the implementation of Anytime D Star on an Occupancy Grid
Design the implementation of Anytime D Star on an Occupancy GridDesign the implementation of Anytime D Star on an Occupancy Grid
Design the implementation of Anytime D Star on an Occupancy Grid
 
Design the implementation of CDEx Robust DC Motor.
Design the implementation of CDEx Robust DC Motor.Design the implementation of CDEx Robust DC Motor.
Design the implementation of CDEx Robust DC Motor.
 
Design the implementation of CDEx PID with Constraints
Design the implementation of CDEx PID with ConstraintsDesign the implementation of CDEx PID with Constraints
Design the implementation of CDEx PID with Constraints
 
Design the implementation of CDEx flexible joints
Design the implementation of CDEx flexible jointsDesign the implementation of CDEx flexible joints
Design the implementation of CDEx flexible joints
 

KĂŒrzlich hochgeladen

Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Call Now ≜ 9953056974 â‰ŒđŸ” Call Girls In New Ashok Nagar â‰ŒđŸ” Delhi door step de...
Call Now ≜ 9953056974 â‰ŒđŸ” Call Girls In New Ashok Nagar  â‰ŒđŸ” Delhi door step de...Call Now ≜ 9953056974 â‰ŒđŸ” Call Girls In New Ashok Nagar  â‰ŒđŸ” Delhi door step de...
Call Now ≜ 9953056974 â‰ŒđŸ” Call Girls In New Ashok Nagar â‰ŒđŸ” Delhi door step de...9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Call Girls In Bangalore ☎ 7737669865 đŸ„” Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 đŸ„” Book Your One night StandCall Girls In Bangalore ☎ 7737669865 đŸ„” Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 đŸ„” Book Your One night Standamitlee9823
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Top Rated Call Girls In chittoor đŸ“± {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor đŸ“± {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor đŸ“± {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor đŸ“± {7001035870} VIP Escorts chittoordharasingh5698
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 

KĂŒrzlich hochgeladen (20)

Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Call Now ≜ 9953056974 â‰ŒđŸ” Call Girls In New Ashok Nagar â‰ŒđŸ” Delhi door step de...
Call Now ≜ 9953056974 â‰ŒđŸ” Call Girls In New Ashok Nagar  â‰ŒđŸ” Delhi door step de...Call Now ≜ 9953056974 â‰ŒđŸ” Call Girls In New Ashok Nagar  â‰ŒđŸ” Delhi door step de...
Call Now ≜ 9953056974 â‰ŒđŸ” Call Girls In New Ashok Nagar â‰ŒđŸ” Delhi door step de...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Call Girls In Bangalore ☎ 7737669865 đŸ„” Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 đŸ„” Book Your One night StandCall Girls In Bangalore ☎ 7737669865 đŸ„” Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 đŸ„” Book Your One night Stand
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Top Rated Call Girls In chittoor đŸ“± {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor đŸ“± {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor đŸ“± {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor đŸ“± {7001035870} VIP Escorts chittoor
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 

PIC Introduction and explained in detailed

  • 1. Introduction to theIntroduction to the PIC MicrocontrollerPIC Microcontroller
  • 2. OutlineOutline  What is Microcontroller?  ”C vs General-Purpose ”P  A Brief History of PIC ”C  PIC16F84 Features  PIC Clock Generator  Reset  PORTS  Center Processing Unit (CPU)  MEMORY ORGANIZATION  Timer & Prescalar  Flash Memory  RAM  ROM  EEPROM
  • 3. What is Microcontroller?What is Microcontroller?  Integrated chip that contains CPU, RAM, some form of ROM, I/O ports, and timers  Designed for a very specific task to control a particular system  reduce production cost
  • 4. ”C”C vs General-Purposevs General-Purpose ””PP Microcontroller Microprocessor Devices Microchip’s PIC’s series, Atmel’s AVR series Intel’s x86 family (8086, 80286, 80386, 80486 & the Pentium) or (Motorola’s PowerPC family) Components Internal CPU, RAM, ROM, I/O ports and timers External RAM, ROM, and I/O ports Application Perform specific function: A small set of signal processing functions for digital signal processor Perform more tasks that related to general requirements: calculations of software, personal computer
  • 5. ”C”C vs General-Purposevs General-Purpose ””PP Cont
 CPU / ÎŒP RegisterRegister Control UnitControl Unit ALUALU DATA BUSCPU / ÎŒP Register Register Control Unit Control Unit ALU ALU ADDRESS BUS CONTROL BUS ÎŒC RAM ROM I/O Timer Serial COM
  • 6. ”C”C vs General-Purposevs General-Purpose ””PP Cont
 Microprocessor EEPROM RAM Input and output ports Serial I/O Parallel I/O Timer PWM Input and output ports A/D D/A Analog I/O ROM Microprocessor EEPROM RAM Input and output ports Serial I/O Parallel I/O Timer PWM Input and output ports A/DA/D D/AD/A Analog I/O ROM Microprocessor-based System Microcontroller-based System
  • 7. A Brief History of PIC ”CA Brief History of PIC ”C  In 1989, Microchip Technology Corporation introduced an 8-bit ”C called PIC (Peripheral Interface Controller).  This 8 pins chip contains a small amounts of data RAM, a few hundred bytes of on-chip ROM for program, one timer, and a few pins for I/O ports.  The family of 8-bit ”C: 10xxx, 12xxx, 14xxx, 16xxx, 17xxx, and 18xxx
  • 8. A Brief History of PIC ”CA Brief History of PIC ”C Cont
 http://www.microchip.com
  • 9. A Brief History of PIC ”CA Brief History of PIC ”C  They are all 8-bit processors that the CPU can work on only 8 bits of data a time.  Problem: not all 100% upwardly compatible in terms of software when going from one family to another family.  Ex.: 12xxx - 12-bit wide instructions 16xxx- 14-bit wide instructions PIC18xxx - 16-bit wide with many new instructions Cont

  • 10. A Brief History of PIC ”CA Brief History of PIC ”C Advantages of PIC:  30 to 100 times faster than other ”Cs (program memory is integrated to the chip)  Smaller size (on-board memory)  Easy to program, reusable and inexpensive Cont

  • 11. A Brief History of PIC ”CA Brief History of PIC ”C Architecture: Cont
 CPU Program & Data Memory Von Neumann architecture CPU Program Memory Data Memory Harvard architecture
  • 12. PIC16F84 FeaturesPIC16F84 Features ï€Č 18 pins, DIP18 type (Dual in Package) or SMD type Remarks: RA0 - RA3 : Pins on port A. No additional function RA4 : TOCK1 which functions as a timer RB0 : Interrupt input is an additional function. RB1 - RB5: Pins on port B. No additional function. RB6 : 'Clock' line in program mode. RB7 : 'Data' line in program mode MCLR : Reset input and Vpp programming voltage Vss : Ground of power supply. Vdd : Positive power supply pole. OSC1 - OSC2 : Pins for connecting with oscillator.
  • 13. PIC16F84 FeaturesPIC16F84 Features Cont
 BlockBlock diagram ofdiagram of PIC16F84PIC16F84
  • 14. PIC Clock GeneratorPIC Clock Generator  To provide a clock for executing a program or program instructions of ”C.  Types of PIC clock generator:  A crystal & two capacitors  Resonators or external resistor-capacitor pair  Built-in resistor-capacitor
  • 15. PIC Clock GeneratorPIC Clock Generator  PIC16F84 can operate in four different oscillation modes: - LP low power crystal - XT crystal/resonator - HS high speed crystal/resonator - RC resistor/capacitor  Two configuration bits, FOSC1 & FOSC0 are used to select one of these four modes Cont

  • 16. PIC Clock GeneratorPIC Clock Generator Crystal Oscillator/Ceramic Resonators  For XT, LP or HS OSC configurations  Crystal or ceramic resonator is connected to the OSC1/CLKIN & OSC2/CLKOUT pins Cont

  • 17. PIC Clock GeneratorPIC Clock Generator ï‚Č A parallel cut crystal is used to design PIC16F84A ï‚Č The use of a series cut crystal may give a freq. out of the crystal manufacturer’s specifications Cont
 External clock input operations
  • 18. PIC Clock GeneratorPIC Clock Generator Cont
 Capacitor selection for ceramic resonators Capacitor selection for crystal resonators
  • 19. PIC Clock GeneratorPIC Clock Generator RC Oscillator  Reduce cost for timing insensitive applications  Variation of the oscillator frequency: - operating temperature - process parameter variation - difference in lead frame capacitance between package types (low CEXT values) - tolerance of the external R & C components Cont

  • 20. ResetReset ï€Č Power-on Reset (POR) ï€Č MCLR during normal operation ï€Č MCLR during SLEEP ï€Č WDT Reset (during normal operation) ï€Č WDT Wake-up (during SLEEP) Register Reset value (hex) PC 000000 WREG 00 SP 00 TRISA-TRISB FF Value registers upon reset
  • 21. PORTSPORTS ï€Č Physical connection of CPU and outside world – monitor @ control other components @ devices ï€Č A group of pins which can be accessed simultaneously @ set the desired combination of zeros and ones ï€Č All port pins can be designated as input @ output
  • 22. PORTS:PORTS: PORTA & TRISAPORTA & TRISA  PORTA is a 5-bit wide, bi-directional port  TRISA: data direction register of PORTA  TRISA = 1, PORTA is an input (output driver in HI- impedance mode)  TRISA = 0, PORTA is an output (contents of the output latch on the selected pin)
  • 23. PORTS:PORTS: PORTB & TRISBPORTB & TRISB  PORTB is a 8-bit wide, bi-directional port  TRISB: data direction register of PORTB  TRISB = 1, PORTB is an input (output driver in HI- impedance mode)  TRISB = 0, PORTB is an output (contents of the output latch on the selected pin)
  • 24. Center Processing UnitCenter Processing Unit (CPU)(CPU) The brain of the ”C  Connect all parts of the ”C through a data bus & and an address bus  Find, fetch, decode & execute the right instruction  CPU resources:  Registers: store temporary information  ALU: performing arithmetic functions  Program counter: point to the address of the next instruction to be executed  Instruction decoder: interpret the instruction fetched into the CPU
  • 25. Center Processing UnitCenter Processing Unit (CPU)(CPU) MOVLW 0x20 Program Memory Temporary storage executeexecute Memory 11 00xx 0010 0000 opcode Assembler (translator) Decoder Fetch instruction Fetch instruction
  • 26. Center Processing UnitCenter Processing Unit (CPU)(CPU) Arithmetic Logic Unit (ALU)  Add, subtract, move (left @ right within a register) and logic operations  PIC16F84 contains an 8-bit ALU & 8-bit working registers (WREG)  ALU instructions: two operands @ one operand  Two operands: WREG + file register @ immediate constant  Registers: GPR (General Purposes Registers) & SFP (Special Function Registers)  One operand: WREG @ a file register  Execution of ALU instructions can affect STATUS bits which are carry (C), digit carry (DC), and zero (Z). Cont

  • 27. Center Processing UnitCenter Processing Unit (CPU)(CPU) Cont
 ALU STATUS register 8-bit literal (from instruction word) WREG register 8- bit 8- bit 8-bit Z, DC, C flags Carry bit
  • 28. MEMORY ORGANIZATIONMEMORY ORGANIZATION  PIC16F84 has two separate memory blocks: data & program  Data block: GPR and SFP registers in RAM memory (read/write memory- static memory), EEPROM memory  Program block: FLASH memory
  • 30. MEMORY ORGANIZATION:MEMORY ORGANIZATION: Program MemoryProgram Memory  Used for storing programs (opcodes), directly under control of program counter (PC)  Wake up memory (address 0000H) when PIC is powered up.  Has been carried out in FLASH technology (indicated by the letter F in the part number, C for one-time programmable (OTP)): possible to program a ”C many times  Size of 1024 locations, 14 bits width  Locations 0000h & 0004h are reserved for reset & interrupt vector, respectively  The 1st 1Kx14 (0000h-03FFh) are physically implemented address  Accessing a location of physically implemented address will cause a wraparound
  • 31. MEMORY ORGANIZATION:MEMORY ORGANIZATION: Program MemoryProgram Memory
  • 32. MEMORY ORGANIZATION:MEMORY ORGANIZATION: Data MemoryData Memory  Also known as file register: data storage, scratch pad & registers for internal use and functions  Special Function Registers (SFR) - 8-bit wide - ALU status, timers, serial communication, I/O ports, ADC, & etc. - function of each SFR is fixed in design, used to control ”C or peripheral - access either directly (names @ addresses) or indirectly (FSR – File Select Register) - classified into core and peripheral sets - control bits (RP1, RP0) in STATUS register are used for bank selection  General Purpose Registers (GPR) - 8-bit wide - also called general purpose RAM (GP RAM) - used for data storage & scratch pad - accessed directly - addresses in Bank 0 & Bank 1 are mapped together  Location of SFR and GPR vary from chip to chip, even among members of the same family
  • 34. SFR File Memory Legend: x = unknown, u = unchanged, - = unimplemented, read as '0', q = value depends on condition Note 1: The upper byte of the program counter is not directly accessible. PCLATH is a slave register for PC<12:8>. The contents of PCLATH can be transferred to the upper byte of the program counter, but the contents of PC<12:8> are never transferred to PCLATH. 2: The TO and PD status bits in the STATUS register are not affected by a MCLR Reset. 3: Other (non power-up) RESETS include: external RESET through MCLR and the Watchdog Timer Reset. 4: On any device RESET, these pins are configured as inputs. 5: This is the value that will be in the port output latch.
  • 35. Timer & PrescalarTimer & Prescalar  Establish relation between a real dimension such as “time” and a variable which represents status of a time within a microcontroller  PIC16F84 has an 8-bit timer, whose its value is continually increasing to 255 and then it starts all over again: 0, 1, 2, 3, 
, 255, 0, 1,
 etc  Prescaler divides oscillator clock before it reaches logic that increases timer status.  The first three bits in OPTION register defines divisor  256 is the highest divisor, means timer clock would increase by one at every 256th clock
  • 36. Timer & PrescalarTimer & Prescalar Cont

  • 37. Flash MemoryFlash Memory  Store permanent information on some palm-sized computers (operating system & core applications)  Unlike RAM (random-access memory), flash memory can continue to store information in the absence of a power source.  Unlike ROM (read-only memory), we can write/update to flash memory  More expensive than ROM
  • 38. RAMRAM ï€ż Random-access memory ï€ż The most common computer memory to perform necessary tasks while the computer is on ï€ż An integrated circuit memory chip allows information to be stored or accessed in any order and all storage locations are equally accessible.
  • 39. ROMROM  Read Only Memory  Non-volatile: hold programs and data that must be retained even the computer is turned off  data cannot be easily written to ROM; depending on the technology used in the ROM, writing may require special hardware, or may be impossible.  A computer's BIOS may be stored in ROM.
  • 40. EEPROMEEPROM  Electrically Erasable Programmable Read Only Memory  ROM that can be erased electronically and reprogrammed in-circuit (or with a device programmer).  EEPROM is very similar to flash memory. The biggest difference is that the bytes (words) of an EEPROM can be erased individually.