欢迎访问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文件第61页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第62页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第63页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第64页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第66页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第67页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第68页浏览型号ATMEGA2560-16AU-SL383的Datasheet PDF文件第69页  
ATmega640/1280/1281/2560/2561  
Assembly Code Example(1)  
WDT_off:  
; Turn off global interrupt  
cli  
; Reset Watchdog Timer  
wdr  
; Clear WDRF in MCUSR  
in  
andi r16, (0xff & (0<<WDRF))  
out MCUSR, r16  
r16, MCUSR  
; Write logical one to WDCE and WDE  
; Keep old prescaler setting to prevent unintentional time-out  
ldi r16, WDTCSR  
ori  
r16, (1<<WDCE) | (1<<WDE)  
sts WDTCSR, r16  
; Turn off WDT  
ldi  
r16, (0<<WDE)  
sts WDTCSR, r16  
; Turn on global interrupt  
sei  
ret  
C Code Example(1)  
void WDT_off(void)  
{
__disable_interrupt();  
__watchdog_reset();  
/* Clear WDRF in MCUSR */  
MCUSR &= ~(1<<WDRF);  
/* Write logical one to WDCE and WDE */  
/* Keep old prescaler setting to prevent unintentional time-out  
*/  
WDTCSR |= (1<<WDCE) | (1<<WDE);  
/* Turn off WDT */  
WDTCSR = 0x00;  
__enable_interrupt();  
}
Note:  
1. The example code assumes that the part specific header file is included.  
2. If the Watchdog is accidentally enabled, for example by a runaway pointer or brown-out condi-  
tion, the device will be reset and the Watchdog Timer will stay enabled. If the code is not set up  
to handle the Watchdog, this might lead to an eternal loop of time-out resets. To avoid this sit-  
uation, the application software should always clear the Watchdog System Reset Flag  
(WDRF) and the WDE control bit in the initialisation routine, even if the Watchdog is not in use.  
The following code example shows one assembly and one C function for changing the time-out  
value of the Watchdog Timer.  
65  
2549L–AVR–08/07  
 复制成功!