ATmega128A Atmel Corporation, ATmega128A Datasheet - Page 218

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
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