Page 1 of 1

New code version v2.890

Posted: Sun Mar 08, 2009 6:15 am
by grippo
In testing his Honda 4 cylinder CBR dyno engine with a microsquirt Bruce found 2 things that I was able to improve upon in the code. The first was that at rpms above 6000 the flat line in the VR sensor curve for the missing tooth gap would go slightly above 0 and cause an extra tooth leading to loss of synch. He fixed it by a resistor tweak to the bias, but asked why the tooth wasn't thrown out by the extra tooth rejection logic. I checked the code and found that there was a subtle problem with the code. It only affected the missing tooth section - it worked fine for spikes between all the regular teeth, but these teeth typically don't have a long flat section. I fixed this, Bruce went back to the old resistor, and he was able to run up and down to 13000 rpm over and over with no resynchs, using the stock microsquirt VR circuit. So this might help a lot of problems that people have been having. There is one caveat though. The rejection logic is not applied during a tach pulse for which there is already enough calculation time required (for rpm, spark and fuel timing). So if a tach pulse occurs on the first tooth after missing gap (DelayTooth = 0), the rejection logic will not be applied. This didn't affect Bruce because he had a DelayTooth > 0. If people do have the problem, they can set DelayTooth to 1 and adjust trigger offset accordingly.

The second problem was that whenever the engine stalled in the process of tuning (it was especially cold at the time) he had to power cycle the microsquirt or else he had to crank and crank and the engine never started - it never got synch or it took a long time. After checking the code I found that when you lose synch the PulseTol was left at the last setting, and this made sense for a resynch which happens while you are driving and it immediately resynchs with only a small glitch. But for a stall, it uses the running PulseTol and it can be hard to start with that small a tolerance. So I put a check there so if rpm was cranking it would reset PulseTol to cranking. This fixed that problem.

Both of these fixes are in the attached code version v2.890. This code can be used with the latest ini file, but just ignore the mismatched version number message. Lance will put out an ini with correct version number when he gets a chance.

Re: New code version v2.890

Posted: Sun Mar 08, 2009 6:45 am
by 65looter
There's no file attached.

Re: New code version v2.890

Posted: Sun Mar 08, 2009 12:01 pm
by grippo
I'm an "misinformed person". Here are the attachments.

Re: New code version v2.890

Posted: Sun Mar 08, 2009 12:07 pm
by 65looter
Thanks, is this code now the new stable version taking over 2.888a ?

Re: New code version v2.890

Posted: Sun Mar 08, 2009 12:09 pm
by grippo
Yes.

Re: New code version v2.890

Posted: Sun Mar 08, 2009 12:09 pm
by 65looter
Thanks, will load it up next week-end (now that I can start my engine...)

Re: New code version v2.890

Posted: Sun Mar 08, 2009 12:29 pm
by Bernard Fife

Re: New code version v2.890

Posted: Wed Jan 13, 2010 3:09 am
by mittie
Hello mates. I'm new to MS, but I've studied merely all of the materials on the site and realized MS is very powerful ECU. So I want to use it on my vehicle.
Sorry for the long introduction, so the point is. I want to use an MSII on my car but I want also to understand and customize the firmware to my needs. And here is the problem.
I've searched all over the MS web site, sourceforge and didn't find latest version of Codewarrior project (I mean 2.890 project). I tried to mix the project v2.30 with the main.c v2.890 without any success,
Codewarrior throws a whole bunch of errors during build process, so I guess there should be some updates not only to main.c file, but to the rest of the files in the project (like headers etc.). So can anybody tell me how to mix newer virsions main.c with the older 2.3 version project? Or where can i download the whole 2.890 Codewarrior project?
Thanks anyway.