ATMEGA8515-16AI Atmel, ATMEGA8515-16AI Datasheet - Page 141

IC AVR MCU 8K 16MHZ IND 44-TQFP

ATMEGA8515-16AI

Manufacturer Part Number
ATMEGA8515-16AI
Description
IC AVR MCU 8K 16MHZ IND 44-TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheets

Specifications of ATMEGA8515-16AI

Core Processor
AVR
Core Size
8-Bit
Speed
16MHz
Connectivity
EBI/EMI, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
35
Program Memory Size
8KB (4K x 16)
Program Memory Type
FLASH
Eeprom Size
512 x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
4.5 V ~ 5.5 V
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
Data Converters
-

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATMEGA8515-16AI
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA8515-16AI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
USART Initialization
2512K–AVR–01/10
If used, the parity bit is located between the last data bit and first stop bit of a serial
frame.
The USART has to be initialized before any communication can take place. The initial-
ization process normally consists of setting the baud rate, setting frame format and
enabling the Transmitter or the Receiver depending on the usage. For interrupt driven
USART operation, the Global Interrupt Flag should be cleared (and interrupts globally
disabled) when doing the initialization.
Before doing a re-initialization with changed baud rate or frame format, be sure that
there are no ongoing transmissions during the period the registers are changed. The
TXC Flag can be used to check that the Transmitter has completed all transfers, and the
RXC Flag can be used to check that there are no unread data in the receive buffer. Note
that the TXC Flag must be cleared before each transmission (before UDR is written) if it
is used for this purpose.
The following simple USART initialization code examples show one assembly and one
C function that are equal in functionality. The examples assume asynchronous opera-
tion using polling (no interrupts enabled) and a fixed frame format. The baud rate is
given as a function parameter. For the assembly code, the baud rate parameter is
assumed to be stored in the r17:r16 registers. When the function writes to the UCSRC
Register, the URSEL bit (MSB) must be set due to the sharing of I/O location by UBRRH
and UCSRC.
Note:
Assembly Code Example
C Code Example
USART_Init:
void USART_Init( unsigned int baud )
{
}
; Set baud rate
out
out
; Enable receiver and transmitter
ldi
out
; Set frame format: 8data, 2stop bit
ldi
out
ret
/* Set baud rate */
UBRRH = (unsigned char)(baud>>8);
UBRRL = (unsigned char)baud;
/* Enable receiver and transmitter */
UCSRB = (1<<RXEN)|(1<<TXEN);
/* Set frame format: 8data, 2stop bit */
UCSRC = (1<<URSEL)|(1<<USBS)|(3<<UCSZ0);
1. See “About Code Examples” on page 7.
UBRRH, r17
UBRRL, r16
r16, (1<<RXEN)|(1<<TXEN)
UCSRB,r16
r16, (1<<URSEL)|(1<<USBS)|(3<<UCSZ0)
UCSRC,r16
(1)
(1)
ATmega8515(L)
141

Related parts for ATMEGA8515-16AI