ATmega128A Atmel Corporation, ATmega128A Datasheet - Page 224

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
21.7.5
Table 21-6.
21.7.6
8151H–AVR–02/11
Status Code
(TWSR)
Prescaler Bits
are 0
$F8
$00
Miscellaneous States
Combining Several TWI Modes
Status of the Two-wire Serial
Bus and Two-wire Serial Inter-
face Hardware
No relevant state information
available; TWINT = “0”
Bus error due to an illegal
START or STOP condition
Miscellaneous States
Figure 21-17. Formats and States in the Slave Transmitter Mode
There are two status codes that do not correspond to a defined TWI state, see
Status $F8 indicates that no relevant information is available because the TWINT flag is not set.
This occurs between other states, and when the TWI is not involved in a serial transfer.
Status $00 indicates that a bus error has occurred during a Two-wire Serial Bus transfer. A bus
error occurs when a START or STOP condition occurs at an illegal position in the format frame.
Examples of such illegal positions are during the serial transfer of an address byte, a data byte,
or an acknowledge bit. When a bus error occurs, TWINT is set. To recover from a bus error, the
TWSTO flag must set and TWINT must be cleared by writing a logic one to it. This causes the
TWI to enter the not addressed slave mode and to clear the TWSTO flag (no other bits in TWCR
are affected). The SDA and SCL lines are released, and no STOP condition is transmitted.
In some cases, several TWI modes must be combined in order to complete the desired action.
Consider for example reading data from a serial EEPROM. Typically, such a transfer involves
the following steps:
1. The transfer must be initiated
2. The EEPROM must be instructed what location should be read
3. The reading must be performed
4. The transfer must be finished
Reception of the
own slave address
and one or
more data bytes
Arbitration lost as master
and addressed as slave
Last data byte transmitted.
Switched to not addressed
slave (TWEA = '0')
Application Software Response
To/from TWDR
No TWDR action
No TWDR action
From master to slave
From slave to master
S
SLA
To TWCR
STA
No TWCR action
0
R
DATA
STO
1
$A8
$B0
A
A
n
TWIN
T
1
A
TWE
DATA
A
X
Any number of data bytes
and their associated acknowledge bits
This number (contained in TWSR) corresponds
to a defined state of the Two-wire Serial Bus. The
prescaler bits are zero or masked to zero
tion is sent on the bus. In all cases, the bus is released
and TWSTO is cleared.
Wait or proceed current transfer
Only the internal hardware is affected, no STOP condi-
$B8
A
Next Action Taken by TWI Hardware
DATA
ATmega128A
$C0
$C8
A
A
P or S
All 1's
Table
P or S
21-6.
224

Related parts for ATmega128A