C8051F581-IMR Silicon Labs, C8051F581-IMR Datasheet - Page 216

no-image

C8051F581-IMR

Manufacturer Part Number
C8051F581-IMR
Description
8-bit Microcontrollers - MCU 50MIPS 128kB 8kB SPI
Manufacturer
Silicon Labs
Datasheet

Specifications of C8051F581-IMR

Rohs
yes
Core
8051
Processor Series
C8051
Data Bus Width
8 bit
C8051F58x/F59x
21.3. LIN Master Mode Operation
The master node is responsible for the scheduling of messages and sends the header of each frame con-
taining the SYNCH BREAK FIELD, SYNCH FIELD, and IDENTIFIER FIELD. The steps to schedule a mes-
sage transmission or reception are listed below.
1. Load the 6-bit Identifier into the LIN0ID register.
2. Load the data length into the LIN0SIZE register. Set the value to the number of data bytes or "1111b" if
3. Set the data direction by setting the TXRX bit (LIN0CTRL.5). Set the bit to 1 to perform a master
4. If performing a master transmit operation, load the data bytes to transmit into the data buffer (LIN0DT1
5. Set the STREQ bit (LIN0CTRL.0) to start the message transfer. The LIN controller will schedule the
This code segment shows the procedure to schedule a message in a transmission operation:
216
the data length should be decoded from the identifier. Also, set the checksum type, classic or
enhanced, in the same LIN0SIZE register.
transmit operation, or set the bit to 0 to perform a master receive operation.
to LIN0DT8).
message frame and request an interrupt if the message transfer is successfully completed or if an error
has occurred.
LIN0ADR
LIN0DAT
LIN0ADR
LIN0DAT
LIN0ADR
LIN0DAT
LIN0ADR
for (i=0; i<8; i++)
{
}
LIN0ADR
LIN0DAT
LIN0DAT = i + 0x41;
LIN0ADR++;
|= 0x20;
= ( LIN0DAT & 0xF0 ) | 0x08;
= 0x00;
= 0x08;
= 0x01;
= 0x08;
= 0x0E;
= 0x11;
= 0x0B;
Table 21.3. Autobaud Parameters Examples
System Clock (MHz)
22.1184
11.0592
12.25
24.5
25
24
16
12
8
// Point to Data buffer first byte
// Load the buffer with ‘A’, ‘B’, ...
// Increment the address to the next buffer
// Point to LIN0CTRL
// Start Request
// Point to LIN0CTRL
// Select to transmit data
// Point to LIN0ID
// Load the ID, in this example 0x11
// Point to LIN0SIZE
Rev. 1.2
Prescaler
// Load the size with 8
1
1
1
1
1
0
0
0
0
Divider
312
306
300
276
200
306
300
276
200

Related parts for C8051F581-IMR