ATmega168P Atmel Corporation, ATmega168P Datasheet - Page 221

no-image

ATmega168P

Manufacturer Part Number
ATmega168P
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega168P

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

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATmega168P-20AN
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega168P-20ANR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega168P-20AU
Manufacturer:
ATMEL
Quantity:
1 250
Part Number:
ATmega168P-20AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega168P-20AUR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega168P-20MU
Manufacturer:
ATMEL
Quantity:
12 000
Part Number:
ATmega168P-20MU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
ATmega168P-20PU
Quantity:
1
Part Number:
ATmega168PA-15AZ
Manufacturer:
VAC
Quantity:
120
Part Number:
ATmega168PA-15AZ
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega168PA-15MZ
Manufacturer:
TOSHIBA
Quantity:
1 000
Part Number:
ATmega168PA-AU
Manufacturer:
Atmel
Quantity:
2 902
Part Number:
ATmega168PA-AU
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
ATmega168PA-AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
1 258
Company:
Part Number:
ATmega168PA-AU
Quantity:
350
22.6
8025M–AVR–6/11
Using the TWI
able. As long as the TWINT Flag is set, the SCL line is held low. This allows the application
software to complete its tasks before allowing the TWI transmission to continue.
The TWINT Flag is set in the following situations:
• After the TWI has transmitted a START/REPEATED START condition.
• After the TWI has transmitted SLA+R/W.
• After the TWI has transmitted an address byte.
• After the TWI has lost arbitration.
• After the TWI has been addressed by own slave address or general call.
• After the TWI has received a data byte.
• After a STOP or REPEATED START has been received while still addressed as a Slave.
• When a bus error has occurred due to an illegal START or STOP condition.
The AVR TWI is byte-oriented and interrupt based. Interrupts are issued after all bus events, like
reception of a byte or transmission of a START condition. Because the TWI is interrupt-based,
the application software is free to carry on other operations during a TWI byte transfer. Note that
the TWI Interrupt Enable (TWIE) bit in TWCR together with the Global Interrupt Enable bit in
SREG allow the application to decide whether or not assertion of the TWINT Flag should gener-
ate an interrupt request. If the TWIE bit is cleared, the application must poll the TWINT Flag in
order to detect actions on the TWI bus.
When the TWINT Flag is asserted, the TWI has finished an operation and awaits application
response. In this case, the TWI Status Register (TWSR) contains a value indicating the current
state of the TWI bus. The application software can then decide how the TWI should behave in
the next TWI bus cycle by manipulating the TWCR and TWDR Registers.
Figure 22-10
this example, a Master wishes to transmit a single data byte to a Slave. This description is quite
abstract, a more detailed explanation follows later in this section. A simple code example imple-
menting the desired behavior is also presented.
is a simple example of how the application can interface to the TWI hardware. In
ATmega48P/88P/168P
221

Related parts for ATmega168P