ATMEGA323L-4AI Atmel, ATMEGA323L-4AI Datasheet - Page 112

IC AVR MCU 32K LV 4MZ IND 44TQFP

ATMEGA323L-4AI

Manufacturer Part Number
ATMEGA323L-4AI
Description
IC AVR MCU 32K LV 4MZ IND 44TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheet

Specifications of ATMEGA323L-4AI

Core Processor
AVR
Core Size
8-Bit
Speed
4MHz
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)
2.7 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
44-TQFP, 44-VQFP
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Other names
ATMEGA323L4AI
Assembly Code Example
Master Transmitter Mode
112
ATmega323(L)
Figure 55. Formats and States in the Master Transmitter Mode
Successfull
Transmission
to a Slave
Receiver
Next Transfer
Started with a
Repeated Start
Condition
Not Acknowledge
Received after the
Slave Address
Not Acknowledge
Received after a Data
Byte
Arbitration Lost in Slave
Address or Data Byte
Arbitration Lost and
Addressed as Slave
;The Slave being addressed has address 0x64. The code examples also assumes
some sort of error handling routine named ERROR.
;Part specific include file and TWI include file must be included.
; <Initialize registers, including TWAR, TWBR and TWCR>
wait1: in
From Master to Slave
From Slave to Master
ldi
out
sbrs r16,TWINT
rjmp wait1
in
cpi
brne ERROR
$08
S
r16, (1<<TWSTA) | (1<<TWEN)
TWCR, r16
r16,TWCR
r16, TWSR
r16, START
SLA
W
MT
A or A
DATA
$20
$18
$38
$68
A
A
A
; Send START condition
; Wait for TWINT Flag set. This indicates that
; the START condition has been transmitted
; Check value of TWI Status Register.
; If status different from START go to ERROR
$78
Other Master
Other Master
n
Continues
Continues
P
$B0
DATA
A
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
A or A
$28
$30
$38
To Corresponding
States in Slave Mode
A
A
Other Master
Continues
$10
P
S
P
SLA
1457G–AVR–09/03
W
R
MR

Related parts for ATMEGA323L-4AI