embedded system lect3
DESCRIPTION
qweqweqweqweasdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssszxcccccccccccccccTRANSCRIPT
![Page 1: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/1.jpg)
Embedded SystemSpring, 2011Lecture 3: The PIC MicrocontrollersEng. Wazen M. Shbair
![Page 2: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/2.jpg)
IUG- Embedded System 2
Today’s Lecture
Comparison between Microprocessors and Microcontrollers.
Advantages of Microcontroller. Criteria for considering Microcontroller. Overview of the PIC18 Family
![Page 3: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/3.jpg)
IUG- Embedded System 3
Microprocessor vs. Microcontroller
Microprocessor is general-purpose microprocessors such as Intel’s x86 family.
Microprocessor dose not contain RAM, ROM or I/O Ports on the chip it self.
Microcontroller has CPU and fixed amount of RAM, ROM, I/O Ports and Timer all on a single chip.
![Page 4: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/4.jpg)
IUG- Embedded System 4
Microprocessor vs. Microcontroller
![Page 5: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/5.jpg)
IUG- Embedded System 5
Microprocessor vs. Microcontroller
Microprocessor and Microcontroller are widely used in embedded system products.
Typically, in an embedded system the microcontroller’s ROM is burned with a purpose for specific functions needed for the system. (e.x. Printer)
![Page 6: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/6.jpg)
IUG- Embedded System 6
Choosing a µController
The major 8-bit Freescale Semiconductor’s (formerly Motorola)
68HC08/68HC11 Intel’s 8051 Atmel’s AVR Zilog’s Z8 PIC from Microchip Technology
![Page 7: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/7.jpg)
IUG- Embedded System 7
Criteria for Choosing µController
1. Meeting the computing needs of the task at hand efficiency and cost effectively
2. Availability of SW and HW development tools Compilers Assemblers Debuggers Emulators
3. Wide availability and reliable source.
![Page 8: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/8.jpg)
IUG- Embedded System 8
Criteria for Choosing µController
Meeting the computing needs of the task at hand efficiency and cost effectively Determine its type, 8-bit,16-bit or 32-bit Speed Packaging (40-Pin or QFP) Power consumption The amount of RAM and ROM The number of I/O pins and the timer Cost per unit Ease of upgrade.
3-8
![Page 9: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/9.jpg)
IUG- Embedded System 9
µC Data width
8-bit Microcontrollers PIC10, PIC12, PIC14 PIC16, PIC17, PIC18
16-bit Microcontrollers PIC24F, PIC24H
32-bit Microcontrollers PIC32
16-bit Digital Signal Controllers dsPIC30, dsPIC33F
![Page 10: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/10.jpg)
IUG- Embedded System 10
Overview of the PIC18 Family
An 8-bit µController called PIC is introduces in 1989 by Microchip Technology Corporation
It includes Small Data RAM Few bytes of ROM One timer I/O ports
3-10
![Page 11: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/11.jpg)
IUG- Embedded System 11
PIC 18 Feathers
RISC Architecture On-chip program, Code, ROM Data EEPROM Timers ADC USART I/O Ports
![Page 12: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/12.jpg)
RISC Architecture
Reduced Instruction Set Computer (RISC) Small, highly optimized set of instructions Uses a load-store architecture Short execution time Pipelining Many registers
![Page 13: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/13.jpg)
IUG- Embedded System 13
Figure 1-2. Simplified View of a PIC Microcontroller
3-13
![Page 14: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/14.jpg)
IUG- Embedded System 15
Microcontroller
3-15
![Page 15: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/15.jpg)
IUG- Embedded System 16
PIC µC program ROM
PIC exists in terms of different speed and the amount of on-chip RAM/ROM
Compatibility is restricted as far as the instructions are concerns.
3-16
![Page 16: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/16.jpg)
IUG- Embedded System 17
PIC µC Program ROM
Its used to store Program or code PIC 18 can support up to 2MB Generally, they come with 4KB – 128KB Available in flash, OTP, UV-EPROM, and
masked.
![Page 17: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/17.jpg)
IUG- Embedded System 18
UV-EPROM
3-18
![Page 18: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/18.jpg)
IUG- Embedded System 19
PIC18Fxxxx with flash
Its on chip ROM is flash It memory can be erased in second compared
to 20 minute needed for UV-EPROM Used for product development
![Page 19: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/19.jpg)
IUG- Embedded System 20
PIC18Cxxxx and Masked PIC
One Time Programmable (OTP) C indicates the OTP RPM Used for mass production Cheaper
Masked program will be burned into the PIC chip during
the fabrication process
![Page 20: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/20.jpg)
IUG- Embedded System 21
PIC C data RAM and EEPROM
Max. 4096 Bytes (4 kB) of data RAM space. Data RAM space has two components
Varied GPR, General Purpose RAM For read/write and data manipulation Divided into banks of 256 B
Fixed SFR, Special Function Registers Some of PICs have a small amount of EEPROM
Used for critical data storing
![Page 21: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/21.jpg)
IUG- Embedded System 22
![Page 22: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/22.jpg)
IUG- Embedded System 23
PIC µC peripherals
CAN- (Controller Area Network), LIN- (Local Interconnect Network), USB- (Universal Serial Bus), I²C- (Inter-Integrated Circuit), SPI- (Serial Peripheral Interface), Serial or Ethernet Interface ADC - Analog Digital Converter USART- Universal Synchronous Asynchronous
Receiver Transmitter
3-23
![Page 23: Embedded System Lect3](https://reader030.vdocument.in/reader030/viewer/2022020401/55cf9a20550346d033a0944e/html5/thumbnails/23.jpg)
IUG- Embedded System 24
References
Jie Hu , ECE692 Embedded Computing Systems , Fall 2010.
PIC Microcontroller And Embedded Systems: using Assembly and C for PIC 18, M. Mazidi, R. McKinlay and D. Causey, Prentice Fall, 2008.
Eng. Husam Alzaq, Embedded System Course, IUG, 2010