ATMEGA323-8AC Atmel, ATMEGA323-8AC Datasheet - Page 122

IC AVR MCU 32K 8MHZ COM 44TQFP

ATMEGA323-8AC

Manufacturer Part Number
ATMEGA323-8AC
Description
IC AVR MCU 32K 8MHZ COM 44TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheet

Specifications of ATMEGA323-8AC

Core Processor
AVR
Core Size
8-Bit
Speed
8MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
32
Program Memory Size
32KB (16K x 16)
Program Memory Type
FLASH
Eeprom Size
1K x 8
Ram Size
2K x 8
Voltage - Supply (vcc/vdd)
4.5 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
Internal
Operating Temperature
0°C ~ 70°C
Package / Case
44-TQFP, 44-VQFP
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Other names
ATMEGA3238AC
Table 41. Miscellaneous States
TWI Include File
122
Status Code
(TWSR)
$F8
$00
ATmega323(L)
Status of the Two-wire Serial
Bus and Two-wire Serial Inter-
face Hardware
No relevant state information
available; TWINT = “0”
Bus error due to an illegal
START or STOP condition
wait16:in
wait17:in
To/from TWDR
No TWDR action
No TWDR action
;***** General Master status codes *****
.equ
.equ
;***** Master Transmitter status codes *****
.equ
.equ
.equ
ldi
out
ldi
out
sbrs r16, TWINT
rjmp wait16
in
cpi
brne ERROR
ldi
out
ldi
out
sbrs r16, TWINT
rjmp wait17
in
cpi
brne ERROR
ldi
out
START
REP_START
MT_SLA_ACK
MT_SLA_NACK
MT_DATA_ACK
Application Software Response
r16, 0x44
TWDR, r16
r16, (1<<TWINT) | (1<<TWEA) | (1<<TWEN)
TWCR, r16
r16,TWCR
r16, TWSR
r16, ST_DATA_ACK
r16, 0x55
TWDR, r16
r16, (1<<TWINT) | (1<<TWEN)
TWCR, r16
r16,TWCR
r16, TWSR
r16, ST_LAST_DATA
r16, (1<<TWINT) | (1<<TWEA) | (1<<TWEN)
TWCR, r16
STA
0
No TWCR action
STO
1
=$08
=$10
=$18
=$20
=$28
To TWCR
TWINT
1
; Load data(here, data=0x44)into TWDR Register
; Clear TWINT bit in TWCR to start transmission
; of data. Setting TWEA indicates that ACK
; should be received when transfer finished
; Wait for TWINT Flag set. This indicates that
; data has been transmitted, and ACK/NACK has
; been received
; Check value of TWI Status Register. If status
; different from ST_DATA_ACK, go to ERROR
; Load data(here, data=0x55)into TWDR Register
; Clear TWINT bit in TWCR to start transmission
; of data. Not setting TWEA indicates that
; NACK should be received after data byte
; Master signalling end of transmission)
; Wait for TWINT Flag set. This indicates that
; data has been transmitted, and ACK/NACK has
; been received
; Check value of TWI Status Register. If status
; different from ST_LAST_DATA, go to ERROR
; Continue address recognition in Slave
; Transmitter mode
;START has been transmitted
;Repeated START has been transmitted
;SLA+W has been transmitted and ACK received
;SLA+W has been transmitted and NACK received
;Data byte has been transmitted and ACK
;received
TWEA
X
Next Action Taken by Two-wire Serial Interface Hard-
ware
Wait or proceed current transfer
Only the internal hardware is affected, no STOP condi-
tion is sent on the bus. In all cases, the bus is released
and TWSTO is cleared.
1457G–AVR–09/03

Related parts for ATMEGA323-8AC