| Electronic Components Datasheet Search |
|
70353C Datasheet(PDF) 34 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
70353C Datasheet(HTML) 34 Page - Microchip Technology |
|
34 / 76 page ![]() dsPIC33E/PIC24E Family Reference Manual DS70353C-page 21-34 © 2008-2011 Microchip Technology Inc. 21.6 TRANSMITTING ECAN MESSAGES A node originating a message is a transmitter of that message. The node remains a transmitter until the bus becomes Idle or the unit loses arbitration. Figure 21-8 illustrates a typical ECAN transmission process. Message Buffers 0-7 (located in device RAM) are configured to transmit or receive CAN messages using the TX/RX Buffer Selection bit (TXENn) in the corresponding ECAN TX/RX Buffer m Control register (CiTRmnCON<7>). If the TXENn bit is set, the message buffer is configured for transmission. For the layout of standard and extended frames in the message buffer, and the states of IDE, SRR, RTR, RB0 and RB1 bits for Standard Data, Extended Data, Standard Remote, or Extended Remote frames as per the CAN Specification, refer to 21.2 “CAN Message Formats”. 21.6.1 Message Transmission Flow To transmit a message over the CAN bus, the user application must perform these tasks: 1. Configure a message buffer for transmission and assign a priority to the buffer. 2. Write the CAN message in the message buffer located in device RAM. 3. Set the transmit request bit for the buffer to initiate message transmission. The Message transmission is initiated by setting the Message Send Request bit (TXREQm) in the ECAN Transmit/Receive Control register (CiTRmnCON<3>). The TXREQm bit is cleared automatically after the message is transmitted. Before the SOF is sent, all the buffers ready for transmission are examined to determine which buffer has the highest priority. The transmit buffer with the highest priority is sent first. Each of the transmit message buffers can be assigned to any of the four user application-defined priority levels using the TXnPRI<1:0> bits (CiTRmnCON<1:0>). TXnPRI<1:0> Message Transmission Priority selections are: • 11 = The transmit message has the highest priority • 10 = The transmit message has intermediate high priority • 01 = The transmit message has intermediate low priority • 00 = The transmit message has the lowest priority There is a natural order of priority for message buffers that are assigned to the same user application-defined priority level. The message buffer seven has the highest natural order of priority. The user application-defined priority levels override the natural order of priority. Figure 21-8: ECAN™ Transmission A code example to transmit a standard frame using message buffer 0 is shown in Example 21-1. Note: Setting the TXREQm bit when TXENn bit is ‘0’ will result in unpredictable module behavior. Word 0 0 1 SRR IDE Word 1 0 Word 2 10 15 2 EID<5:0> DLC<3:0> 4 12 9 RTR RB1 SID<10:0> EID<17:6> 8 FILHIT<4:0> 8 Data Byte 1 Data Byte 3 Data Byte 5 Data Byte 7 Data Byte 0 Data Byte 2 Data Byte 4 Data Byte 6 Word 7 SID SRR EID RTR SID RTR DLC DLC Message Buffer 0 Message Buffer 1 Message Buffer 2 Message Buffer 3 (TX) Message Buffer 4 Message Buffer 5 Message Buffer 6 Message Buffer 7 Extended Standard ECAN™ Data Frames Word 3 Word 4 Word 5 Word 6 RB0 Device RAM Transmit Message 13 15 12 15 13 15 5 7 Identifier Identifier |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |