欢迎访问ic37.com |
会员登录 免费注册
发布采购

C8051F502-IM 参数 Datasheet PDF下载

C8051F502-IM图片预览
型号: C8051F502-IM
PDF下载: 下载PDF文件 查看货源
内容描述: 混合信号ISP功能的Flash MCU系列 [Mixed Signal ISP Flash MCU Family]
分类和应用: 微控制器和处理器外围集成电路PC时钟
文件页数/大小: 312 页 / 2813 K
品牌: SILICON [ SILICON ]
 浏览型号C8051F502-IM的Datasheet PDF文件第201页浏览型号C8051F502-IM的Datasheet PDF文件第202页浏览型号C8051F502-IM的Datasheet PDF文件第203页浏览型号C8051F502-IM的Datasheet PDF文件第204页浏览型号C8051F502-IM的Datasheet PDF文件第206页浏览型号C8051F502-IM的Datasheet PDF文件第207页浏览型号C8051F502-IM的Datasheet PDF文件第208页浏览型号C8051F502-IM的Datasheet PDF文件第209页  
C8051F50x-F51x  
Table 21.3. Autobaud Parameters Examples  
System Clock (MHz)  
Prescaler  
Divider  
312  
25  
24.5  
24  
1
1
1
1
1
0
0
0
0
306  
300  
22.1184  
16  
276  
200  
12.25  
12  
306  
300  
11.0592  
8
276  
200  
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  
the data length should be decoded from the identifier. Also, set the checksum type, classic or  
enhanced, in the same LIN0SIZE register.  
3. Set the data direction by setting the TXRX bit (LIN0CTRL.5). Set the bit to 1 to perform a master  
transmit operation, or set the bit to 0 to perform a master receive operation.  
4. If performing a master transmit operation, load the data bytes to transmit into the data buffer (LIN0DT1  
to LIN0DT8).  
5. Set the STREQ bit (LIN0CTRL.0) to start the message transfer. The LIN controller will schedule the  
message frame and request an interrupt if the message transfer is successfully completed or if an error  
has occurred.  
This code segment shows the procedure to schedule a message in a transmission operation:  
LIN0ADR  
= 0x08;  
// Point to LIN0CTRL  
LIN0DAT |= 0x20;  
// Select to transmit data  
// Point to LIN0ID  
// Load the ID, in this example 0x11  
// Point to LIN0SIZE  
LIN0ADR  
LIN0DAT  
LIN0ADR  
= 0x0E;  
= 0x11;  
= 0x0B;  
LIN0DAT = ( LIN0DAT & 0xF0 ) | 0x08;  
// Load the size with 8  
LIN0ADR = 0x00;  
for (i=0; i<8; i++)  
{
// Point to Data buffer first byte  
LIN0DAT = i + 0x41;  
LIN0ADR++;  
// Load the buffer with ‘A’, ‘B’, ...  
// Increment the address to the next buffer  
}
LIN0ADR = 0x08;  
LIN0DAT = 0x01;  
// Point to LIN0CTRL  
// Start Request  
The application should perform the following steps when an interrupt is requested.  
1. Check the DONE bit (LIN0ST.0) and the ERROR bit (LIN0ST.2).  
2. If performing a master receive operation and the transfer was successful, read the received data from  
the data buffer.  
Rev. 1.1  
205