PIC18F45K20-I/ML Microchip Technology, PIC18F45K20-I/ML Datasheet - Page 72

IC PIC MCU FLASH 16KX16 44QFN

PIC18F45K20-I/ML

Manufacturer Part Number
PIC18F45K20-I/ML
Description
IC PIC MCU FLASH 16KX16 44QFN
Manufacturer
Microchip Technology
Series
PIC® XLP™ 18Fr

Specifications of PIC18F45K20-I/ML

Program Memory Type
FLASH
Program Memory Size
32KB (16K x 16)
Package / Case
44-QFN
Core Processor
PIC
Core Size
8-Bit
Speed
64MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, HLVD, POR, PWM, WDT
Number Of I /o
35
Eeprom Size
256 x 8
Ram Size
1.5K x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 3.6 V
Data Converters
A/D 14x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Processor Series
PIC18F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
1.5 KB
Interface Type
CCP/ECCP/EUSART/I2C/MSSP/SPI
Maximum Clock Frequency
64 MHz
Number Of Programmable I/os
36
Number Of Timers
4
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
3rd Party Development Tools
52715-96, 52716-328, 52717-734, 52712-325, EWPIC18
Development Tools By Supplier
PG164130, DV164035, DV244005, DV164005, PG164120, DV164136
Minimum Operating Temperature
- 40 C
On-chip Adc
14-ch x 10-bit
Package
44QFN EP
Device Core
PIC
Family Name
PIC18
Maximum Speed
64 MHz
Operating Supply Voltage
2.5|3.3 V
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
DM240313 - BOARD DEMO 8BIT XLPAC164112 - VOLTAGE LIMITER MPLAB ICD2 VPPDM164124 - KIT STARTER FOR PIC18F4XK20AC164322 - MODULE SOCKET MPLAB PM3 28/44QFN
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
PICkit™ 3 Debug Express
3.12
FIGURE 3-58:
DS41370C-page 68
LESSON 12: USING THE CCP MODULE PWM
This lesson gives a brief introduction to using the Pulse Width Modulation (PWM)
functionality of the Capture/Compare/PWM (CCP) peripheral of the PIC18F45K20.
3.12.1
In short, Pulse Width Modulation is a square wave of a given frequency where the duty
cycle of the period is varied. The duty cycle is a ratio of how long the signal is high to
the total length of the period. For example, a waveform with a frequency of 250 Hz has
a period of 4ms. For a PWM signal with a 25% duty cycle, the waveform would be high
for 1ms and low for 3ms (and then repeat). A PWM signal with 50% duty is high for 2ms
and low for 2ms, while a 75% duty cycle would be high for 3ms and low for 1ms.
EXAMPLE PWM DUTY CYCLES
Pulse Width modulation is used in a variety of applications, including communications,
motor control, audio and analog outputs, and lighting. In this lesson, the brightness of
a demo board LED will be controlled with the output of the PWM. The LED is only on
during the high portion of the PWM period, and is off during the low period. As the duty
cycle is decreased, the LED is on for a shorter and shorter portion of the PWM period,
so it appears dimmer. The frequency is set high enough that the human eye cannot
detect the individual blinks of each period, but sees the LED light as continuously on.
3.12.2
Timer2 is used to set the period, or frequency, of the PWM waveform. Timer2 operation
is very similar to Timer0 discussed in Lesson 5, with a few differences. Namely, Timer2
is always an 8-bit timer.
Key Concepts
- The PWM time base (frequency) is determined by Timer2 and the PR2
- PWM operation of the CCP module is selected in the CCPxCON SFR.
- Up to 10 bits of resolution are possible, with the 8 MSbs of the duty cycle in
- The actual amount of duty cycle resolution depends on the value of the PR2
Special Function Register.
CCPRxL, and the 2 LSBs in CCPxCON.
register.
PWM Overview
Using the CCP Module
© 2009 Microchip Technology Inc.

Related parts for PIC18F45K20-I/ML