CAN Communications.

A forum for discussing the MegaSquirt related (but non-B&G) board development, assembly, installation, and testing.

Moderators: jsmcortina, muythaibxr

MWPau
Master MS/Extra'er
Posts: 411
Joined: Thu Mar 03, 2011 6:24 pm

Re: CAN Communications.

Post by MWPau »

Im working away on my own dash display too.

At the moment im dumping the can transmissions between the MS3 and the TinyIOx.
Ive worked to how to format the header bytes, but the request data bytes are puzzling me.

An example of my can messages dump:
00->04 = msg_type:MSG_REQ var_blk:07 var_offset:0002 data(hex): 07 40 08
00->04 = msg_type:MSG_REQ var_blk:07 var_offset:0010 data(hex): 07 41 08
04->00 = msg_type:MSG_RSP var_blk:07 var_offset:0512 data(hex): 03 FF 03 FF 03 FF 03 FF
04->00 = msg_type:MSG_RSP var_blk:07 var_offset:0520 data(hex): 03 FF 03 FF 01 2C 01 2A

So, in the first request the data bytes are 07 40 08.
07 = myvarblk
40 08 = somehow is length & offset?

I gather the 8 is length, so that makes 40 0 the offset but shifted left by 1 bit?

IMO, the can_tech doc is too MS internals orientated.
cx_myvarblk, cx_myvaroff, cx_varbyt, etc dont actually specify where that data is located in a normal CAN message (ie, xx bits of the first data byte).
Toyota Celica GT4/Alltrac with 5S-GTE stroker (2.2L I4 turbo, high CR) on E85 w/FlexFuel.
MS3 + MS3X + KnockBoard + RTC + BT + DIY CAN-IO-Board + DIY CAN Digital Dash.
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: CAN Communications.

Post by jsmcortina »

MWPau wrote:IMO, the can_tech doc is too MS internals orientated.
cx_myvarblk, cx_myvaroff, cx_varbyt, etc dont actually specify where that data is located in a normal CAN message (ie, xx bits of the first data byte).
It does, there's a diagram just under the words
"The 29 bit CAN message header is divided into blocks across four 8-bit registers"

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
MWPau
Master MS/Extra'er
Posts: 411
Joined: Thu Mar 03, 2011 6:24 pm

Re: CAN Communications.

Post by MWPau »

Yes, there is that nice table for the CAN header.
Something similar would be great for the format of the 3 data bytes of a MSG_REQ packet.
That's what I'm having trouble working out.

Thanks :)
Toyota Celica GT4/Alltrac with 5S-GTE stroker (2.2L I4 turbo, high CR) on E85 w/FlexFuel.
MS3 + MS3X + KnockBoard + RTC + BT + DIY CAN-IO-Board + DIY CAN Digital Dash.
jsmcortina
Site Admin
Posts: 39615
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: CAN Communications.

Post by jsmcortina »

MWPau wrote:Yes, there is that nice table for the CAN header.
Something similar would be great for the format of the 3 data bytes of a MSG_REQ packet.
That's what I'm having trouble working out.

Thanks :)
I updated the http://www.msextra.com/doc/ms3/can_tech.html page with some more information.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
MWPau
Master MS/Extra'er
Posts: 411
Joined: Thu Mar 03, 2011 6:24 pm

Re: CAN Communications.

Post by MWPau »

Brilliant.
Thanks very much for that James :)
Toyota Celica GT4/Alltrac with 5S-GTE stroker (2.2L I4 turbo, high CR) on E85 w/FlexFuel.
MS3 + MS3X + KnockBoard + RTC + BT + DIY CAN-IO-Board + DIY CAN Digital Dash.
dll67
Experienced MS/Extra'er
Posts: 315
Joined: Fri Aug 23, 2013 11:37 pm

Re: CAN Communications.

Post by dll67 »

http://www.msextra.com/doc/ms3/can_tech.html

Anyone know if this page still exists?
The link is broken
MS3PU/IOx/CAN-EGT/DBWx2 540ci BBC 325cc int runners (2)innovate LC2 wbo2's, Hilborn ITB injector cnvrtd to EFI, 55LB Inj, d585 coil near plg, 60-2 trg whl & cam ph snsr, Muncie 4spd w/10T VSS, Tilton 7.25" cerametalic cltch 8.5LB flywhl
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: CAN Communications.

Post by 24c »

It is, but have you seen this page?
http://www.msextra.com/doc/pdf/Megasqui ... adcast.pdf

Mike
Yamaha GTS1000 v2 MicroSquirt, B&G 2.891
Yamaha GTS1000 v3 beta MicroSquirt, B&G3.760
Yamaha GTS1000 MSExtra 3.1, Dual VR Board
Yamaha YZF1000 MSExtra 3.1
MWPau
Master MS/Extra'er
Posts: 411
Joined: Thu Mar 03, 2011 6:24 pm

Re: CAN Communications.

Post by MWPau »

Where did you find that ^^ ?
These docs locations changes are frustrating :?
Toyota Celica GT4/Alltrac with 5S-GTE stroker (2.2L I4 turbo, high CR) on E85 w/FlexFuel.
MS3 + MS3X + KnockBoard + RTC + BT + DIY CAN-IO-Board + DIY CAN Digital Dash.
24c
Master MS/Extra'er
Posts: 847
Joined: Tue Jan 20, 2009 10:21 am
Location: Lancashire UK
Contact:

Re: CAN Communications.

Post by 24c »

Actually, it's quite easy! :)
site_not_found.png
Go to the Manuals Index link and both CAN updates are at the bottom of the page.

Frustrating maybe, but the files have been updated recently, and I personally think stuff is getting much easier to find and is better organised than before, so I'd bookmark that link. :)

Mike
Yamaha GTS1000 v2 MicroSquirt, B&G 2.891
Yamaha GTS1000 v3 beta MicroSquirt, B&G3.760
Yamaha GTS1000 MSExtra 3.1, Dual VR Board
Yamaha YZF1000 MSExtra 3.1
MWPau
Master MS/Extra'er
Posts: 411
Joined: Thu Mar 03, 2011 6:24 pm

Re: CAN Communications.

Post by MWPau »

Ah so it is :P
I only kept this page bookmarked, so missed it: http://www.msextra.com/manuals/ms3manuals/
Toyota Celica GT4/Alltrac with 5S-GTE stroker (2.2L I4 turbo, high CR) on E85 w/FlexFuel.
MS3 + MS3X + KnockBoard + RTC + BT + DIY CAN-IO-Board + DIY CAN Digital Dash.
Post Reply