Page 1 of 1

Multiple CAN controllers and the CS Pin

Posted: Mon Jun 25, 2012 8:16 pm
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.

Re: Multiple CAN controllers and the CS Pin

Posted: Tue Jun 26, 2012 9:42 am
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.

Re: Multiple CAN controllers and the CS Pin

Posted: Tue Jun 26, 2012 9:50 am
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 242 times
Let me know how you get on.

Re: Multiple CAN controllers and the CS Pin

Posted: Wed Jun 27, 2012 12:03 am
by Jay Dee
Thanks Ben, will test in the next couple of days and feedback.
John.