ATMEGA128A-AN Atmel, ATMEGA128A-AN Datasheet - Page 218

IC MCU AVR 128K FLASH 64TQFP

ATMEGA128A-AN

Manufacturer Part Number
ATMEGA128A-AN
Description
IC MCU AVR 128K FLASH 64TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheets

Specifications of ATMEGA128A-AN

Core Processor
AVR
Core Size
8-Bit
Speed
16MHz
Connectivity
EBI/EMI, I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
53
Program Memory Size
128KB (64K x 16)
Program Memory Type
FLASH
Eeprom Size
4K x 8
Ram Size
4K 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
64-TQFP
Core
AVR8
Lead Free Status / RoHS Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATMEGA128A-AN
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA128A-ANR
Manufacturer:
Atmel
Quantity:
10 000
Table 21-3.
21.7.3
8151H–AVR–02/11
$48
$50
$58
Slave Receiver Mode
SLA+R has been transmitted;
NOT ACK has been received
Data byte has been received;
ACK has been returned
Data byte has been received;
NOT ACK has been returned
Status Codes for Master Receiver Mode
In the Slave Receiver mode, a number of data bytes are received from a master transmitter (see
Figure
zero or are masked to zero.
Figure 21-15. Data Transfer in Slave Receiver Mode
To initiate the Slave Receiver mode, TWAR and TWCR must be initialized as follows:
The upper seven bits are the address to which the Two-wire Serial Interface will respond when
addressed by a master. If the LSB is set, the TWI will respond to the general call address ($00),
otherwise it will ignore the general call address.
TWEN must be written to one to enable the TWI. The TWEA bit must be written to one to enable
the acknowledgment of the device’s own slave address or the general call address. TWSTA and
TWSTO must be written to zero.
When TWAR and TWCR have been initialized, the TWI waits until it is addressed by its own
slave address (or the general call address if enabled) followed by the data direction bit. If the
direction bit is “0” (write), the TWI will operate in SR mode, otherwise ST mode is entered. After
its own slave address and the write bit have been received, the TWINT flag is set and a valid
status code can be read from TWSR. The status code is used to determine the appropriate soft-
ware action. The appropriate action to be taken for each status code is detailed in
TWAR
value
TWCR
value
SDA
SCL
21-15). All the status codes mentioned in this section assume that the prescaler bits are
No TWDR action or
No TWDR action or
No TWDR action
Read data byte or
Read data byte
Read data byte or
Read data byte or
Read data byte
TWINT
TWA6
Device 1
RECEIVER
SLAVE
0
TWEA
TWA5
1
0
1
0
0
1
0
1
1
TRANSMITTER
Device 2
MASTER
0
0
1
1
0
0
1
1
TWSTA
TWA4
0
Device’s Own Slave Address
1
Device 3
1
1
1
1
1
1
1
TWSTO
TWA3
0
0
X
X
X
X
X
X
1
........
Repeated START will be transmitted
STOP condition will be transmitted and TWSTO flag
will be reset
STOP condition followed by a START condition will be
transmitted and TWSTO flag will be reset
Data byte will be received and NOT ACK will be
returned
Data byte will be received and ACK will be returned
Repeated START will be transmitted
STOP condition will be transmitted and TWSTO flag
will be reset
STOP condition followed by a START condition will be
transmitted and TWSTO flag will be reset
TWWC
TWA2
0
Device n
V
CC
TWA1
TWEN
ATmega128A
1
R1
TWA0
0
R2
Table
TWGCE
TWIE
X
21-4.
218

Related parts for ATMEGA128A-AN