MS Code...
OddUnit :: The Workshop :: Engine :: Engine Management
Page 1 of 1 • Share •
MS Code...
Well, I've just had a look at the MS code (2.88a) and all I can say is I'm surprised it works...it's a bloody mess to be honest. It seems to be all in one file and isn't particularly well structured....it's bloody awful. All the inputs and outputs are stuck together in two structures as well....crazy. Makes it almost impossible to follow. Using th likes of goto's and continues is really really quite bad.....
I think I'm going to challenge myself to re-write it, along with attempting to incorporate some sort of knock strategy (joint venture with Rob) along with maybe sequential injection, as opposed to batch/bank.
I think I'm going to challenge myself to re-write it, along with attempting to incorporate some sort of knock strategy (joint venture with Rob) along with maybe sequential injection, as opposed to batch/bank.
_________________
Stu
"Take one old performance car, modify it so that it is as good, if not better, than a new performance car"
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]

mrbeige- .:Admin:.
-
Number of posts: 1341
Age: 33
Location: Near Ely, Cambs.......but another planet according to my wife....

Re: MS Code...
mrbeige wrote:Well, I've just had a look at the MS code (2.88a) and all I can say is I'm surprised it works...it's a bloody mess to be honest. It seems to be all in one file and isn't particularly well structured....it's bloody awful. All the inputs and outputs are stuck together in two structures as well....crazy. Makes it almost impossible to follow. Using th likes of goto's and continues is really really quite bad.....
I think I'm going to challenge myself to re-write it, along with attempting to incorporate some sort of knock strategy (joint venture with Rob) along with maybe sequential injection, as opposed to batch/bank.
If you have the time and know how go for it.
I want to buy a MC9S12C64 processor and the means to burn code to it.
Yeah,those input output structures are just rediculous.
Huge.
I guess they are more concerned with making things work rather than presentation,but it would encourage more development participation if it was structured in an easier to read manner.yeah the goto's are bad form.
It is lazy coding.
Obvioulsy all the algorithms work etc I think it would be nice to re-structure it.
I was thinking this morning that it would be nice (if I can find the time) to build a knock interface chip using the For me as a step into it i'd lile to buy a MC9S12C64 to familiarize myself with the chip/compiler etc and its features.
On a side note..
I'd also like to write a document or a how-to for distributor based Volkswagens and the configuring and tuning of under MS.
Not enough hours in the day.

dirtytorque- .:Charged:.

- Number of posts: 1095
Re: MS Code...
Is that the new MS code?
Isn't VR6Joni currently looking at writing his own ECU software? I have no idea how that side of ECUs work!. Assume it's some kind of C+ compiler or something?!
Good luck on the knock algorithm. I hear it's a tough one to write because it needs different parameters for every load and rpm point and isn't linear like MAP.
These are reputed to be excellent, and one of them has a 0-5V output, which can the squirt could use on an Aux in to pull timing - [You must be registered and logged in to see this link.]
It won't be as nice as an OE Bosch knock strategy though, which pulls and reinstates timing progressively.
Isn't VR6Joni currently looking at writing his own ECU software? I have no idea how that side of ECUs work!. Assume it's some kind of C+ compiler or something?!
Good luck on the knock algorithm. I hear it's a tough one to write because it needs different parameters for every load and rpm point and isn't linear like MAP.
These are reputed to be excellent, and one of them has a 0-5V output, which can the squirt could use on an Aux in to pull timing - [You must be registered and logged in to see this link.]
It won't be as nice as an OE Bosch knock strategy though, which pulls and reinstates timing progressively.
kevhaywire- .:Stroked:.

- Number of posts: 506
Re: MS Code...
dirtytorque wrote:If you have the time and know how go for it.![]()
I want to buy a MC9S12C64 processor and the means to burn code to it.
Yeah,those input output structures are just rediculous.
Huge.![]()
I guess they are more concerned with making things work rather than presentation,but it would encourage more development participation if it was structured in an easier to read manner.yeah the goto's are bad form.![]()
It is lazy coding.
Obvioulsy all the algorithms work etc I think it would be nice to re-structure it.
I was thinking this morning that it would be nice (if I can find the time) to build a knock interface chip using the For me as a step into it i'd lile to buy a MC9S12C64 to familiarize myself with the chip/compiler etc and its features.
What's the rough spec of that processor Rob? We're gonna need a DSP chip for the knock aren't we?
dirtytorque wrote:On a side note..
I'd also like to write a document or a how-to for distributor based Volkswagens and the configuring and tuning of under MS.
Not enough hours in the day.
I think that would be very much worthwhile, as the VWs seem to be much more problematic than other mark's dizzy setups...
kevhaywire wrote:Is that the new MS code?
Isn't VR6Joni currently looking at writing his own ECU software? I have no idea how that side of ECUs work!. Assume it's some kind of C+ compiler or something?!![]()
It'd all just written in C and then complied to .s19 (hex) file IIRC. I'm pretty sure the compiler might even be a one of the free ones...
kevhaywire wrote:Good luck on the knock algorithm. I hear it's a tough one to write because it needs different parameters for every load and rpm point and isn't linear like MAP.
These are reputed to be excellent, and one of them has a 0-5V output, which can the squirt could use on an Aux in to pull timing - [You must be registered and logged in to see this link.]
It won't be as nice as an OE Bosch knock strategy though, which pulls and reinstates timing progressively.
Well......
I have access to some fairly complex knock strategies that could be adapted, that determine knock energy i.e. light/heavy knock and pull timing on a cylinder by cylinder and light/heavy basis, rather than just applying a flat 18 degrees across the board, for example.
The difficulty arises with the calibration of them, and as you say it isn't a linear response.

mrbeige- .:Admin:.
-
Number of posts: 1341
Age: 33
Location: Near Ely, Cambs.......but another planet according to my wife....

Re: MS Code...
For calibration I have a oscilloscope that can be hooked up to a pc so I am hoping to get some live data in terms of knock characteristics under different engine conditions.
As for a knock processing chip.
I have some tpic8101's
have a google.
very easy interface .
As for a knock processing chip.
I have some tpic8101's
have a google.
very easy interface .

dirtytorque- .:Charged:.

- Number of posts: 1095
Permissions of this forum:
You cannot reply to topics in this forum





