| Electronic Components Datasheet Search |
|
70353C Datasheet(PDF) 47 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
70353C Datasheet(HTML) 47 Page - Microchip Technology |
|
47 / 76 page ![]() © 2008-2011 Microchip Technology Inc. DS70353C-page 21-47 Section 21. Enhanced Controller Area Network (ECAN™) 21 Example 21-4: Code Example for Filtering Standard Data Frame (Continued) A code example used to configure acceptance filter 2 to receive EID messages using the acceptance filter mask register to mask EID<5:0> bits is shown in Example 21-5. /* Select Acceptance Filter Mask 0 for Acceptance Filter 0 */ C1FMSKSEL1bits.F0MSK=0x0; /* Configure Acceptance Filter Mask 0 register to mask SID<2:0> * Mask Bits (11-bits) : 0b111 1111 1000 */ C1RXM0SIDbits.SID = 0x7F8; /* Configure Acceptance Filter 0 to match standard identifier Filter Bits (11-bits): 0b011 1010 xxx with the mask setting, message with SID range 0x1D0-0x1D7 will be accepted by the ECAN module. */ C1RXF0SIDbits.SID = 0x01D0; /* Acceptance Filter 0 to check for Standard Identifier */ C1RXM0SIDbits.MIDE = 0x1; C1RXF0SIDbits.EXIDE= 0x0; /* Acceptance Filter 0 to use Message Buffer 10 to store message */ C1BUFPNT1bits.F0BP = 0xA; /* Filter 0 enabled for Identifier match with incoming message */ C1FEN1bits.FLTEN0=0x1; /* Clear Window Bit to Access ECAN * Control Registers */ C1CTRL1bits.WIN=0x0; /* Place the ECAN module in normal * mode. */ C1CTRL1bits.REQOP = 0; while(C1CTRL1bits.OPMODE != 0); /* The following code shows one example of how the application can wait for a message to be received in message buffer 10 */ while(1) { /* Message was received. */ while (C1RXFUL1bits.RXFUL10 == 0); C1RXFUL1bits.RXFUL10 = 0; } } |
|
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 |