Actually, someone on the dsm-ecu group posted some code awhile ago to make the ecu read a wideband 0-5v signal. A few people have reported good success.
Oops..
I guess I was a little out of it today. You and KyleT
are correct, and there is no 0x31 involved anywhere.
Also, WB is rich at low volt, while narrowband is
lean at low volt.
The two values seem to be 0x1a -> the value to cycle around
and 0x1f -> a control value, below and above which the car
is running in "lean" or "rich" mode. I would guess that
it's a bit higher so that it won't toggle as much in closed loop?
So, I think the proper change would be:
// old
< d69e: 96 ce ldaa *0xce // O2 sensor
< d6a0: 81 1f cmpa #31 // if O2 < 31 (.5v) (lean)
< d6a2: 24 03 bcc 0xd6a7 // (branch carry clear)
// new
> d69e: 96 ce ldaa *0xce // WBO2 sensor
> d6a0: 81 7a cmpa #122 // if WBO2 >= 122 (2.4v) (lean)
> d6a2: 25 03 bcs 0xd6a7 // (branch carry set)
d6bf: d6 ce ldab *0xce // WBO2 sensor
d6c1: c1 7a cmpb #122 // if WBO2 >= 122 (2.4v) (lean)
d6c3: 25 03 bcs 0xd6c8 // (branch carry set)
d7fc: 96 ce ldaa *0xce // a = WBO2 sensor
d7fe: 81 80 cmpa #128 // WBO2v >= 128 (2.5v) (lean)
d800: 32 pula // a = O2trim
d801: 25 07 bcs 0xd80a // if WBO2v >= 2.5v
e61c: 96 ce ldaa *0xce
e61e: 81 7a cmpa #122 // WBO2 < 2.4v (rich)
e620: 24 02 bcc 0xe624
f08b: d6 ce ldab *0xce // WBO2 sensor
f08d: c1 80 cmpb #128 // WBO2v >= 128 (2.5v) (lean)
f08f: 25 0d bcs 0xf09e
I'll post context in a file, since yahoo removes text formatting..
-Nick
--- In
dsm-ecu@yahoogroups.com, "Kyle Zingg" <blackhole23@w...> wrote:
>
> Nick,
>
> > Max (0x31) is the value above which the car will throw a CEL,
> > Closed loop will cycle as close above and below the other
> > value as it can. Lean is <= 0x1a and will increase O2 trim,
> > rich is > 0x1a and will decrease O2 trim. So the ECU is
> > always increasing or decreasing fuel.
>
> Okay, this makes a lot more sense. Thanks for the clarification, this
> looks very doable.
>
> > I think the locations are:
> > d6a0, d6c1, d7fe, e61e, f08d.
>
> Here's what I've got for code fragments on each side of those
> addresses, does this look correct? I'm still struggling with reading
> hex and picking out the opcodes.

>
> d69f: CE 81 1F
> d6c0: CE C1 1F
> d7fd: CE 81 1A
> e61d: CE 81 1F
> f08c: CE C1 1A
>
> So just change the target value 1A [26d=0.51v=14.7AF] for the
> narrowband O2 to 78 [120d=2.35v=14.7AF] for the wideband O2? That's
> way too simple.

I'm still a little fuzzy on how to change the
> 0x1F / 0x31 DTC limit, I didn't follow Josh & Nick comments [msg
> 3249]. 31h=49d=0.96v, which makes sense as an upper O2 voltage bound.
> But then what is 1F?
>
> Kyle "BlackHole"
> [feeling dumb enough to be a potential Mitsu Darwin award winner]