Sie sind auf Seite 1von 25

Embedded Systems Fall, 2013 Chapter 1: The PIC Microcontrollers Dr. Mustafa A.

Bani-Hasan

Todays Lecture
What is the embedded system?
Comparison between Microprocessors and Microcontrollers. Advantages of Microcontroller. Criteria for considering Microcontroller. Overview of the PIC18 Family

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

What Are Embedded Systems?


Definition: An embedded system is any device that includes a programmable computer but is not itself a generalpurpose computer. An embedded system is an application-specific computer system which is built into a larger system or device.

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

A Short List of Embedded Systems


Anti-lock brakes Auto-focus cameras Automatic teller machines Automatic transmission Battery chargers Cell phones Cell-phone base stations Cordless phones Digital cameras Disk drives Electronic card readers Electronic instruments Electronic toys/games Fax machines Fingerprint identifiers Home security systems Medical testing systems Modems
Dr. Mustafa Bani-Hasan

MPEG decoders Network cards Network switches/routers Point-of-sale systems Portable video games Printers Satellite phones Scanners Speech recognizers Stereo systems Teleconferencing systems Televisions Temperature controllers Theft tracking systems Video game consoles Video phones Washers and dryers

AAUJ - Embedded Systems

Microprocessor vs. Microcontroller


Microprocessor is general-purpose microprocessors such as Intels x86 family. Microprocessor contain
No RAM, No ROM or No 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.

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

Microprocessor vs. Microcontroller

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

Microprocessor vs. Microcontroller


Microprocessor
1. 2. CPU is stand-alone, RAM, ROM, I/O, timer are separate designer can decide on the amount of ROM, RAM and I/O ports. Expansive Microprocessors are suitable to processing information in computer systems general-purpose

Microcontroller
1. 2. 3.

3. 4.

4.

5.

5.
Dr. Mustafa Bani-Hasan AAUJ - Embedded Systems

CPU, RAM, ROM, I/O and timer are all on a single chip fix amount of on-chip ROM, RAM, I/O ports for applications in which cost, power and space are critical Microcontrollers are suitable to control of I/O devices in designs requiring a minimum component single-purpose
7

Microcontrollers for Embedded systems


Microprocessor and Microcontroller are widely used in embedded system products. Typically, in an embedded system the microcontrollers ROM is burned with a purpose for specific functions needed for the system.
(e.x. Printer)

PC used for any number of applications


Word processor, bank teller terminal, video game player, network server, internet terminal

PC contains or is connected to various embedded products


Keyboard, printer, mouse etc.

X86 PC embedded applications


High-end Embedded Processor
Dr. Mustafa Bani-Hasan AAUJ - Embedded Systems 8

Choosing a Controller
The major 8-bit
Freescale Semiconductors (formerly Motorola) 68HC08/68HC11 Intels 8051 Atmels AVR Zilogs Z8 PIC from Microchip Technology

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

Criteria for Choosing Controller


Computing needs
Speed, packaging, power consumption, RAM, ROM, I/O pins, timers, upgrade to high performance or low-power versions, cost

Software development tools


Assembler, debugger, C compiler, emulator, technical support

Availability & source

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

10

Microcontroller Data width


8-bit Microcontrollers
PIC10, PIC12, PIC14 PIC16, PIC17, PIC18

16-bit Microcontrollers
PIC24F, PIC24H

32-bit Microcontrollers
PIC32

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

11

A Brief History of the PIC Microcontroller


An 8-bit Controller called PIC (Peripheral Interface Controller) is introduces in 1989 by Microchip Technology Corporation

It includes
Small Data RAM Few hundred bytes of ROM One timer Few pins for I/O ports ( 8 pins)

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

12

PIC 18 Feathers
RISC Architecture On-chip program, Code, ROM Data RAM Data EEPROM Timers ADC USART I/O Ports
AAUJ - Embedded Systems 13

Dr. Mustafa Bani-Hasan

RISC Architecture
Reduced Instruction Set Computer (RISC) Small, highly optimized set of instructions Uses a load-store architecture Short execution time Pipelining Many registers

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

14

Figure 1-2. Simplified View of a PIC Microcontroller

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

15

PIC18 Block Diagram

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

16

Microcontroller

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

17

PIC Microcontroller
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.

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

18

PIC Microcontroller Program ROM


Its used to store Program or code PIC18 can support up to 2MB Generally, they come with 4KB 128KB Available in flash, OTP, UV-EPROM, and masked.

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

19

PIC Microcontroller with UV-EPROM

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

20

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

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

21

PIC18Cxxxx and Masked PIC


One Time Programmable (OTP)
C indicates the OTP ROM Can not reprogram Used for mass production Cheaper

Masked
program will be burned into the PIC chip during the fabrication process

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

22

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

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

23

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

24

PIC Microcontroller peripherals


CAN- (Controller Area Network), LIN- (Local Interconnect Network), USB- (Universal Serial Bus), IC- (Inter-Integrated Circuit), SPI- (Serial Peripheral Interface), ADC - Analog Digital Converter USART- Universal Synchronous Asynchronous Receiver Transmitter

Dr. Mustafa Bani-Hasan

AAUJ - Embedded Systems

25

Das könnte Ihnen auch gefallen