CHAPTER 8 8-BIT TIMER/EVENT COUNTERS 2 TO 5
User’s Manual U15905EJ2V1UD
241
(1) 8-bit timer counters 2 to 5 (TM2 to TM5)
The TMn register is an 8-bit read-only register that counts the count pulses.
The counter is incremented in synchronization with the rising edge of the count clock.
TM2 and TM3, and TM4 and TM5 can be used as 16-bit timers when they are connected in cascade. When
these timers are used as 16-bit timers, their values can be read by using a 16-bit memory manipulation
instruction. However, because these registers are connected by an internal 8-bit bus, the TMm register and
TMm+1 register must be read divided into two times. Therefore, read these registers twice and compare the
values, taking into consideration that the reading occurs during a count change.
In the following cases, the count value becomes 00H.
After reset
When the TMCEn bit of 8-bit timer mode control register n (TMCn) is cleared
TMn register and CRn register match in the mode in which clear & start occurs on a match between the TMn
register and 8-bit timer compare register n (CRn)
Caution
When connected in cascade, these registers become 00H even when the TCEm bit in the
lowest timer (TMm) is cleared.
Remark
n = 2 to 5
m = 2, 4
(2) 8-bit timer compare registers 2 to 5 (CR2 to CR5)
The CRn register can be read and written in 8-bit units.
In a mode other than the PWM mode, the value set to the CRn register is always compared to the count value
of 8-bit counter n (TMn), and if the two values match, an interrupt request signal (INTTMn) is generated.
In the PWM mode, TMn register overflow causes the TOn pin output to change to the active level, and when
the values of the TMn register and the CRn register match, the TOn pin output changes to the inactive level.
The value of the CRn register can be set in the range of 00H to FFH.
When TM2 and TM3, and TM4 and TM5 are connected in cascade as 16-bit timers, the CRm register and
CRm+1 register function as 16-bit timer compare registers 23 and 45 (CR23 and CR45). The counter value
and register value are compared in 16-bit lengths, and if they match, an interrupt request (INTTMm) is
generated.
Cautions 1. In the mode in which clear & start occurs upon a match of the TMn register and CRn
register (TMCn6 =0), do not write a different value to the CRn register during the count
operation.
2. In the PWM mode, set the CRn register rewrite interval to three or more count clocks
(clock selected with timer clock selection register n (TCLn)).
3. Before changing the value of the CRn register when using a cascade connection, be sure
to stop the timer operation.
Remark
n = 2 to 5
m = 2, 4
相关PDF资料
PIC18LF1220T-I/ML IC MCU FLASH 2KX16 EEPROM 28QFN
PIC18LF1220T-I/SO IC MCU FLASH 2KX16 EEPROM 18SOIC
PIC16F716-I/SS IC PIC MCU FLASH 2KX14 20SSOP
PIC18F1320T-E/ML IC MCU FLASH 4KX16 EEPROM 28QFN
PIC16LF87T-I/ML IC MCU FLASH 4KX14 EEPROM 28QFN
PIC18F25J10-I/SS IC PIC MCU FLASH 16KX16 28SSOP
PIC16F88T-E/SS IC MCU FLASH 4KX14 EEPROM 20SSOP
PIC16C621A-04/SO IC MCU OTP 1KX14 COMP 18SOIC
相关代理商/技术参数
PIC24F08KL301T-I/MQ 功能描述:16位微控制器 - MCU 8KB FLASH 1KB RAM 512B 3V 10-BIT ADC RoHS:否 制造商:Texas Instruments 核心:RISC 处理器系列:MSP430FR572x 数据总线宽度:16 bit 最大时钟频率:24 MHz 程序存储器大小:8 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:2 V to 3.6 V 工作温度范围:- 40 C to + 85 C 封装 / 箱体:VQFN-40 安装风格:SMD/SMT
PIC24F08KL301T-I/SO 功能描述:16位微控制器 - MCU 8KB FLASH 1KB RAM 512B 3V 10-BIT ADC RoHS:否 制造商:Texas Instruments 核心:RISC 处理器系列:MSP430FR572x 数据总线宽度:16 bit 最大时钟频率:24 MHz 程序存储器大小:8 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:2 V to 3.6 V 工作温度范围:- 40 C to + 85 C 封装 / 箱体:VQFN-40 安装风格:SMD/SMT
PIC24F08KL301T-I/SS 功能描述:16位微控制器 - MCU 8KB FLASH 1KB RAM 512B 3V 10-BIT ADC RoHS:否 制造商:Texas Instruments 核心:RISC 处理器系列:MSP430FR572x 数据总线宽度:16 bit 最大时钟频率:24 MHz 程序存储器大小:8 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:2 V to 3.6 V 工作温度范围:- 40 C to + 85 C 封装 / 箱体:VQFN-40 安装风格:SMD/SMT
PIC24F08KL302 制造商:MICROCHIP 制造商全称:Microchip Technology 功能描述:Low-Power, Low-Cost, General Purpose 16-Bit Flash Microcontrollers with nanoWatt XLP Technology
PIC24F08KL302-I/ML 功能描述:16位微控制器 - MCU 8KB FLASH 1KB RAM 256B 3V RoHS:否 制造商:Texas Instruments 核心:RISC 处理器系列:MSP430FR572x 数据总线宽度:16 bit 最大时钟频率:24 MHz 程序存储器大小:8 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:2 V to 3.6 V 工作温度范围:- 40 C to + 85 C 封装 / 箱体:VQFN-40 安装风格:SMD/SMT
PIC24F08KL302-I/MQ 功能描述:16位微控制器 - MCU 8KB FL 1KB RAM 256B 3V RoHS:否 制造商:Texas Instruments 核心:RISC 处理器系列:MSP430FR572x 数据总线宽度:16 bit 最大时钟频率:24 MHz 程序存储器大小:8 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:2 V to 3.6 V 工作温度范围:- 40 C to + 85 C 封装 / 箱体:VQFN-40 安装风格:SMD/SMT
PIC24F08KL302-I/SO 功能描述:16位微控制器 - MCU 8KB FLASH 1KB RAM 256B 3V RoHS:否 制造商:Texas Instruments 核心:RISC 处理器系列:MSP430FR572x 数据总线宽度:16 bit 最大时钟频率:24 MHz 程序存储器大小:8 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:2 V to 3.6 V 工作温度范围:- 40 C to + 85 C 封装 / 箱体:VQFN-40 安装风格:SMD/SMT
PIC24F08KL302-I/SP 功能描述:16位微控制器 - MCU 8KB FLASH 1KB RAM 256B 3V RoHS:否 制造商:Texas Instruments 核心:RISC 处理器系列:MSP430FR572x 数据总线宽度:16 bit 最大时钟频率:24 MHz 程序存储器大小:8 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:2 V to 3.6 V 工作温度范围:- 40 C to + 85 C 封装 / 箱体:VQFN-40 安装风格:SMD/SMT