欢迎访问ic37.com |
会员登录 免费注册
发布采购

ATMEGA2560-16AU-SL383 参数 Datasheet PDF下载

ATMEGA2560-16AU-SL383图片预览
型号: ATMEGA2560-16AU-SL383
PDF下载: 下载PDF文件 查看货源
内容描述: [Microcontroller, 8-Bit, FLASH, AVR RISC CPU, 16MHz, CMOS, PQFP100, 14 X 14 MM, 1 MM HEIGHT, 0.50 MM PITCH, GREEN, PLASTIC, MS-026AED, TQFP-100]
分类和应用: 时钟微控制器
文件页数/大小: 448 页 / 7518 K
品牌: ATMEL [ ATMEL ]
 浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第177页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第178页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第179页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第180页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第182页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第183页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第184页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第185页  
ATmega640/1280/1281/2560/2561  
The Timer/Counter Overflow Flag (TOV2) is set each time the counter reaches BOTTOM. The  
Interrupt Flag can be used to generate an interrupt each time the counter reaches the BOTTOM  
value.  
In phase correct PWM mode, the compare unit allows generation of PWM waveforms on the  
OC2x pin. Setting the COM2x1:0 bits to two will produce a non-inverted PWM. An inverted PWM  
output can be generated by setting the COM2x1:0 to three. TOP is defined as 0xFF when  
WGM2:0 = 3, and OCR2A when MGM2:0 = 7 (See Table 20-4 on page 189). The actual OC2x  
value will only be visible on the port pin if the data direction for the port pin is set as output. The  
PWM waveform is generated by clearing (or setting) the OC2x Register at the compare match  
between OCR2x and TCNT2 when the counter increments, and setting (or clearing) the OC2x  
Register at compare match between OCR2x and TCNT2 when the counter decrements. The  
PWM frequency for the output when using phase correct PWM can be calculated by the follow-  
ing equation:  
f
clk_I/O  
f
= -----------------  
OCnxPCPWM  
N 510  
The N variable represents the prescale factor (1, 8, 32, 64, 128, 256, or 1024).  
The extreme values for the OCR2A Register represent special cases when generating a PWM  
waveform output in the phase correct PWM mode. If the OCR2A is set equal to BOTTOM, the  
output will be continuously low and if set equal to MAX the output will be continuously high for  
non-inverted PWM mode. For inverted PWM the output will have the opposite logic values.  
At the very start of period 2 in Figure 20-5 OCnx has a transition from high to low even though  
there is no Compare Match. The point of this transition is to guarantee symmetry around BOT-  
TOM. There are two cases that give a transition without Compare Match.  
OCR2A changes its value from MAX, like in Figure 20-5. When the OCR2A value is MAX the  
OCn pin value is the same as the result of a down-counting compare match. To ensure  
symmetry around BOTTOM the OCn value at MAX must correspond to the result of an up-  
counting Compare Match.  
The timer starts counting from a value higher than the one in OCR2A, and for that reason  
misses the Compare Match and hence the OCn change that would have happened on the  
way up.  
20.5 Output Compare Unit  
The 8-bit comparator continuously compares TCNT2 with the Output Compare Register  
(OCR2A and OCR2B). Whenever TCNT2 equals OCR2A or OCR2B, the comparator signals a  
match. A match will set the Output Compare Flag (OCF2A or OCF2B) at the next timer clock  
cycle. If the corresponding interrupt is enabled, the Output Compare Flag generates an Output  
Compare interrupt. The Output Compare Flag is automatically cleared when the interrupt is exe-  
cuted. Alternatively, the Output Compare Flag can be cleared by software by writing a logical  
one to its I/O bit location. The Waveform Generator uses the match signal to generate an output  
according to operating mode set by the WGM22:0 bits and Compare Output mode (COM2x1:0)  
bits. The max and bottom signals are used by the Waveform Generator for handling the special  
cases of the extreme values in some modes of operation (“Modes of Operation” on page 177).  
Figure 17-9 on page 156 shows a block diagram of the Output Compare unit.  
181  
2549L–AVR–08/07  
 复制成功!