CAN BUS with MCP2515 and PIC16F876A

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

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

CAN BUS with MCP2515 and PIC16F876A

Post by Dante »

Hi.
Once again with an other problem. This time is CANBUS, year ago i try to made a CANBUS Node with 16F876A and MCP2515 but I couldn't, in that time i solved with the PIC18F2580 That allready had CANBUS. Now I try to work again with the CAN controller and PIC but I could not make it work. I use the CAN icon of flowcode but it doesn't work out.I think the problem is in the hardware i can't find it. Maybe you can help me. I attach my schematic and my program.

Sorry for my english
Thaks a lot
CAN_1.fcf
Basic CAN
(9 KiB) Downloaded 319 times
CANPIC.png
Schematic
(26.4 KiB) Downloaded 1039 times

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times

Re: CAN BUS with MCP2515 and PIC16F876A

Post by Spanish_dude »

You can't use the CAN component of Flowcode for that.
If you use the CAN component it means you have a CAN bus into your microcontroller.

The MCP2510 is a "CAN controller with SPI interface".
This means you need to use SPI to control the MCP2510 and he'll output your data into a CAN bus.

Nicolas

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: CAN BUS with MCP2515 and PIC16F876A

Post by Steve »

The CAN component in Flowcode was originally designed to only work with this stand-alone controller chip. We later added support for the chips with internal CAN, but it should still work with this SPI chip.

I suggest you look at the circuit of our EB018 CAN interface board to see where your hardware problem may be.

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

Re: CAN BUS with MCP2515 and PIC16F876A

Post by Dante »

Thanks Steve

So The CAN component support 18F2580????? Year ago i solved with another program.
Yes I saw the data sheet of the EB018 and then I made my schematic. I review again the data sheet but I don't see anything wrong. Well I gona a try again

Thanks a lot

Best regards

Post Reply