欢迎访问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文件第145页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第146页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第147页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第148页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第150页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第151页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第152页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第153页  
ATmega640/1280/1281/2560/2561  
Note:  
1. The CTCn and PWMn1:0 bit definition names are obsolete. Use the WGMn2:0 definitions.  
However, the functionality and location of these bits are compatible with previous versions of  
the timer.  
For detailed timing information refer to “Timer/Counter Timing Diagrams” on page 156.  
17.9.1  
Normal Mode  
The simplest mode of operation is the Normal mode (WGMn3:0 = 0). In this mode the counting  
direction is always up (incrementing), and no counter clear is performed. The counter simply  
overruns when it passes its maximum 16-bit value (MAX = 0xFFFF) and then restarts from the  
BOTTOM (0x0000). In normal operation the Timer/Counter Overflow Flag (TOVn) will be set in  
the same timer clock cycle as the TCNTn becomes zero. The TOVn Flag in this case behaves  
like a 17th bit, except that it is only set, not cleared. However, combined with the timer overflow  
interrupt that automatically clears the TOVn Flag, the timer resolution can be increased by soft-  
ware. There are no special cases to consider in the Normal mode, a new counter value can be  
written anytime.  
The Input Capture unit is easy to use in Normal mode. However, observe that the maximum  
interval between the external events must not exceed the resolution of the counter. If the interval  
between events are too long, the timer overflow interrupt or the prescaler must be used to  
extend the resolution for the capture unit.  
The Output Compare units can be used to generate interrupts at some given time. Using the  
Output Compare to generate waveforms in Normal mode is not recommended, since this will  
occupy too much of the CPU time.  
17.9.2  
Clear Timer on Compare Match (CTC) Mode  
In Clear Timer on Compare or CTC mode (WGMn3:0 = 4 or 12), the OCRnA or ICRn Register  
are used to manipulate the counter resolution. In CTC mode the counter is cleared to zero when  
the counter value (TCNTn) matches either the OCRnA (WGMn3:0 = 4) or the ICRn (WGMn3:0 =  
12). The OCRnA or ICRn define the top value for the counter, hence also its resolution. This  
mode allows greater control of the compare match output frequency. It also simplifies the opera-  
tion of counting external events.  
The timing diagram for the CTC mode is shown in Figure 17-6. The counter value (TCNTn)  
increases until a compare match occurs with either OCRnA or ICRn, and then counter (TCNTn)  
is cleared.  
Figure 17-6. CTC Mode, Timing Diagram  
OCnA Interrupt Flag Set  
or ICFn Interrupt Flag Set  
(Interrupt on TOP)  
TCNTn  
OCnA  
(Toggle)  
(COMnA1:0 = 1)  
1
2
3
4
Period  
149  
2549L–AVR–08/07  
 复制成功!