ATMEGA8A-PU Atmel, ATMEGA8A-PU Datasheet - Page 193
![MCU AVR 8K FLASH 16MHZ 28-PDIP](/photos/7/21/72189/453-28-dip_sml.jpg)
ATMEGA8A-PU
Manufacturer Part Number
ATMEGA8A-PU
Description
MCU AVR 8K FLASH 16MHZ 28-PDIP
Manufacturer
Atmel
Series
AVR® ATmegar
Specifications of ATMEGA8A-PU
Core Processor
AVR
Core Size
8-Bit
Speed
16MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
23
Program Memory Size
8KB (4K x 16)
Program Memory Type
FLASH
Eeprom Size
512 x 8
Ram Size
1K x 8
Voltage - Supply (vcc/vdd)
2.7 V ~ 5.5 V
Data Converters
A/D 6x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-DIP (0.300", 7.62mm)
Processor Series
ATMEGA8x
Core
AVR8
Data Bus Width
8 bit
Data Ram Size
1 KB
Interface Type
SPI, TWI, USART
Maximum Clock Frequency
16 MHz
Number Of Programmable I/os
23
Number Of Timers
3
Maximum Operating Temperature
+ 85 C
Mounting Style
Through Hole
3rd Party Development Tools
EWAVR, EWAVR-BL
Development Tools By Supplier
ATAVRDRAGON, ATSTK500, ATSTK600, ATAVRISP2, ATAVRONEKIT
Minimum Operating Temperature
- 40 C
On-chip Adc
10 bit, 6 Channel
Package
28PDIP
Device Core
AVR
Family Name
ATmega
Maximum Speed
16 MHz
Operating Supply Voltage
3.3|5 V
Controller Family/series
AVR MEGA
No. Of I/o's
23
Eeprom Memory Size
512Byte
Ram Memory Size
1KB
Cpu Speed
16MHz
Rohs Compliant
Yes
For Use With
ATSTK600 - DEV KIT FOR AVR/AVR32ATSTK500 - PROGRAMMER AVR STARTER KIT
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATMEGA8A-PU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
- Current page: 193 of 308
- Download datasheet (6Mb)
20.8.3
20.8.4
8159D–AVR–02/11
TWI Status Register – TWSR
TWDR – TWI Data Register
• Bits 7:3 – TWS: TWI Status
These 5 bits reflect the status of the TWI logic and the Two-wire Serial Bus. The different status
codes are described later in this section. Note that the value read from TWSR contains both the
5-bit status value and the 2-bit prescaler value. The application designer should mask the pres-
caler bits to zero when checking the Status bits. This makes status checking independent of
prescaler setting. This approach is used in this datasheet, unless otherwise noted.
• Bit 2 – Res: Reserved Bit
This bit is reserved and will always read as zero.
• Bits 1:0 – TWPS: TWI Prescaler Bits
These bits can be read and written, and control the bit rate prescaler.
Table 20-10. TWI Bit Rate Prescaler
To calculate bit rates, see
in the equation.
In Transmit mode, TWDR contains the next byte to be transmitted. In Receive mode, the TWDR
contains the last byte received. It is writable while the TWI is not in the process of shifting a byte.
This occurs when the TWI Interrupt Flag (TWINT) is set by hardware. Note that the Data Regis-
ter cannot be initialized by the user before the first interrupt occurs. The data in TWDR remains
stable as long as TWINT is set. While data is shifted out, data on the bus is simultaneously
shifted in. TWDR always contains the last byte present on the bus, except after a wake up from
a sleep mode by the TWI interrupt. In this case, the contents of TWDR is undefined. In the case
of a lost bus arbitration, no data is lost in the transition from Master to Slave. Handling of the
ACK bit is controlled automatically by the TWI logic, the CPU cannot access the ACK bit directly.
• Bits 7:0 – TWD: TWI Data Register
These eight bits constitute the next data byte to be transmitted, or the latest data byte received
on the Two-wire Serial Bus.
Bit
Read/Write
Initial Value
Bit
Read/Write
Initial Value
TWPS1
0
0
1
1
TWS7
TWD7
R/W
R
7
1
7
1
TWD6
TWS6
R/W
R
6
1
6
1
TWPS0
“Bit Rate Generator Unit” on page
0
1
0
1
TWD5
TWS5
R/W
R
5
1
5
1
TWS4
TWD4
R/W
R
4
1
4
1
TWS3
TWD3
Prescaler Value
1
4
16
64
R/W
R
3
1
3
1
TWD2
166. The value of TWPS1:0 is used
R/W
R
2
–
0
2
1
TWPS1
TWD1
R/W
R/W
1
0
1
1
ATmega8A
TWPS0
TWD0
R/W
R/W
0
0
0
1
TWDR
TWSR
193
Related parts for ATMEGA8A-PU
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![ATMEGA8-16AU](/photos/6/91/69154/313-32-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 8K 16MHZ 5V 32TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16MU](/photos/12/32/123219/atmega8-16mu_tmb.jpg)
Part Number:
Description:
IC AVR MCU 8K 16MHZ 5V 32-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16PU](/photos/7/21/72189/453-28-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 8K 16MHZ 5V 28DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16AC](/photos/6/91/69154/313-32-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 8K 16MHZ COM 32-TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16AI](/photos/6/91/69154/313-32-tqfp_tmb.jpg)
Part Number:
Description:
IC AVR MCU 8K 16MHZ IND 32-TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16PC](/photos/7/21/72189/453-28-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 8K 16MHZ COM 28-DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16PI](/photos/7/21/72189/453-28-dip_tmb.jpg)
Part Number:
Description:
IC AVR MCU 8K 16MHZ IND 28-DIP
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16MC](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
IC AVR MCU 8K 16MHZ COM 32-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16MUR](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
MCU AVR 8KB FLASH 16MHZ 32QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16MI](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
IC AVR MCU 8K 16MHZ IND 32-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16AJ](/photos/6/91/69154/313-32-tqfp_tmb.jpg)
Part Number:
Description:
IC MCU AVR 8K 5V 16MHZ 32-TQFP
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16MJ](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
IC MCU AVR 8K 5V 16MHZ 32-QFN
Manufacturer:
Atmel
Datasheet:
![ATMEGA8-16PJ](/photos/7/21/72189/453-28-dip_tmb.jpg)
Part Number:
Description:
IC MCU AVR 8K 5V 16MHZ 28-DIP
Manufacturer:
Atmel
Datasheet: