FIRMWARE: version & knock functions

Discussion on Future Megajolt hardware / software upgrades.

Moderators: JeffC, rdoherty, stieg, brentp

Post Reply
4600cc
Posts: 0
Joined: Sun Jul 11, 2004 1:48 am

FIRMWARE: version & knock functions

Post by 4600cc »

A little brief. I'm working on simulation software for megajolt, and I'm pretty much done with simulator part of it, now I'm about to implement communications part.

<img src="http://www.supermotors.org/getfile/3166 ... JPG"></img>

Very little is left for this to become a complete program. I'm not sure how other megajolt software developers feel, but for me a lack of good simulator limits the speed of tuning software development.

Right now is the time to think about what's needed for the future, in terms of firmware functions. This question is really up for Brent. Will there be a version function? How will it look? How about knock sensing function? How will it look?

I'm thinking version function might look something like this:

Send 'V'
Receive DWORD consiting of this structure:
struct TMJVersionInfo {
BYTE FirmwareMajor;
BYTE FirmwareMinor;
BYTE HardwareMajor; // or these two could be reserved for something
BYTE HardwareMinor; //
}


For knock sensing, I'm thinking it should be extension to state data.

Send 'K'
Receive DWORD consisting of this structure:
struct TMJKnockInfo {
BYTE KnockIsPresent; // 0 = no knock, 1 or more = knock is present
BYTE TimingAdjust; // Degrees timing was adjusted
BYTE Reserved1;
BYTE Reserved2;
}

Send 'L'
Receive WORD with size of data about to be trasmitted, then receive State Info and then Knock Info. Function like this could be expanded later on, if more information needs to be send. Size of data is a const that you enter at compile time, and thus no calculations will be needed.



What you think? Let me know.



As far as function I'm adding (to the sim) is as follows:

Send 0xFF
Receive sim structure
struct TMJSimInfo {
char Name[20];
BYTE MajorVersion;
BYTE MinorVersion;
TMJSimSupportedFunctions Supported;
}

struct TMJSimSupportedFunctions {
BYTE func_S;
BYTE func_C;
BYTE func_U;
BYTE func_W;
BYTE Reserved[0xff - 4];



Alex

brentp
Site Admin
Posts: 6275
Joined: Wed Jan 24, 2007 6:36 am

Thanks, Al. These look good.

Post by brentp »

Thanks, Al. These look good. I have my comments below:

Patch level added to firmware:

struct TMJVersionInfo {
BYTE FirmwareMajor;
BYTE FirmwareMinor;
BYTE FirmwarePatch;
BYTE HardwareMajor;
BYTE HardwareMinor;
}

Knock information:

struct TMJKnockInfo {
BYTE KnockIsPresent; // 0 = no knock; > 0 Knock present or intensity
BYTE TimingAdjust; // Degrees timing was adjusted
BYTE KnockLevel; // goes up with consecutive knock signals, reduces as knock is no longer present. Affects timing Adjust above. Behaviour TBD.
}
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

4600cc
Posts: 0
Joined: Sun Jul 11, 2004 1:48 am

I'm not clear about Megajolt's knock features

Post by 4600cc »

Brent, I am 100 percent confused about megajolt's knock sensing abilities. Could be that I just send a day coding, but either way I need some clarifications.


This TMJKnockInfo structure, is it used in the same fasion as 'S' command? For example a tuner might query for knock and display the information in a runtime display. Do I understand this correctly?


What about tuning the knock sensing? Are we going to be able to tune it? If we are, then there should be commands similar to 'C' and 'U', while 'W' would write both config and knock info into flash.

Let me know all these things if you can. If it's too early now, at least let me know how TMJKnockInfo is used, and whether the command for it is 'K'. I got version information working ('V'), and was about to implement 'K', and suddenly got very very confused.

Post Reply