PIC18LF2539T-I/SO Microchip Technology, PIC18LF2539T-I/SO Datasheet - Page 125

IC MCU FLASH 12KX16 EE AD 28SOIC

PIC18LF2539T-I/SO

Manufacturer Part Number
PIC18LF2539T-I/SO
Description
IC MCU FLASH 12KX16 EE AD 28SOIC
Manufacturer
Microchip Technology
Series
PIC® 18Fr

Specifications of PIC18LF2539T-I/SO

Core Processor
PIC
Core Size
8-Bit
Speed
40MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, LVD, POR, PWM, WDT
Number Of I /o
21
Program Memory Size
24KB (12K x 16)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
1408 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 5x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-SOIC (7.5mm Width)
Processor Series
PIC18LF
Core
PIC
Data Bus Width
8 bit
Data Ram Size
1408 B
Interface Type
I2C, SPI, AUSART
Maximum Clock Frequency
40 MHz
Number Of Programmable I/os
21
Number Of Timers
16 bit
Operating Supply Voltage
2 V to 5.5 V
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
DV164005, DV164136
Minimum Operating Temperature
- 40 C
On-chip Adc
5 bit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
15.0
PIC18FXX39 devices are equipped with two 10-bit
PWM modules. Each contains a register pair
(CCPxH:CCPxL), which operates as a Master/Slave
Duty Cycle register, and a control register (CCPxCON).
The modules use Timer2 (Section 12.0) as their time-
base reference. Figure 15-1 shows a simplified block
diagram of the module’s operation.
This section gives a brief overview of PWM operation
as
(Section 14.0). Operation is described with respect to
PWM1, but is equally applicable to PWM2.
15.1
In Pulse Width Modulation, each PWM pin produces a
PWM output with a resolution of up to 10 bits.
A PWM output (Figure 15-2) has a time-base (period)
and a time that the output stays high (duty cycle). The
frequency of the PWM is the inverse of the period
(1/period).
FIGURE 15-1:
 2002 Microchip Technology Inc.
Note:
CCPR1H (Slave)
Note 1: 8-bit timer is concatenated with 2-bit internal Q
Comparator
Duty Cycle Registers
controlled
TMR2
Comparator
PR2
CCPR1L
PULSE WIDTH MODULATION
(PWM) MODULES
PWM Mode
The PWM modules are used exclusively
by the Motor Control module. As such, they
are not available to users as a separate
resource. Although their locations are
shown on the device data memory maps,
users should not modify the values of
these registers.
clock, or 2 bits of the prescaler to create a
10-bit time-base.
by
(1)
Clear Timer,
PWM1 pin and
latch Duty Cycle
the
SIMPLIFIED PWM BLOCK
DIAGRAM
Motor
CCP1CON<5:4>
R
S
Q
Control
PWM1
module
Preliminary
FIGURE 15-2:
15.1.1
The PWM period is specified when the Motor Control
module is initialized. The PWM period can be
calculated using the formula:
PWM frequency is defined as 1 / [PWM period].
The API method void ProMPT_Init (page 118)
sets the required PWM frequency in the application.
The parameter PWMfrequency determines the operat-
ing frequency of the module. When it is ‘0’, the PWM
frequency set in the Motor Control module is 9.75 kHz;
when it is ‘1’, the set PWM frequency is 19.53 kHz.
When TMR2 is equal to PR2, the following three events
occur on the next increment cycle:
• TMR2 is cleared
• The PWM1 pin is set (exception: if PWM duty
• The PWM duty cycle is latched from CCPR1L into
cycle = 0%, the PWM1 pin will not be set)
CCPR1H
Note:
PWM period = [(PR2) + 1] • 4 • T
TMR2 = PR2
Duty Cycle
The Timer2 postscaler (see Section 12.0)
is not used in the determination of the
PWM frequency. The postscaler could be
used to have a servo update rate at a
different frequency than the PWM output.
PWM PERIOD
Period
TMR2 = Duty Cycle
(TMR2 prescale value)
PIC18FXX39
PWM OUTPUT
TMR2 = PR2
DS30485A-page 123
OSC

Related parts for PIC18LF2539T-I/SO