參數(shù)資料
型號: MF280C51-30D
廠商: ATMEL CORP
元件分類: 微控制器/微處理器
英文描述: 8-BIT, MROM, 30 MHz, MICROCONTROLLER, PQFP44
封裝: QFP-44
文件頁數(shù): 110/176頁
文件大?。?/td> 2962K
代理商: MF280C51-30D
39
2535J–AVR–08/10
ATtiny13
The following code example shows one assembly and one C function for turning off the Watch-
dog Timer. The example assumes that interrupts are controlled (e.g. by disabling interrupts
globally) so that no interrupts will occur during the execution of these functions.
Note:
1. The example code assumes that the part specific header file is included.
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 situa-
Assembly Code Example(1)
WDT_off:
; Turn off global interrupt
cli
; Reset Watchdog Timer
wdr
; Clear WDRF in MCUSR
in
r16, MCUSR
andi
r16, (0xff - (1<<WDRF))
out
MCUSR, r16
; Write logical one to WDCE and WDE
; Keep old prescaler setting to prevent unintentional time-out
in
r16, WDTCR
ori
r16, (1<<WDCE) | (1<<WDE)
out
WDTCR, r16
; Turn off WDT
ldi
r16, (0<<WDE)
out
WDTCR, 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
*/
WDTCR |= (1<<WDCE) | (1<<WDE);
/* Turn off WDT */
WDTCR = 0x00;
__enable_interrupt();
}
相關(guān)PDF資料
PDF描述
MR80C32E-16P883 8-BIT, 16 MHz, MICROCONTROLLER, CQCC44
MR80C32E-16P883 8-BIT, 16 MHz, MICROCONTROLLER, CQCC44
MQ83C154DCXXX-25P883D 8-BIT, MROM, 25 MHz, MICROCONTROLLER, CQFP44
MR80C52EXXX-25:RD 8-BIT, MROM, 25 MHz, MICROCONTROLLER, CQCC44
MIP7365-450F17I 64-BIT, 450 MHz, MICROPROCESSOR, CQFP208
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MF283C151C-12 制造商:TEMIC 制造商全稱:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MF283C151C-16 制造商:TEMIC 制造商全稱:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MF283C151C-20 制造商:TEMIC 制造商全稱:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MF283C151C-25 制造商:TEMIC 制造商全稱:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MF283C151C-30 制造商:TEMIC 制造商全稱:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller