ATMEGA48-20AJ Atmel, ATMEGA48-20AJ Datasheet - Page 51

IC AVR MCU 4K 5V 20MHZ 32-TQFP

ATMEGA48-20AJ

Manufacturer Part Number
ATMEGA48-20AJ
Description
IC AVR MCU 4K 5V 20MHZ 32-TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheets

Specifications of ATMEGA48-20AJ

Core Processor
AVR
Core Size
8-Bit
Speed
20MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
23
Program Memory Size
4KB (2K x 16)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
2.7 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
32-TQFP, 32-VQFP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
ATMEGA48-24AJ
ATMEGA48-24AJ

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATMEGA48-20AJ
Manufacturer:
Atmel
Quantity:
10 000
2545S–AVR–07/10
The following code example shows one assembly and one C function for changing the time-out
value of the Watchdog Timer.
Note:
Note: The Watchdog Timer should be reset before any change of the WDP bits, since a change
in the WDP bits can result in a time-out when switching to a shorter time-out period.
Assembly Code Example
C Code Example
WDT_Prescaler_Change:
void WDT_Prescaler_Change(void)
{
}
; Turn off global interrupt
cli
; Reset Watchdog Timer
wdr
; Start timed sequence
lds r16, WDTCSR
ori
sts WDTCSR, r16
; --
; Set new prescaler(time-out) value = 64K cycles (~0.5 s)
ldi
sts WDTCSR, r16
; --
; Turn on global interrupt
sei
ret
__disable_interrupt();
__watchdog_reset();
/* Start timed
WDTCSR |= (1<<WDCE) | (1<<WDE);
/* Set new prescaler(time-out) value = 64K cycles (~0.5 s) */
WDTCSR
__enable_interrupt();
1.
See ”About Code Examples” on page 7.
r16, (1<<WDCE) | (1<<WDE)
Got four cycles to set the new values from here -
r16, (1<<WDE) | (1<<WDP2) | (1<<WDP0)
Finished setting new values, used 2 cycles -
= (1<<WDE) | (1<<WDP2) | (1<<WDP0);
(1)
(1)
equence */
ATmega48/88/168
51

Related parts for ATMEGA48-20AJ