Device Overview 1. The advantages of all PIC18Fxxxx microcontrollers: High computational...

27
Chapter 2 Device Overview 1

description

3

Transcript of Device Overview 1. The advantages of all PIC18Fxxxx microcontrollers: High computational...

Page 1: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Chapter 2

Device Overview

1

Page 2: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

PIC 18F4520

The advantages of all PIC18Fxxxx microcontrollers:

High computational performance High-endurance Enhanced Flash program memory

2

Page 3: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

PIC18F4520 Diagram

3

Page 4: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Power Management Features

Run: CPU on, Peripherals on Idle: CPU off, Peripherals on Sleep: CPU off, Peripherals off

Run mode 11 μA Typical Idle mode 2.5 μA Typical Sleep mode 100 nA Typical

Ultra Low 50nA Input Leakage Two-Speed Oscillator Start-up

4

Page 5: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Flexible Oscillator Structure Four Crystal modes, up to 40 MHz 4x Phase Lock Loop (PLL) – Available for Crystal

and Internal Oscillators Two External RC modes, up to 4 MHz Two External Clock modes, up to 40 MHz Internal Oscillator Block:

Fast wake from Sleep and Idle, 1 μs typical

Secondary Oscillator using Timer1 @ 32 kHz Fail-Safe Clock Monitor:

Allows for safe shutdown if peripheral clock stops

5

Page 6: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Peripheral Highlights

High-Current Sink/Source 25 mA/25 Ma Three Programmable External Interrupts Four Input Change Interrupts Enhanced Capture/Compare/PWM (ECCP)

module One, two or four PWM outputs Selectable polarity Programmable dead time Auto-shutdown and auto-restart

6

Page 7: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Peripheral Highlights

Enhanced Addressable USART module: Supports RS-485, RS-232 and LIN/J2602

10-Bit, up to 13-Channel Analog-to-Digital Converter module:

Auto-acquisition capability

Dual Analog Comparators with Input Multiplexing

7

Page 8: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

NanoWatt TECHNOLOGY

Alternate Run Modes

Multiple Idle Modes

On-the-Fly Mode Switching

Low Consumption in Key Modules

8

Page 9: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Alternate Run Modes

By clocking the controller from the Timer1 source or the internal oscillator block, power consumption during code execution can be reduced by 90%.

9

Page 10: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Multiple Idle Modes

CPU core disabled but the peripherals still active.

Power consumption can be reduced even further, to as little as 4% of normal operation requirements.

10

Page 11: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

On-the-Fly Mode Switching

The power managed modes are invoked by user code during operation

Allowing the user to incorporate power-saving ideas into their application’s software design

11

Page 12: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Low Consumption in Key Modules

The power requirements for both Timer1 and the Watchdog Timer are minimized

12

Page 13: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Other Special Features

Memory Endurance Self-Programmability Extended Instruction Set Enhanced CCP Module Enhanced Addressable USART 10-Bit A/D Converter Extended Watchdog Timer (WDT)

13

Page 14: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Memory Endurance

The Enhanced Flash cells are rated to last for many thousands of erase/write cycles.

Data retention without refresh is conservatively estimated to be greater than 40 years.

14

Page 15: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Self-Programmability

These devices can write to their own program memory spaces under internal software control.

possible to create an application that can update itself in the field.

15

Page 16: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Extended Instruction Set

Introduces an optional extension to the PIC18 instruction set: which adds 8 new instructions and an Indexed Addressing mode.

Enabled as a device configuration option: designed to optimize re-entrant

application code originally developed in high-level languages.

16

Page 17: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Enhanced CCP Module

In PWM mode, this module provides: 1, 2 or 4 modulated outputs for

controlling half-bridge and full-bridge drivers.

Auto-shutdown: for disabling PWM outputs on interrupt, or

other select conditions, and auto-restart to reactivate outputs once the

condition has cleared.17

Page 18: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Enhanced Addressable USART

Standard RS-232 operation Provides support for the LIN bus protocol. Automatic baud rate detection A 16-bit Baud Rate Generator for improved

resolution. Provides stable operation that talk to the outside

world.

18

Page 19: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

10-Bit A/D Converter

This module incorporates programmable acquisition time.

Allowing for a channel to be selected A conversion to be initiated without waiting for a

sampling period Reducing code overhead.

19

Page 20: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Extended Watchdog Timer (WDT)

Incorporates a 16-bit prescaler allowing an extended time-out range stable across operating voltage and

temperature.

20

Page 21: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Device Features

21

Page 22: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

Block Diagram

22

Page 23: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

PORTA

23

X RA1 / AN1

X RA0 / AN0

X RA3 / AN3 / Vref +

X RA2 / AN2 /Vref - / cvREF

X RA5 / AN5/SS/

X RA4 / TOCK / C1OUT

X OSC1/CLK1 / RA7 AN0

X OSC2 / CLK0/ RA6

PIC

PORTA is a bidirectional I/O port

Page 24: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

PORTB

24

X RB1 / INT1/AN10

X RB0 / NT0/FLTO/AN12

X RB3 / AN9 / CCP2

X RB2 / INT2 / AN8

X RB5 / KB1/ PGM

X RB4 / KB0 / AN11

X RB7C/CKB3 / PGO

X RB6 / KB2 / PGC

PIC

PORTB is a bidirectional I/O port

Page 25: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

PORTC

25

X RC1 / T1OS /CCP2

X RC0 /T1OS0 /T13CK1

X RC3 /SCK/SCL

X RC2 / CCP1 /P1A

X RC5 / SD0

X RC4 / SO1 /SDA

X RC7 /RX /DT

X RC6 /TX /CK

PIC

PORTC is a bidirectional I/O port

Page 26: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

PORTD

26

X RD5 / PSP5 /P1B

X RD0 /PSP0;RD4 / PSP4

X RD7 / PSP7 / P1D

X RD6 / PSP6/ P1CPIC

PORTD is a bidirectional I/O port or a Parallel Slave port

Page 27: Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.

PORTE

27

X RE1 /WR / AN6

X RE0 /RD / AN5

X MCLR / Vpp / RE3

X RE2 / CS / AN7

PIC

PORTE is a bidirectional I/O port