ata6603 ATMEL Corporation, ata6603 Datasheet - Page 198

no-image

ata6603

Manufacturer Part Number
ata6603
Description
Microcontroller With Lin Transceiver, 5v Regulator And Watchdog
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ata6603-PLQW
Manufacturer:
JTEC
Quantity:
2
Part Number:
ata6603P
Quantity:
1 262
Part Number:
ata6603P-PLQW
Manufacturer:
ATMEL
Quantity:
2 000
Part Number:
ata6603P-PLQW
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ata6603PPLQW
Manufacturer:
STM
Quantity:
5 006
198
ATA6602/ATA6603
Note:
More advanced initialization routines can be made that include frame format as parameters, dis-
able interrupts and so on. However, many applications use a fixed setting of the baud and
control registers, and for these types of applications the initialization code can be placed directly
in the main routine, or be combined with initialization code for other I/O modules.
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 */
UBRRnH = (unsigned char)(baud>>8);
UBRRnL = (unsigned char)baud;
/* Enable receiver and transmitter */
UCSRnB = (1<<RXENn)|(1<<TXENn);
/* Set frame format: 8data, 2stop bit */
UCSRnC = (1<<USBSn)|(3<<UCSZn0);
1. The example code assumes that the part specific header file is included.
For I/O Registers located in extended I/O map, “IN”, “OUT”, “SBIS”, “SBIC”, “CBI”, and “SBI”
instructions must be replaced with instructions that allow access to extended I/O. Typically
“LDS” and “STS” combined with “SBRS”, “SBRC”, “SBR”, and “CBR”.
UBRRnH, r17
UBRRnL, r16
r16, (1<<RXENn)|(1<<TXENn)
UCSRnB,r16
r16, (1<<USBSn)|(3<<UCSZn0)
UCSRnC,r16
(1)
(1)
4921D–AUTO–08/07

Related parts for ata6603