Problems PIN selsection internal CAN 18F26k80

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

CSM2711
Posts: 47
Joined: Mon Apr 16, 2018 10:28 am
Location: Germany
Has thanked: 1 time
Been thanked: 9 times
Contact:

Problems PIN selsection internal CAN 18F26k80

Postby CSM2711 » Wed Oct 23, 2019 7:41 am

Hello,

I have some problems using the internal can module of PIC18F26K80.
I get no CAN meesages......
But I wonder in the datasheet and the chip view the CANRX PIN is RC7 and the CAN TX Pin is RC6.
In the can component the PINS B2 and B3 are selescted and it is not possible to select another pin.
Is this a Bug or do I undestand something wrong?

User avatar
Benj
Matrix Staff
Posts: 14422
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4495 times
Been thanked: 4179 times
Contact:

Re: Problems PIN selsection internal CAN 18F26k80

Postby Benj » Wed Oct 23, 2019 11:13 am

Hello,

On the K80 devices the CAN pins can be on either B2 and 3 or C6 and 7.

We have chosen the B2 and B3 for the Flowcode device definition.

The pins are selected via the CANMX configuration option in the project options. Can you check this matches the indicated connections in Flowcode.

If you want to use the PortC pins then let us know and we can switch the default pins to this instead.

CSM2711
Posts: 47
Joined: Mon Apr 16, 2018 10:28 am
Location: Germany
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Problems PIN selsection internal CAN 18F26k80

Postby CSM2711 » Thu Oct 24, 2019 6:32 am

Ok I understand.
But i have now another problem...
i wrot a simple test programm (see attachmend) but when I Start my CAN software i will get no data only stuff errors.......
I testetd the same with external CAN (MCP2515) an every thing works fine.
Anyone an Idea?
Attachments
CANTEST.fcfx
(12.03 KiB) Downloaded 11 times
Unbenannt.JPG
Unbenannt.JPG (52.09 KiB) Viewed 258 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1170
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 371 times
Been thanked: 590 times
Contact:

Re: Problems PIN selsection internal CAN 18F26k80

Postby QMESAR » Fri Oct 25, 2019 3:46 pm

Hi.

my guess is you are not running the controller at the speed you think it is running
the OSCTUNE value of 0x72 look suspect to me I would expect 0x70 .
Use a intOSC component on your FC chart to get the right value

Run time menu>> intOSC helper