Using CAN

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

Moderators: Benj, Mods

Post Reply
Dante
Posts: 11
Joined: Fri Oct 09, 2009 2:45 pm

Using CAN

Post by Dante »

Hi
I have project to implement a CAN protocol in a medical aplicatiΓ­on. I start to programing Can bus on Flowcode but i have some cuestions and maybe you can answer me. i try to comunicate two PICS with Can, and i took the example on the EB744 Teacher's notes, very simple in the first pic push a button and in the other pic turn on a led when the button was press but when i mount in the proto board it dosen't work so i read in the forum topics that the CAN only works whit the MCP2515, so i imagine that the CAN is mounted in spi protocol? How can i programe the MCP2515? and in the Can training solution how do you program the MCP2515 for the examples that can test in the diferents nodes?

Best regards

:shock:

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: Using CAN

Post by Benj »

Hello

The Flowcode CAN components already use the SPI to talk to the MCP2515 device. Are you also using the MCP2551 as the CAN signal line driver?

I would look at the schematic available on our EB018 E-Block datasheet and use this as the basis for your design. If you are unsure of your SPI pins on your specific target microcontroller then you can find these in the device datasheet or let me know what your using and Ill have a quick look for you.

Each node's target microcontroller is connected to a MCP2515 so in answer to your question you program different nodes by sending different programs to the microcontroller controlling each node.

Maybe buying the CAN E-Blocks would help you to get up and running as these come working out the box and would allow you to be more confident before starting your own design.
http://www.matrixmultimedia.com/product ... PHPSESSID=

Dante
Posts: 11
Joined: Fri Oct 09, 2009 2:45 pm

Re: Using CAN

Post by Dante »

Hi

Thanks for answer me


I'm not using the MCP2551 right now because i only want to prube that the comunication was succsefully in TTL levels with the two pics but I realize that i need the mcp2515 too cumunicate the pics through the Can protocol, so i search in your web page and i saw the E-block Can board that comes with the MCP2515to convert SPI to CAN and MCP2551 for the Can Levels, i want to buy Easy can bus pack to start up with the project my question is: the mcp2515 in E-block Can board is a programable chip? in your board is all ready programed? That is because when i finish the training with Easy Can i have to develop my own hardware


Best regards

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: Using CAN

Post by Benj »

Hello

No the MCP2515 and the MCP2551 are both slave devices that do not require programming. All of the intelligence comes from the Flowcode controller program via the SPI bus.

Dante
Posts: 11
Joined: Fri Oct 09, 2009 2:45 pm

Re: Using CAN

Post by Dante »

Hi

Ok, thats wonderfull. Thanks for every thing, is more easy that way.


Best Regards

Post Reply