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:
When I go down to the Pinout descriptions
table and look for the ECAN
pin labels it says that they are C1RX
and C1TX
:
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:
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
Best Answer
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.