ATmega168A Atmel Corporation, ATmega168A Datasheet - Page 237

no-image

ATmega168A

Manufacturer Part Number
ATmega168A
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega168A

Flash (kbytes)
16 Kbytes
Pin Count
32
Max. Operating Frequency
20 MHz
Cpu
8-bit AVR
# Of Touch Channels
16
Hardware Qtouch Acquisition
No
Max I/o Pins
23
Ext Interrupts
24
Usb Speed
No
Usb Interface
No
Spi
2
Twi (i2c)
1
Uart
1
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
Yes
Crypto Engine
No
Sram (kbytes)
1
Eeprom (bytes)
512
Self Program Memory
YES
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-40 to 85
I/o Supply Class
1.8 to 5.5
Operating Voltage (vcc)
1.8 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
3
Output Compare Channels
6
Input Capture Channels
1
Pwm Channels
6
32khz Rtc
Yes
Calibrated Rc Oscillator
Yes
Table 22-4.
Status Codes for Slave Receiver Mode
Status Code
(TWSR)
Status of the 2-wire Serial Bus
Prescaler Bits
and 2-wire Serial Interface Hard-
are 0
ware
0x60
Own SLA+W has been received;
ACK has been returned
0x68
Arbitration lost in SLA+R/W as
Master; own SLA+W has been
received; ACK has been returned
0x70
General call address has been
received; ACK has been returned
0x78
Arbitration lost in SLA+R/W as
Master; General call address has
been received; ACK has been
returned
0x80
Previously addressed with own
SLA+W; data has been received;
ACK has been returned
0x88
Previously addressed with own
SLA+W; data has been received;
NOT ACK has been returned
0x90
Previously addressed with
general call; data has been re-
ceived; ACK has been returned
0x98
Previously addressed with
general call; data has been
received; NOT ACK has been
returned
0xA0
A STOP condition or repeated
START condition has been
received while still addressed as
Slave
8271D–AVR–05/11
ATmega48A/PA/88A/PA/168A/PA/328/P
Application Software Response
To TWCR
To/from TWDR
STA
STO
TWIN
T
No TWDR action or
X
0
1
No TWDR action
X
0
1
No TWDR action or
X
0
1
No TWDR action
X
0
1
No TWDR action or
X
0
1
No TWDR action
X
0
1
No TWDR action or
X
0
1
No TWDR action
X
0
1
Read data byte or
X
0
1
Read data byte
X
0
1
Read data byte or
0
0
1
Read data byte or
0
0
1
Read data byte or
1
0
1
Read data byte
1
0
1
Read data byte or
X
0
1
Read data byte
X
0
1
Read data byte or
0
0
1
Read data byte or
0
0
1
Read data byte or
1
0
1
Read data byte
1
0
1
No action
0
0
1
0
0
1
1
0
1
1
0
1
TWE
Next Action Taken by TWI Hardware
A
0
Data byte will be received and NOT ACK will be
returned
1
Data byte will be received and ACK will be returned
0
Data byte will be received and NOT ACK will be
returned
1
Data byte will be received and ACK will be returned
0
Data byte will be received and NOT ACK will be
returned
1
Data byte will be received and ACK will be returned
0
Data byte will be received and NOT ACK will be
returned
1
Data byte will be received and ACK will be returned
0
Data byte will be received and NOT ACK will be
returned
1
Data byte will be received and ACK will be returned
0
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA
1
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = “1”
0
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA;
a START condition will be transmitted when the bus
becomes free
1
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = “1”;
a START condition will be transmitted when the bus
becomes free
0
Data byte will be received and NOT ACK will be
returned
1
Data byte will be received and ACK will be returned
0
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA
1
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = “1”
0
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA;
a START condition will be transmitted when the bus
becomes free
1
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = “1”;
a START condition will be transmitted when the bus
becomes free
0
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA
1
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = “1”
0
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA;
a START condition will be transmitted when the bus
becomes free
1
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = “1”;
a START condition will be transmitted when the bus
becomes free
237

Related parts for ATmega168A