ATmega8HVA Atmel Corporation, ATmega8HVA Datasheet - Page 80

no-image

ATmega8HVA

Manufacturer Part Number
ATmega8HVA
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega8HVA

Flash (kbytes)
8 Kbytes
Pin Count
28
Max. Operating Frequency
4 MHz
Cpu
8-bit AVR
# Of Touch Channels
3
Hardware Qtouch Acquisition
No
Max I/o Pins
6
Ext Interrupts
3
Usb Speed
No
Usb Interface
No
Spi
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
6
Adc Resolution (bits)
12
Adc Speed (ksps)
1.9
Resistive Touch Screen
No
Temp. Sensor
Yes
Crypto Engine
No
Sram (kbytes)
0.5
Eeprom (bytes)
256
Self Program Memory
YES
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-20 to 85
I/o Supply Class
1.8 to 9.0
Operating Voltage (vcc)
1.8 to 9.0
Fpu
No
Mpu / Mmu
no / no
Timers
2
Output Compare Channels
4
Input Capture Channels
2
32khz Rtc
No
Calibrated Rc Oscillator
Yes
17.5
Table 17-2.
17.5.1
17.5.2
80
Mode
0
1
2
3
4
5
Modes of Operation
ATmega8HVA/16HVA
Normal 8-bit Mode
Clear Timer on Compare Match (CTC) 8-bit Mode
ICENn
0
0
0
0
1
1
Modes of Operation
TCWn
0
0
1
1
0
1
The mode of operation is defined by the Timer/Counter Width (TCWn), Input Capture Enable
(ICENn) and the Waveform Generation Mode (WGMn0)bits in
Control Register A” on page
In the normal mode, the counter (TCNTnL) is incrementing until it overruns when it passes its
maximum 8-bit value (MAX = 0xFF) and then restarts from the bottom (0x00), see
page 80
the TCNTnL becomes zero. The TOVn Flag in this case behaves like a ninth bit, except that it is
only set, not cleared. However, combined with the timer overflow interrupt that automatically
clears the TOVn Flag, the timer resolution can be increased by software. There are no special
cases to consider in the Normal 8-bit mode, a new counter value can be written anytime. The
Output Compare Unit can be used to generate interrupts at some given time.
In Clear Timer on Compare or CTC mode, the OCRnA Register is used to manipulate the
counter resolution, see
cleared to zero when the counter value (TCNTn) matches the OCRnA. The OCRnA defines the
top value for the counter, hence also its resolution. This mode allows greater control of the Com-
pare Match output frequency. It also simplifies the operation of counting external events.
The timing diagram for the CTC mode is shown in
(TCNTn) increases until a Compare Match occurs between TCNTn and OCRnA, and then
counter (TCNTn) is cleared.
WGMn0
0
1
0
1
0
0
for bit settings. The Overflow Flag (TOVn) will be set in the same timer clock cycle as
Timer/Counter Mode
Normal 8-bit Mode
8-bit CTC
16-bit Mode
16-bit CTC
8-bit Input Capture
mode
16-bit Input Capture
mode
of Operation
Table 17-2 on page 80
90.
Table 17-2 on page 80
OCRnB,
0xFFFF
0xFFFF
OCRnA
OCRnA
0xFF
0xFF
TOP
for bit settings. In CTC mode the counter is
Figure 17-3 on page
shows the different Modes of Operation.
Immediate
Immediate
Update of
Immediate
Immediate
OCRx at
”TCCRnA – Timer/Counter n
81. The counter value
MAX (0xFFFF)
MAX (0xFFFF)
MAX (0xFFFF)
MAX (0xFF)
MAX (0xFF)
MAX (0xFF)
TOV Flag
Set on
Table 17-2 on
8024A–AVR–04/08

Related parts for ATmega8HVA