MAP conversion

Mike Pitts mpitts at mail.emi.net
Sat Sep 26 15:12:34 GMT 1998


This is a multi-part message in MIME format.

------=_NextPart_000_0011_01BDE93D.7E858B80
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

>Um, you may find that, except in the ECM init code, that anything
>below 26 sets the result to 0.  (The init code in a lot of ECMs
>forgets to check for the underflow.)

You're right, that was from the init code and further in the ECM=20
it does do an underflow check.

>;One bar MAP sensor to KPa conversion
>;KPa =3D (n - 26) * 151/128 * 5/16 + 20

This formula doesn't seem to work out the same as what I=20
have.  I've found the MAP A/D value to kPa formula in my=20
ECM is (MAP / 2.71) + 10.35 as follows:

; ** Convert MAP A/D counts to kPa value in fixed form
; ** 1-Bar MAP: kPa =3D (Counts / 2.71) + 10.35

7F23    F6 01 E7    LDAB        $01E7     ; FilteredRoundedMAPCounts=20
7F26    4F          CLRA                  ; D can be #$0000 to #$00FF
7F27    CE 02 B6    LDX         #$02B6    ; 2.71  (#$015C for 1.36)
7F2A    03          FDIV                  ; X =3D MAP/2.71
7F2B    8F          XGDX                  ; D <-> X
7F2C    C3 0A 59    ADDD        #$0A59    ; 10.35
7F2F    FD 02 78    STD         $0278     ; kPaMAP


>[Heh, heh - I'm now waiting for you to find the MAP to vacuum =
conversion
>code.  It will really throw you for a loop.]

Found it.  It's where they adjust the barometric reading from the=20
MAP value.  Then they create a delta (vacuum).  Seems to be a 2's=20
comp number as well.

; ** Calculate Vacuum reading from difference of MAP and BAR
; ** Vacuum =3D - ((((FilteredBARCounts - FilteredRoundedMAPCounts) * =
0.59) + 0.25) * 2)

A527    C6 97       LDAB        #$97     ; 0.59
A529    B6 03 13    LDAA        $0313    ; FilteredBARCounts
A52C    B0 01 E7    SUBA        $01E7    ; FilteredRoundedMAPCounts
A52F    22 02       BHI         $A533    ; if (FilteredBARCounts > =
FilteredMAPCounts) branch
A531    86 01       LDAA        #$01     ; else A =3D 1
A533    3D          MUL        =20
A534    C3 00 40    ADDD        #$0040
A537    05          ASLD       =20
A538    24 03       BHS         $A53D
A53A    CC FF FF    LDD         #$FFFF
A53D    40          NEGA       =20
A53E    B7 01 EA    STAA        $01EA    ; Store Vacuum

-Mike
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Mike Pitts
Delray Beach, FL
mpitts at emi.net
http://www.emi.net/~mpitts/mike.htm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-----Original Message-----
From: Ludis Langens <ludis at cruzers.com>
To: Diy_efi <diy_efi at esl.eng.ohio-state.edu>
Date: Saturday, September 26, 1998 7:13 AM
Subject: Re: MAP conversion


>"Mike Pitts" <mpitts at mail.emi.net> wrote:
>> Does anyone have an idea as to what the following 1-bar MAP=20
>> conversion is actually calculating.  The application is a CPI=20
>> V6 truck.  The result is used in most of the table lookups which=20
>> use MAP.
>>
>> Value =3D ((((MAPCounts - 26.0) * 0.59) + 0.25) * 2.0)
>>
>> MAPCounts represents the raw A/D counts read from the=20
>> 1-bar MAP sensor.  The formula limits the useable range of=20
>> the MAP from 26 to 242 counts (20 kPa to 97 kPa).  Anything=20
>> outside of that range causes the value to set to 255.=20
>
>Um, you may find that, except in the ECM init code, that anything
>below 26 sets the result to 0.  (The init code in a lot of ECMs
>forgets to check for the underflow.)
>
>Here are some constants which I've found used in several different =
ECMs:
>
>oneBarScale  EQU 151     ;One bar MAP magnification
>oneBarOffset EQU 26      ;26..242..243 =3D> 0..255..256
>
>twoBarScale  EQU 160     ;Two bar MAP magnification
>twoBarOffset EQU 28      ;28..232..233 =3D> 0..255..256
>
>And here are two conversion tables I've generated:
>(Use a fixed width font and at least 77 columns.  The first of these
>tables matches a conversion performed by Diacom.)
>
>;One bar MAP sensor to KPa conversion
>;
>;KPa =3D (n - 26) * 151/128 * 5/16 + 20
>;
>;      :     0      1      2      3      4      5      6      7      8  =
    9
>;  =
....:....................................................................=



More information about the Diy_efi mailing list