Page 1 of 3

CAN Communication with MCU

PostPosted: Fri Nov 24, 2017 12:24 am
by Aaron95
Hello.

I trying to Design My own Display.

Before I design Display I need to transfer my data from Motec M800 to my MCU.

(The MCU i use is TRK-MPC5604P - freescale)

I looked through the home page and knew that there is can address range and i have to select my own can address.

Can you check if its right? And if i misunderstand plz tell me how to get M800 address.

And Can i have some information that can help me with tranferring data.

Re: CAN Communication with MCU

PostPosted: Fri Nov 24, 2017 8:47 am
by adrian
The M800 has a default CAN stream as per the attached document. This CAN setup mimics a serial stream in that everything is sent on one address and there is a header and check sum. You can send this on any address you like.

You can also setup custom Data Sets which you can then set to send sequentially if you prefer.

Re: CAN Communication with MCU

PostPosted: Sun Nov 26, 2017 2:21 pm
by Aaron95
Thanks for your reply

I check your upload file and i had a few questions.

First there is no CAN ID.

And If there is. Is it possible to send all the data in one CAN ID?

I know that usually only 8bytes is the maximum by one CAN ID.

Re: CAN Communication with MCU

PostPosted: Sun Nov 26, 2017 3:52 pm
by David Ferguson
The M800 can be programmed for any CAN ID using the ECU Manager -- typical values are 1520 (0x5F0) or 232 (0x0E8). Templates on the dash side typically allow the user to specify the CAN-ID the ECU is sending.

Re: CAN Communication with MCU

PostPosted: Mon Nov 27, 2017 9:36 am
by adrian
Like David said you set the address in the ECU Manager software, this can be (almost) whatever you like.

The default stream that I gave you the information on is sent like a serial stream. All of the data is sent on a single CAN address, 8 bytes at a time. So the first message will have the 4 header bytes and then the first 2 channels (4 bytes, 2 bytes per channel). The next message (on the same address) has 4 channels and so on until all of the channels are sent. You then have the checksum at the end, then the header starts again.

I have attached an image of the raw data coming from the ECU.

If you don't want to configure your device to read this message you can simply set up a custom dataset in the ECU and then transmit that sequentially. This will then just have all of the channels you select, 4 channels per message, on sequential addresses from the base address you select. I have attached another document showing you how this is formatted.

Re: CAN Communication with MCU

PostPosted: Thu Nov 30, 2017 1:04 am
by Aaron95
Thanks for your advise

I tried to handle the motec can address data set.

I tagged the picture below.

Can you check if it right to send data in sequentially.

And i couldn't understand the file you send me about Sequential data set.

<Sequential format transmits each group of 4 channels in custom data set item number order on a
sequentially incremented CAN address starting at the address specified. Up to 16 CAN addresses can be
used for 64 channels, transmitted at the rate specified.>

Re: CAN Communication with MCU

PostPosted: Thu Nov 30, 2017 8:46 am
by adrian
If you want to transmit the channels in a standard sequential manner you need to do the following:

1. Go to Adjust|General Setup|Communications|Setup Custom Datasets
2. Add all of the channels you want to transmit to Data Set 1
3. Go to Adjust|General Setup|Communications|CAN Setup
4. Set CAN 0 Data to 8
5. Set CAN 0 Address to the CAN address you want to use - remembering this is a decimal value, not hex.

With this setup it will transmit the first four channels in your list on the address you set, the next four channels on address + 1 and so on until all of the channels are transmitted.

Re: CAN Communication with MCU

PostPosted: Fri Dec 01, 2017 7:32 pm
by Aaron95
In sequentail data is one item assigned by 2 Bytes?

And to assigned the item. Do i just refer the protocol description?

In general, it is expressed as 125kbps, 500kbps, 1Mbps in CAN communication. In Motec, it is possible to change this speed by user?

Re: CAN Communication with MCU

PostPosted: Mon Dec 04, 2017 9:23 am
by adrian
Yes every channel sent out of the ECU is 2 bytes. The resolution and units are what ever is set in the ECU.

No, if you use a custom data set it will send the messages you select, not the ones in the default setup (see below example).

The ECU can be set to either 1Mbps or 500kbps by going to Tools|Options|Communications.

Re: CAN Communication with MCU

PostPosted: Tue Dec 19, 2017 3:59 pm
by Aaron95
Thank for your help.

Can you tell me the difference of ADL MDD ECU.

And also i check can communication by CANoe but i can't check the data by motec ecu manager and CANoe at the same time.

Is there way to check data at the same time? (like dual data send)