CAN BUS interpretation

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
User avatar
achillis1
Posts: 347
Joined: Thu Oct 09, 2008 9:19 am
Has thanked: 91 times
Been thanked: 8 times
Contact:

CAN BUS interpretation

Post by achillis1 »

Hello,

I have the can bus board and I need to set it up in order to communicate with a generator.

My question is:

1. How will I be able to "listen" to all incoming messages from the generator's ECU?
2.If I connect the CAN bus to an engine's ECU will I accomplish a communication or do I need any extra components or modifications?
3. If the ECU has many messages, how do I store them to PIC and view them later? ( Is better to store on PIC and view on LCD or store on MMC and view on PC through CSV file?)
4. If I manage to collect all the messages from the ECU, then how do I interpret them, meaning that how will I know that a certain message, refers to the engine's RPM and how do I extract the value of the engine's RPM?

Thank you in advance,

Best Regards,

Andreas Achilleos
Andreas Achilleos

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: CAN BUS interpretation

Post by Enamul »

1. How will I be able to "listen" to all incoming messages from the generator's ECU?
If you can configure the message ID of the ECU or at least know the message ID. Plus you need to know the Bus rate.
2.If I connect the CAN bus to an engine's ECU will I accomplish a communication or do I need any extra components or modifications?
Are you planning to use internal CAN enabled PIC(PIC18f4580) if so you need MCP2551 PIC to connect with ECU. If you are planning to use external CAN controller with PIC you need both MCP2515 & MCP 2551.
3. If the ECU has many messages, how do I store them to PIC and view them later? ( Is better to store on PIC and view on LCD or store on MMC and view on PC through CSV file?)
It depends on the amount of data it sends before you check. If it is lot's of data ECU will send in that case MMC would be a good option.
4. If I manage to collect all the messages from the ECU, then how do I interpret them, meaning that how will I know that a certain message, refers to the engine's RPM and how do I extract the value of the engine's RPM?
You have to contact with ECU manufacturer datasheet or manual or technical info to get the format of the data sent in CAN bus without that info it's not possible to identify.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
achillis1
Posts: 347
Joined: Thu Oct 09, 2008 9:19 am
Has thanked: 91 times
Been thanked: 8 times
Contact:

Re: CAN BUS interpretation

Post by achillis1 »

Hello Enamul,

Many thanks for you reply!
If you are planning to use external CAN controller with PIC you need both MCP2515 & MCP 2551.
I thought that the Matrix CAN board had these controllers embedded?

Thank you,

Best Regards,

Andreas Achilleos

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: CAN BUS interpretation

Post by Enamul »

Yes,you are right MATRIX CAN board has both chip in-built. You can easily use that.
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
topigor
Posts: 1
Joined: Thu Feb 28, 2013 4:54 pm
Contact:

Re: CAN BUS interpretation

Post by topigor »

I am sorry for my english I'm from Moldova. I was also interested in the CAN interface. On the question of what to listen to the CAN bus, it is better to do "CANHacker " http://www.canhack.de.
And I have a question for the knowledgeable people. On your forum I downloaded the patch CAN Internal for FC 5. Written a simple algorithm
1. Initialize the CAN internal.
2. Output ID in an infinite loop.
But in Proteus on ports, nothing happens. Checked in MPLAB and saw that during initialization CAN module does not come out of the loop. Forced'm out of the loop, the program enters into another cycle. Unfortunately :( Assembler I do not know what to understand. Maybe I did not properly install the hotfix.
Please help my head out of the loop.

Post Reply