ATmega128A Atmel Corporation, ATmega128A Datasheet - Page 104

no-image

ATmega128A

Manufacturer Part Number
ATmega128A
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega128A

Flash (kbytes)
128 Kbytes
Pin Count
64
Max. Operating Frequency
16 MHz
Cpu
8-bit AVR
# Of Touch Channels
16
Hardware Qtouch Acquisition
No
Max I/o Pins
53
Ext Interrupts
8
Usb Speed
No
Usb Interface
No
Spi
1
Twi (i2c)
1
Uart
2
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
8
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Resistive Touch Screen
No
Temp. Sensor
No
Crypto Engine
No
Sram (kbytes)
4
Eeprom (bytes)
4096
Self Program Memory
YES
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-40 to 85
I/o Supply Class
2.7 to 5.5
Operating Voltage (vcc)
2.7 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
4
Output Compare Channels
8
Input Capture Channels
2
Pwm Channels
7
32khz Rtc
Yes
Calibrated Rc Oscillator
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATmega128A XC6SLXFGG484CTV BCM7366ZBK W2SG0008I-T
Manufacturer:
XILINX
0
Part Number:
ATmega128A-16AU
Manufacturer:
ATMEL
Quantity:
6
Part Number:
ATmega128A-16AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
ATmega128A-16AU
Quantity:
100
Part Number:
ATmega128A-16MU
Quantity:
10
Part Number:
ATmega128A-AN
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega128A-ANR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega128A-AU
Manufacturer:
ATMEL
Quantity:
9 000
Part Number:
ATmega128A-AU
Manufacturer:
ATMEL
Quantity:
3 480
Part Number:
ATmega128A-AU
Manufacturer:
ATMEL
Quantity:
3 512
Part Number:
ATmega128A-AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega128A-AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
ATmega128A-AU
Quantity:
6 944
Part Number:
ATmega128A-AUR
Manufacturer:
ATMEL
Quantity:
3 000
Part Number:
ATmega128A-AUR
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
14.9
8151H–AVR–02/11
Asynchronous Operation of Timer/Counter0
Figure 14-11. Timer/Counter Timing Diagram, Clear Timer on Compare Match Mode, with Pres-
When Timer/Counter0 operates asynchronously, some considerations must be taken.
• Warning: When switching between asynchronous and synchronous clocking of
1. Disable the Timer/Counter0 interrupts by clearing OCIE0 and TOIE0.
2. Select clock source by setting AS0 as appropriate.
3. Write new values to TCNT0, OCR0, and TCCR0.
4. To switch to asynchronous operation: Wait for TCN0UB, OCR0UB, and TCR0UB.
5. Clear the Timer/Counter0 interrupt flags.
6. Enable interrupts, if needed.
• The Oscillator is optimized for use with a 32.768 kHz watch crystal. Applying an external
• When writing to one of the registers TCNT0, OCR0, or TCCR0, the value is transferred to a
• When entering Power-save or Extended Standby mode after having written to TCNT0,
Timer/Counter0, the Timer Registers TCNT0, OCR0, and TCCR0 might be corrupted. A safe
procedure for switching clock source is:
clock to the TOSC1 pin may result in incorrect Timer/Counter0 operation. The CPU main
clock frequency must be more than four times the Oscillator frequency.
temporary register, and latched after two positive edges on TOSC1. The user should not
write a new value before the contents of the Temporary Register have been transferred to its
destination. Each of the three mentioned registers have their individual temporary register,
which means that, for example, writing to TCNT0 does not disturb an OCR0 write in progress.
To detect that a transfer to the destination register has taken place, the Asynchronous Status
Register – ASSR has been implemented.
OCR0, or TCCR0, the user must wait until the written register has been updated if
Timer/Counter0 is used to wake up the device. Otherwise, the MCU will enter sleep mode
before the changes are effective. This is particularly important if the Output Compare0
interrupt is used to wake up the device, since the output compare function is disabled during
writing to OCR0 or TCNT0. If the write cycle is not finished, and the MCU enters sleep mode
before the OCR0UB bit returns to zero, the device will never receive a compare match
interrupt, and the MCU will not wake up.
TCNTn
(clk
(CTC)
OCRn
OCFn
clk
clk
I/O
I/O
Tn
/8)
caler (f
clk_I/O
TOP - 1
/8)
TOP
TOP
BOTTOM
ATmega128A
BOTTOM + 1
104

Related parts for ATmega128A