ATMEGA163L-4AC Atmel, ATMEGA163L-4AC Datasheet - Page 93

IC AVR MCU 16K A/D 2.7V 44TQFP

ATMEGA163L-4AC

Manufacturer Part Number
ATMEGA163L-4AC
Description
IC AVR MCU 16K A/D 2.7V 44TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheet

Specifications of ATMEGA163L-4AC

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
16KB (8K 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 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
Assembly Code Example –
Master Receiver Mode
1142E–AVR–02/03
;Part specific include file and TWI include file must be included.
; <Initialize registers TWAR and TWBR>
wait5:in
wait6:in
wait7:in
wait8:in
;<Receive more data bytes if needed>
;receive next to last data byte.
ldi
out
sbrs
rjmp
in
cpi
brne
ldi
out
ldi
out
sbrs
rjmp
in
cpi
brne
ldi
out
sbrs
rjmp
in
cpi
brne
in
nop
ldi
out
r16,TWCR
r16, (1<<TWINT) | (1<<TWSTA) | (1<<TWEN)
TWCR, r16
r16,TWCR
r16, TWINT
wait5
r16, TWSR
r16, START
ERROR
r16, 0xc9
TWDR, r16
r16, (1<<TWINT) | (1<<TWEN)
TWCR, r16
r16, TWINT
wait6
r16, TWSR
r16, MR_SLA_ACK; different from MR_SLA_ACK, go to ERROR
ERROR
r16, (1<<TWINT) | (1<<TWEA) | (1<<TWEN)
TWCR, r16
r16,TWCR
r16, TWINT
wait7
r16, TWSR
r16, MR_DATA_ACK ; different from MR_DATA_ACK, go to ERROR
ERROR
r16, TWDR
r16, (1<<TWINT) | (1<<TWEA) | (1<<TWEN)
TWCR, r16
r16,TWCR
;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
; Load SLA+R into TWDR Register
; Clear TWINT bit in TWCR to start transmission of
; SLA+R
; Wait for TWINT flag set. This indicates that
; SLA+R has been transmitted, and ACK/NACK has
; been received
; Check value of TWI Status Register. If status
; Clear TWINT bit in TWCR to start reception of
; data.
; Setting TWEA causes ACK to be returned after
; reception of data byte
; Wait for TWINT flag set. This indicates that
; data has been received and ACK returned
; Check value of TWI Status Register. If status
; Input received data from TWDR.
;<do something with received data>
; Clear TWINT bit in TWCR to start reception of
; data. Setting TWEA causes ACK to be returned
; after reception of data byte
; Wait for TWINT flag set. This indicates that
ATmega163(L)
93

Related parts for ATMEGA163L-4AC