ATMEGA48-20PJ Atmel, ATMEGA48-20PJ Datasheet - Page 90

IC AVR MCU 4K 5V 20MHZ 28-DIP

ATMEGA48-20PJ

Manufacturer Part Number
ATMEGA48-20PJ
Description
IC AVR MCU 4K 5V 20MHZ 28-DIP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheets

Specifications of ATMEGA48-20PJ

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 6x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-DIP (0.300", 7.62mm)
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
ATMEGA48-24PJ
ATMEGA48-24PJ
14.3
14.4
90
Timer/Counter Clock Sources
Counter Unit
ATmega48/88/168
The Timer/Counter can be clocked internally, via the prescaler, or by an external clock source on
the T0 pin. The Clock Select logic block controls which clock source and edge the Timer/Counter
uses to increment (or decrement) its value. The Timer/Counter is inactive when no clock source
is selected. The output from the Clock Select logic is referred to as the timer clock (clk
The double buffered Output Compare Registers (OCR0A and OCR0B) are compared with the
Timer/Counter value at all times. The result of the compare can be used by the Waveform Gen-
erator to generate a PWM or variable frequency output on the Output Compare pins (OC0A and
OC0B).
event will also set the Compare Flag (OCF0A or OCF0B) which can be used to generate an Out-
put Compare interrupt request.
The Timer/Counter can be clocked by an internal or an external clock source. The clock source
is selected by the Clock Select logic which is controlled by the Clock Select (CS02:0) bits
located in the Timer/Counter Control Register (TCCR0B). For details on clock sources and pres-
caler, see
The main part of the 8-bit Timer/Counter is the programmable bi-directional counter unit.
14-2
Figure 14-2. Counter Unit Block Diagram
Signal description (internal signals):
Depending of the mode of operation used, the counter is cleared, incremented, or decremented
at each timer clock (clk
selected by the Clock Select bits (CS02:0). When no clock source is selected (CS02:0 = 0) the
timer is stopped. However, the TCNT0 value can be accessed by the CPU, regardless of
whether clk
count operations.
shows a block diagram of the counter and its surroundings.
count
direction
clear
clk
top
bottom
See “Using the Output Compare Unit” on page 117.
Tn
“Timer/Counter0 and Timer/Counter1 Prescalers” on page
T0
is present or not. A CPU write overrides (has priority over) all counter clear or
DATA BUS
TCNTn
T0
). clk
Increment or decrement TCNT0 by 1.
Select between increment and decrement.
Clear TCNT0 (set all bits to zero).
Timer/Counter clock, referred to as clk
Signalize that TCNT0 has reached maximum value.
Signalize that TCNT0 has reached minimum value (zero).
T0
can be generated from an external or internal clock source,
direction
count
clear
bottom
Control Logic
top
TOVn
(Int.Req.)
clk
Tn
for details. The compare match
Clock Select
( From Prescaler )
Detector
Edge
T0
136.
in the following.
2545S–AVR–07/10
Tn
T0
).
Figure

Related parts for ATMEGA48-20PJ