Help on firmware Editing for interfacing with oem dash

This forum is for the discussion of other projects on Megasquirt/Microsquirt hardware that don't fit into any of the other forums

Moderators: jsmcortina, muythaibxr

Help on firmware Editing for interfacing with oem dash

Postby chaos » Mon Jan 09, 2017 10:30 am

So I have the car running on my MS3Pro, I'd like to get the stock dash to work. I know the oem Ecu was identified as 0x114 and had a few pieces of data in it like rpm coolant temp Ect Ect, I was wondering where in the .ini file I would put my code for this broadcast? Thanks
chaos
MS/Extra Newbie
 
Posts: 3
Joined: Sun Oct 02, 2016 6:39 pm

Re: Help on firmware Editing for interfacing with oem dash

Postby jsmcortina » Mon Jan 09, 2017 10:38 am

Post up any information you have.

The ini file won't help you, that's only for the settings screens. What you would need to do is download the source code in C, edit that, recompile and load the new firmware to your ECU. See also http://www.msextra.com/forums/viewtopic.php?f=91&t=43601

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

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 33978
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Help on firmware Editing for interfacing with oem dash

Postby chaos » Mon Jan 09, 2017 11:01 am

jsmcortina wrote:Post up any information you have.
James


ECU - 0x114:

Engine Speed - 0x114, Byte 0-1, Length 2 Bytes, Little Endian (Intel) format, unsigned, scale 0.25 gets it close to engine RPM but I don't believe that is quite right.
Accel Pedal Position - 0x114, Byte 3, Length 1 Byte, (0-255), unsigned scale 0.4 will get you close to 0-100%
Clutch Position - 0x114, Byte 4, Length 2 bits, offset 4, unsigned,shows clutch position as a 2 bit number 0, 1, 2
Stability / Traction Status (from ECU) - 0x114, Byte 4, Length 1 bit each, offset 2 and 3, one bit set when sport mode active, one bit set when TC is off.

ECU - 0x400:
Engine Temp - 0x400, Byte 5, Length 1 byte, Little Endian, unsigned, scale TBD 1-1 gets somewhat close in F but it is not correct.
Fuel Level - 0x400, Byte 4, Length 1 byte, Little Endian, unsigned, 0-255, 255 is full, 0 is empty. Scale to 60L if you want to estimate remaining litres.

TMPS - I will have to confirm the corners for these and the scale. I don't have it in front of me right now. They are on 0x402, each 1 byte, bytes 0 through 4. Little endian, unsigned.

Its at 500k BAUD
Thats what i have, Im assuming i want to edit the ms3_can.c file. ill have to brush up on C.. thanks for your help
chaos
MS/Extra Newbie
 
Posts: 3
Joined: Sun Oct 02, 2016 6:39 pm

Re: Help on firmware Editing for interfacing with oem dash

Postby jsmcortina » Mon Jan 09, 2017 11:34 am

Before starting editing, you can use the "user defined" broadcast to confirm that those identifiers and data bytes are doing what you expect.

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

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 33978
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Help on firmware Editing for interfacing with oem dash

Postby chaos » Mon Jan 09, 2017 1:36 pm

heres what i want to test with
Code: Select all
id = 0x114
        val = outpc.rpm * .25;
        data[0] = (unsigned char)(val & 0xff); //byte 0 = RPM
        data[1] = (unsigned char)(val >> 8);   //byte 1 = RPM
        data[2] = 0x00;//accel position, ignore for now
        data[3] = 0x00;//accel position, ignore for now
        data[4] = 0x00;//clutch position, ignore for now
        data[5] = 0x00;//clutch position, ignore for now
        data[6] = 0x00;//traction control on/off, ignore for now
        data[7] = 0x00;//traction control on/off, ignore for now
        send_can11bit(id, data, 8);


as well as

Code: Select all
id = 0x400
        data[0] = 0x00;//unused
        data[1] = 0x00;//unused
        data[2] = 0x00;//unused
        data[3] = (unsigned char)(outpc.clt);
        data[4] = 0x00;
        data[5] = 0x00;
        data[6] = 0x00;
        data[7] = 0x00;
        send_can11bit(id, data, 8);



where should i put these to run them in the MS3_Can.C file?
chaos
MS/Extra Newbie
 
Posts: 3
Joined: Sun Oct 02, 2016 6:39 pm


Return to Other Development

Who is online

Users browsing this forum: No registered users and 1 guest