Upload
ngodang
View
220
Download
0
Embed Size (px)
Citation preview
PIC Microcontroller and E b dd d S tEmbedded Systems
Muhammad Ali Mazidi, Rolin McKinlay and Danny Causey
Eng. Husam AlzaqE g m qThe Islamic Uni. Of Gaza
The PIC uCs 1-1
Chapter 1:pThe PIC Mi t ll Microcontrollers: History and Features History and Features
Microcontroller and
PIC Microcontroller d E b dd d S
Embedded ProcessorsOverview of the PIC18 and Embedded Systems
Muhammad Ali Mazidi, Rolin McKinlay and D C s F b
Overview of the PIC18 Family
Danny Causey, February 2007.
The PIC uCs 1-2
ObjectiveObjective
d P d Compare and contrast uP and uCDescribe the advantages of uCgExplain the concept of ESDescribe criteria for considering a uCDescribe criteria for considering a uCCompare and contrast the various of the PIC FamilyPIC FamilyCompare the PIC with uC offered by
h others
The PIC uCs 1-3
Microcontroller and Embedded Processors
ll G l PMicrocontroller VS General purpose uPuC for embedded systemsyX86 PC Embedded Application
The PIC uCs 3-4
Figure 1-1. Microprocessor System Contrasted With Microcontroller Contrasted With Microcontroller System
The PIC uCs 3-5
Choosing a uControllerChoosing a uController
h b The major 8-bit Freescale Semiconductor’s (formerly Motorola) 6 H 0 /6 H 1168HC08/68HC11Intel’s 8051Atmel’s AVRZilog’s Z8PIC from Microchip Technology
The PIC uCs 3-6
Criteria for Choosing uController
h d f h k 1. Meeting the computing needs of the task at hand efficiency and cost effectively
2. Availability of SW and HW development tools
CompilersAssemblersDebuggersEmulators
3. Wide availability and reliable source
The PIC uCs 3-7
Criteria for Choosing uController
h d f h k Meeting the computing needs of the task at hand efficiency and cost effectively
Determine its type, 8-bit,16-bit or 32-bitSpeedPackaging (40-Pin or QFP)Power consumptionThe amount of RAM and ROMThe number of I/O pins and the timerCost per unitEase of upgrade.
The PIC uCs
pg
The PIC uCs 3-8
uC Data width uC Data width
b ll8-bit MicrocontrollersPIC10, PIC12, PIC14PIC16, PIC17, PIC18
16-bit MicrocontrollersPIC24F, PIC24H
32-bit Microcontrollers32 bit MicrocontrollersPIC32
16 bit Digital Signal Controllers16-bit Digital Signal ControllersdsPIC30, dsPIC33F
The PIC uCs 3-9
Overview of the PIC18 Family
b ll ll d P An 8-bit uController called PIC is introduces in 1989 by Microchip
h l Technology CorporationIt includes
Small Data RamFew bytes of RomyOne timerI/O portsp
The PIC uCs 3-10
PIC 18 FeathersPIC 18 Feathers
hRISC ArchitectureOn-chip program, Code, ROMp p gData EEPROMTimersTimersADCU RTUSARTI/O Ports
The PIC uCsThe PIC uCs 3-11
Figure 1-2. Simplified View of a PIC Microcontroller
The PIC uCs 3-12
PIC18 Features PIC18 Features
hRISC ArchitectureOn chip Code ROM and Data RAM, Data pEEPROMTimersTimersADCUSARTUSARTI/O ports
The PIC uCs 3-13
Figure 1-3 PIC18 Block DiagramFigure 1-3. PIC18 Block Diagram
The PIC uCs 3-14
Figure 1-3. PIC18 Block Diagram (continued)
The PIC uCs 3-15
Figure 1-4 PIC16 Block DiagramFigure 1-4. PIC16 Block Diagram
The PIC uCs 3-16
Figure 1-4. PIC16 Block Diagram (continued)
The PIC uCs 3-17
uCuC
The PIC uCs 3-18
PIC uC program ROMPIC uC program ROM
P f d ff d d PIC exists in terms of different speed and the amount of on-chip RAM/ROMCompatibility is restricted as far as the instructions are concerns.
The PIC uCs 3-19
PIC uC Program ROMPIC uC Program ROM
P 1 BPIC 18 can support up to 2MBGenerally, they come with 4KB – 128KBy yAvailable in flash, OTP, UV-EPROM, and masked.masked.
The PIC uCsThe PIC uCs 3-20
UV-EPROMUV-EPROM
The PIC uCs 3-21
PIC18Fxxxx with flashPIC18Fxxxx with flash
d f d d lUsed for product development
The PIC uCsThe PIC uCs 3-22
PIC18Cxxxx and Masked PICPIC18Cxxxx and Masked PIC
POTPOne time programmableC indicates the OTP RPMUsed for mass productionCheaper
Maskedprogram will be burned into the PIC chip during the fabrication processp
The PIC uCsThe PIC uCs 3-23
PIC uC data RAM and EEPROMPIC uC data RAM and EEPROM
40 6 B (4 kB) f d Max. 4096 Bytes (4 kB) of data RAM space.Data RAM space has two components
Varied GPR, General Purpose RAMp• For read/write and data manipulation• Divided into banks of 256 B
Fixed SFR, Special Function RegistersSome of PICs have a small amount of EEPROM
Used for critical data storing
The PIC uCs
g
The PIC uCs 3-24
The PIC uCsTransport Layer 3-25
PIC uC peripheralsPIC uC peripherals
N ( ll N k) CAN- (Controller Area Network), LIN- (Local Interconnect Network), USB- (Universal Serial Bus), I²C- (Inter-Integrated Circuit) I C- (Inter-Integrated Circuit), SPI- (Serial Peripheral Interface),
i l E h I fSeriel or Ethernet InterfaceADC - Analog Digital Converterg gUSART- Universal Synchronous Asynchronous Receiver Transmitter
The PIC uCs
synchronous ece ver ransm tter
3-26
Chapter 1: SummaryChapter 1: SummaryWe have Compared We have Compared between uP and uCWe have described the We have described the advantages of uCW h i sim l We have given a simple introduction for PIC18 Next:
PIC Architecture and assembly language programming.
The PIC uCs 3-27