Identify microcontroller pins for CAN interface

canmicrocontrollerpic

I am using DSPIC33FJ64GP804 in my project. And the datasheets can not tell me which pins are used as CAN tx and dx. Maybe it is pin 21 C2in- and 22 C2in+? Or maybe any two pins can be used?

Best Answer

If you look at Figure 19.1 in the datasheet you can see that the pins are C1TX and C1RX (C2in+ and C2in- are the comparator inputs, not CAN). But, where are those pins on the chip pinout?

Well, they're not. Not directly, anyway.

They are remappable pins. You need to read and understand chapter 11 of the datasheet. In there you have tables of pin mapping values, and it allows you to map the TX and RX pins to any of the RPn pins.