ATA6613-EK Atmel, ATA6613-EK Datasheet - Page 199

no-image

ATA6613-EK

Manufacturer Part Number
ATA6613-EK
Description
BOARD DEMO LIN-MCM FOR ATA6613
Manufacturer
Atmel
Datasheets

Specifications of ATA6613-EK

Main Purpose
Interface, LIN + MCU
Embedded
Yes, MCU, 8-Bit
Utilized Ic / Part
ATA6613
Primary Attributes
LIN-SBC (System-Basis-Chip) Transceiver, LIN 2.0, Voltage Regulator, Window Watchdog
Secondary Attributes
16 kB Flash, 4 Power Modes: Pre-Normal, Normal, Sleep, Silent, 48-QFN
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
6.17.3.1
6.17.4
9111H–AUTO–01/11
USART Initialization
Parity Bit Calculation
The parity bit is calculated by doing an exclusive-or of all the data bits. If odd parity is used, the
result of the exclusive or is inverted. The relation between the parity bit and data bits is as
follows:
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 initialization
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 TXCn 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 TXCn Flag must be
cleared before each transmission (before UDRn is written) if it is used for this purpose.
The following simple USART initialization code examples show one assembly and one C func-
tion that are equal in functionality. The examples assume asynchronous operation 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.
P
P
d
even
odd
n
Parity bit using even parity
Parity bit using odd parity
Data bit n of the character
P
P
even
odd
=
=
d
d
n 1
n 1
d
d
Atmel ATA6612/ATA6613
3
3
d
d
2
2
d
d
1
1
d
d
0
0
0
1
199

Related parts for ATA6613-EK