dsPIC30F4011/4012
DS70135G-page 100
2010 Microchip Technology Inc.
15.1.4
DOUBLE UPDATE MODE
In the Double Update mode (PTMOD<1:0> = 11), an
interrupt event is generated each time the PTMR regis-
ter is equal to zero, as well as each time a period match
occurs. The postscaler selection bits have no effect in
this mode of the timer.
The Double Update mode provides two additional func-
tions to the user. First, the control loop bandwidth is
doubled because the PWM duty cycles can be
updated, twice per period. Second, asymmetrical
center-aligned PWM waveforms can be generated
which are useful for minimizing output waveform
distortion in certain motor control applications.
15.1.5
PWM TIME BASE PRESCALER
The input clock to PTMR (FOSC/4) has prescaler
options of 1:1, 1:4, 1:16 or 1:64, selected by control
bits, PTCKPS<1:0>, in the PTCON SFR. The prescaler
counter is cleared when any of the following occurs:
A write to the PTMR register
A write to the PTCON register
Any device Reset
The PTMR register is not cleared when PTCON is
written.
15.1.6
PWM TIME BASE POSTSCALER
The match output of PTMR can optionally be post-
scaled through a 4-bit postscaler (which gives a 1:1 to
1:16 scaling).
The postscaler counter is cleared when any of the
following occurs:
A write to the PTMR register
A write to the PTCON register
Any device Reset
The PTMR register is not cleared when the PTCON
register is written.
15.2
PWM Period
PTPER is a 15-bit register and is used to set the
counting period for the PWM time base. PTPER is a
double-buffered register. The PTPER buffer contents
are loaded into the PTPER register at the following
instants:
Free-Running and Single-Shot modes: When the
PTMR register is reset to zero after a match with
the PTPER register.
Continuous Up/Down Count modes: When the
PTMR register is zero.
The value held in the PTPER buffer is automatically
loaded into the PTPER register when the PWM time
base is disabled (PTEN = 0).
The
PWM
period
can
be
determined
using
EQUATION 15-1:
PWM PERIOD
If the PWM time base is configured for one of the
Continuous Up/Down Count modes, the PWM period is
provided by Equation 15-2.
EQUATION 15-2:
PWM PERIOD
(CENTER-ALIGNED
MODE)
The maximum resolution (in bits) for a given device
oscillator and PWM frequency can be determined using
EQUATION 15-3:
PWM RESOLUTION
Note:
Programming a value of 0x0001 in the
Period
register
could
generate
a
continuous interrupt pulse, and hence,
must be avoided.
TPWM = TCY
(PTPER + 1) PTMR Prescale Value
TPWM = TCY
2 PTPER + 1) PTMR Prescale Value
Resolution =
log (2
TPWM/TCY)
log (2)
相关PDF资料
DSPIC33FJ64MC204-E/PT IC DSPIC MCU/DSP 64K 44-TQFP
DSPIC30F4012-30I/SO IC DSPIC MCU/DSP 48K 28SOIC
HM2H08P117LF HM2H08P117LF SHROUD STYLE B LF
PIC18LF4423-I/ML IC PIC MCU FLASH 8KX16 44QFN
ATTINY44V-10PU IC MCU AVR 4K FLASH 10MHZ 14-DIP
PIC16F77-I/P IC MCU FLASH 8KX14 A/D 40DIP
MP2-HS024-43 CONN SHROUD 2-FB 24POS 4ROW
ATTINY44V-10MU IC MCU AVR 4K FLASH 10MHZ 20-QFN
相关代理商/技术参数
DSPIC30F4012-20I/SP 功能描述:数字信号处理器和控制器 - DSP, DSC 16 Bit MCU/DSP 28LD 20M 48KB FL RoHS:否 制造商:Microchip Technology 核心:dsPIC 数据总线宽度:16 bit 程序存储器大小:16 KB 数据 RAM 大小:2 KB 最大时钟频率:40 MHz 可编程输入/输出端数量:35 定时器数量:3 设备每秒兆指令数:50 MIPs 工作电源电压:3.3 V 最大工作温度:+ 85 C 封装 / 箱体:TQFP-44 安装风格:SMD/SMT
DSPIC30F4012-20I/SP 制造商:Microchip Technology Inc 功能描述:16BIT MCU-DSP 20MHZ 30F4012 SDIL
DSPIC30F4012-30I/ML 功能描述:数字信号处理器和控制器 - DSP, DSC Motor Control RoHS:否 制造商:Microchip Technology 核心:dsPIC 数据总线宽度:16 bit 程序存储器大小:16 KB 数据 RAM 大小:2 KB 最大时钟频率:40 MHz 可编程输入/输出端数量:35 定时器数量:3 设备每秒兆指令数:50 MIPs 工作电源电压:3.3 V 最大工作温度:+ 85 C 封装 / 箱体:TQFP-44 安装风格:SMD/SMT
DSPIC30F4012-30I/SO 功能描述:数字信号处理器和控制器 - DSP, DSC 16 Bit MCU/DSP 28LD 30M 48KB FL RoHS:否 制造商:Microchip Technology 核心:dsPIC 数据总线宽度:16 bit 程序存储器大小:16 KB 数据 RAM 大小:2 KB 最大时钟频率:40 MHz 可编程输入/输出端数量:35 定时器数量:3 设备每秒兆指令数:50 MIPs 工作电源电压:3.3 V 最大工作温度:+ 85 C 封装 / 箱体:TQFP-44 安装风格:SMD/SMT
DSPIC30F4012-30I/SO 制造商:Microchip Technology Inc 功能描述:16- Bit Digital Signal Controller Memory
DSPIC30F4012-30I/SP 功能描述:数字信号处理器和控制器 - DSP, DSC 16B MCU/DSP 28LD 30M 48KB FL RoHS:否 制造商:Microchip Technology 核心:dsPIC 数据总线宽度:16 bit 程序存储器大小:16 KB 数据 RAM 大小:2 KB 最大时钟频率:40 MHz 可编程输入/输出端数量:35 定时器数量:3 设备每秒兆指令数:50 MIPs 工作电源电压:3.3 V 最大工作温度:+ 85 C 封装 / 箱体:TQFP-44 安装风格:SMD/SMT
DSPIC30F4012-30I/SP 制造商:Microchip Technology Inc 功能描述:16- Bit Digital Signal Controller Memory
dsPIC30F4012T-20E/ML 功能描述:数字信号处理器和控制器 - DSP, DSC 44LD 20MIPS 48 KB RoHS:否 制造商:Microchip Technology 核心:dsPIC 数据总线宽度:16 bit 程序存储器大小:16 KB 数据 RAM 大小:2 KB 最大时钟频率:40 MHz 可编程输入/输出端数量:35 定时器数量:3 设备每秒兆指令数:50 MIPs 工作电源电压:3.3 V 最大工作温度:+ 85 C 封装 / 箱体:TQFP-44 安装风格:SMD/SMT