Multiple CAN controllers and the CS Pin

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times

Multiple CAN controllers and the CS Pin

Post by Jay Dee »

Hi guys,
When setting up the CAN component, an output is specified for the CS (chip select) pin.
Am I correct in assuming that this pin is automatically activated by the CAN macros, So I dont need to set the CS output before each CAN macro?

However, if I try to jump between two CAN controllers (hardware) using a single CAN component (software), I'll run into trouble as I cant select different CS pins.
Is the best step to just select the Extended CAN component and use this for the second CAN Chip.

P.S.
CAN VNET working a treat.
Regards,
John.

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

Re: Multiple CAN controllers and the CS Pin

Post by Benj »

Hi John,

Yes you should be able to use the CAN and CAN2 components together using different chip select pins. It should also be possible to add more then one CAN component to a program so I will look into why this is not currently allowed.

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

Re: Multiple CAN controllers and the CS Pin

Post by Benj »

Hello,

The attached component should allow you to add more then one CAN component to your program. I have checked that compilation is ok but not tested on hardware.

Simply copy the attached file into your "Flowcode v5/Components/" folder before starting Flowcode.
FC5_PIC_CAN.c
(45 KiB) Downloaded 241 times
Let me know how you get on.

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times

Re: Multiple CAN controllers and the CS Pin

Post by Jay Dee »

Thanks Ben, will test in the next couple of days and feedback.
John.

Post Reply