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

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
Assembly Code Example –
Slave Transmitter Mode
1457G–AVR–09/03
Figure 58. Formats and States in the Slave Transmitter Mode
Reception of the
Own Slave Address
and One or
More Data Bytes
Arbitration Lost as Master
and Addressed as Slave
Last Data Byte Transmitted.
Switched to not Addressed
Slave (TWEA = '0')
; Part specific include file and TWI include file must be included.
; <Initialize registers, including TWAR, TWBR and TWCR>
; <Receive START condition and SLA+R>
wait14:in
wait15:in
; <Send more data bytes if needed>
From Master to Slave
From Slave to Master
ldi
out
sbrs r16, TWINT
rjmp wait14
in
cpi
brne ERROR
ldi
out
ldi
out
sbrs r16, TWINT
rjmp wait15
in
cpi
brne ERROR
S
r16, (1<<TWINT) | (1<<TWEA) | (1<<TWEN)
TWCR, r16
r16,TWCR
r16, TWSR
r16, ST_SLA_ACK
r16, 0x33
TWDR, r16
r16, (1<<TWINT) | (1<<TWEA) | (1<<TWEN)
TWCR, r16
r16,TWCR
r16, TWSR
r16, ST_DATA_ACK
SLA
R
DATA
$A8
$B0
A
A
; Enable TWI in Slave Transmitter mode
; Wait for TWINT Flag set. This indicates that
; SLA+R has been received, and ACK/NACK has
; been returned
; Check value of TWI Status Register. If status
; different from ST_SLA_ACK, go to ERROR
; Load data(here, data=0x33)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
n
A
DATA
Any Number of Data Bytes
and their Associated Acknowledge Bits
This Number (Contained in TWSR) Corresponds
to a Defined State of the Two-wire Serial Bus
$B8
A
ATmega323(L)
DATA
$C0
$C8
A
A
P or S
All 1's
P or S
121

Related parts for ATMEGA323-8AC