8
\$\begingroup\$

Link to the data sheet

I want to use Microchips DSPIC33FJ128GP802 in a new project and want to use the ECAN buss.

The problem I'm facing is that in the Controller families list at the top of the data sheet it says that device DSPIC33FJ128GP802 has one ECAN port as Remappable Peripheral:

Controller families

When I go down to the Pinout descriptions table and look for the ECAN pin labels it says that they are C1RX and C1TX:

Pinout descriptions

Until this point everything is perfect, I now know that this chip has a CAN buss somewhere and I know what the pins are called but now when I go to the pinout diagram for the chip:

pinout diagram

There are no pins that have the label C1RX or C1TX. So what am I supposed to to? should I guess where the CAN pins are or am I missing something here?

All help is appreciated XD

\$\endgroup\$
19
\$\begingroup\$

The CAN pins do not have fixed pin assignments. Instead you are able to select which of the "Remappable Pins" you wish to use (RP0 through RP15).

If you refer to page 180 of the datasheet, specifically the table titled "REGISTER 11-16" (RPINR26: Peripheral Pin Select Input Register 26), it details the register used to select the CAN RX pin location (C1RXR).

For the CAN TX pin location, this is set by the RPnR register of the pin that you want to use as detailed in section 11.6 (Peripheral Pin Select) starting page 161.

\$\endgroup\$
  • 2
    \$\begingroup\$ Additionally, if you are making a PCB, load up MPLAB and make sure you can actually map to your desired pins. I've been bitten by wrong documentation in regards to remappable pins and ended up sans an SPI port! The same goes for any device (FPGA/MCU/whatever) with remappable ports. \$\endgroup\$ – Adam Mar 22 at 5:18
4
\$\begingroup\$

It is considered a 'remappable peripheral'. You will need to map those to pins labelled RPX (where X is some number).

See section 4.8 of your datasheet.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.