ATMEGA16-16AU SL602 Atmel, ATMEGA16-16AU SL602 Datasheet - Page 44

no-image

ATMEGA16-16AU SL602

Manufacturer Part Number
ATMEGA16-16AU SL602
Description
Manufacturer
Atmel
Datasheet
2466T–AVR–07/10
The following code example shows one assembly and one C function for turning off the WDT.
The example assumes that interrupts are controlled (for example by disabling interrupts globally)
so that no interrupts will occur during execution of these functions.
Assembly Code Example
C Code Example
WDT_off:
void WDT_off(void)
{
}
; Reset WDT
WDR
; Write logical one to WDTOE and WDE
in
ori r16, (1<<WDTOE)|(1<<WDE)
out
; Turn off WDT
ldi
out
ret
/* Reset WDT*/
_WDR();
/* Write logical one to WDTOE and WDE */
WDTCR |= (1<<WDTOE) | (1<<WDE);
/* Turn off WDT */
WDTCR = 0x00;
r16, WDTCR
WDTCR, r16
r16, (0<<WDE)
WDTCR, r16
ATmega16(L)
44

Related parts for ATMEGA16-16AU SL602