BLM Cell, ANHT Hack
BLM Cell, ANHT Hack
Code:
L8510: FCB 28 ; 700 RPM, LOW BLM CELL EDGE L8511: FCB 48 ; 1200 RPM, MID BLM CELL EDGE L8512: FCB 80 ; 2000 RPM, HI BLM CELL EDGE ; L8513: FCB 25 ; 28 kpa, LOW BLM CELL EDGE L8514: FCB 50 ; 36 kpa, MID BLM CELL EDGE L8515: FCB 80 ; 45 kpa, HI BLM CELL EDGE
Using TC, I get a direct relationship of the kPa I put in for the boundary to the same value in hex. Using winbin, I dunno what exactly I get.
Anyone care to shed light on the situation?
Well, to solve for N the math is:
KPA= N * .3688 + 10.33
That means the number in decimal (1 to 255)
Mult by .3688
Then add 10.33 to get your map value.
The the map value in KPA (10.3-104.3) has to be scaled into
the 1 - 255 range for the ECM to work with.
Example:
Decimal 128 from the Analog to Digital conversion.
128 * .3688 = 47.2064
47.2064 +10.33 = 57.364
KPA = 57.364
That will give you the airflow map value range.
So to answer your question, the numbers on the Hack appear to be wrong.
Hope that helps.
KPA= N * .3688 + 10.33
That means the number in decimal (1 to 255)
Mult by .3688
Then add 10.33 to get your map value.
The the map value in KPA (10.3-104.3) has to be scaled into
the 1 - 255 range for the ECM to work with.
Example:
Decimal 128 from the Analog to Digital conversion.
128 * .3688 = 47.2064
47.2064 +10.33 = 57.364
KPA = 57.364
That will give you the airflow map value range.
So to answer your question, the numbers on the Hack appear to be wrong.
Hope that helps.
Last edited by need4speed; Mar 4, 2003 at 04:11 PM.
I'm sorry...I should have been more specific.
I am not concerned with the A to D conversion of the sensor itself. I am trying to find out how the cell boundaries are laid out in the hack.
I gotta head to work...I'll make the point more clear when I get back. Thanks, -85Y
I am not concerned with the A to D conversion of the sensor itself. I am trying to find out how the cell boundaries are laid out in the hack.
I gotta head to work...I'll make the point more clear when I get back. Thanks, -85Y
Well you should. After all that is the number the ECM is going to use to compare to see if it is time to change the BLM cell #.
I think I know what you are asking.
The BLM cells are as follows:
The the value being compared is the Edge number to go into the next cell.
These numbers here:
L8513: FCB 25 ; 28 kpa, LOW BLM CELL EDGE
L8514: FCB 50 ; 36 kpa, MID BLM CELL EDGE
L8515: FCB 80 ; 45 kpa, HI BLM CELL EDGE
Should be these numbers here:
L8513: FCB 25 ; 25 kpa, LOW BLM CELL EDGE
L8514: FCB 50 ; 50 kpa, MID BLM CELL EDGE
L8515: FCB 80 ; 80 kpa, HI BLM CELL EDGE
That means that :
10.3 to 24 KPA will be row 1
25 to 49 KPA will be row 2
50 to 79 KPA will be row 3
80 to 104.3 KPA will be row 4
Same for the RPM.
If you want to change the cell locations, reverse the equation to find the decimal number.
For tuning,
set MAP row 1 to 30 KPA and rows 2 ,3 to 255 (DEC)
set RPM column 1 to 1000 and rows 2,3 to 255 (DEC)
That will give you 2 cells to work with for adjusting the VE table.
It make things easier to tune when the cells are not jumping around.
Also, big cam motors which don't have a lot of Vac, can benefit from moving the Map cells up higher.
I think I know what you are asking.
The BLM cells are as follows:
The the value being compared is the Edge number to go into the next cell.
These numbers here:
L8513: FCB 25 ; 28 kpa, LOW BLM CELL EDGE
L8514: FCB 50 ; 36 kpa, MID BLM CELL EDGE
L8515: FCB 80 ; 45 kpa, HI BLM CELL EDGE
Should be these numbers here:
L8513: FCB 25 ; 25 kpa, LOW BLM CELL EDGE
L8514: FCB 50 ; 50 kpa, MID BLM CELL EDGE
L8515: FCB 80 ; 80 kpa, HI BLM CELL EDGE
That means that :
10.3 to 24 KPA will be row 1
25 to 49 KPA will be row 2
50 to 79 KPA will be row 3
80 to 104.3 KPA will be row 4
Same for the RPM.
If you want to change the cell locations, reverse the equation to find the decimal number.
For tuning,
set MAP row 1 to 30 KPA and rows 2 ,3 to 255 (DEC)
set RPM column 1 to 1000 and rows 2,3 to 255 (DEC)
That will give you 2 cells to work with for adjusting the VE table.
It make things easier to tune when the cells are not jumping around.
Also, big cam motors which don't have a lot of Vac, can benefit from moving the Map cells up higher.
Last edited by need4speed; Mar 7, 2003 at 03:55 PM.
First off, thanks for going through this with me. I am going to add a value in the line to make it easier to see what I am getting at.
I just wrote it that way so I don't have to keep going back and forth with hex and dec.
Now here is the oddity.
When I open TC with these values in my BIN, the formula for the RPM boundary seems to be correct. I use RPM = [Decimal value] * 25 and TC agrees with this.
For MAP, TC uses the direct value of the decimal...as in MAP = [Decimal value]
I went through with GM ECM Edit (uses the WINBIN ECU files) and the equations in the 730 ECUs seem to be wrong, so I can't compare it with that.
I believe this is what you are saying.
I totally understand the crossing of the boundary in order to change cells.
But what I don't understand is this.
TC is saying this.
So here are my questions.
1) TC is saying that the boundary is the decimal value of the hex value. Is this right or wrong?
2) You mention that the corrected version of the hack is...
...you are you using KPA= N * .3688 + 10.33 where [N = Decimal value]. This equation comes from where?
I just realized I am using $8D version X in TC and there is currently a version AF out. Maybe it's time I update that and see if it matches what is going on in this discussion.
Thanks again. -Matt
Code:
L8510: FCB [1Ch, 28d] ; 700 RPM, LOW BLM CELL EDGE L8511: FCB [30h, 48d] ; 1200 RPM, MID BLM CELL EDGE L8512: FCB [50h, 80d] ; 2000 RPM, HI BLM CELL EDGE ; L8513: FCB [19h, 25d] ; 28 kpa, LOW BLM CELL EDGE L8514: FCB [32h, 50d] ; 36 kpa, MID BLM CELL EDGE L8515: FCB [50h, 80d] ; 45 kpa, HI BLM CELL EDGE
Now here is the oddity.
When I open TC with these values in my BIN, the formula for the RPM boundary seems to be correct. I use RPM = [Decimal value] * 25 and TC agrees with this.
For MAP, TC uses the direct value of the decimal...as in MAP = [Decimal value]
I went through with GM ECM Edit (uses the WINBIN ECU files) and the equations in the 730 ECUs seem to be wrong, so I can't compare it with that.
I believe this is what you are saying.
Code:
| | |
12 | 13 | 14 | 15 <- (40 to 104.3 kPa)
| | |
_______|_______|_______|______ HI MAP 39 Kpa
| | |
8 | 9 | 10 | 11 <- (29 to 40 kPa)
| | |
_______|_______|_______|______ MID MAP 28 Kpa
| | |
4 | 5 | 6 | 7 <- (20 to 29kPa)
| | |
_______|_______|_______|______ LO MAP 19 Kpa
| | |
0 | 1 | 2 | 3 <- (10.3 to 20kPa)
_______|_______|_______|______ But what I don't understand is this.
TC is saying this.
Code:
| | |
12 | 13 | 14 | 15 <- (81 to 104.3 kPa)
| | |
_______|_______|_______|______ HI MAP 80 Kpa
| | |
8 | 9 | 10 | 11 <- (51 to 81 kPa)
| | |
_______|_______|_______|______ MID MAP 50 Kpa
| | |
4 | 5 | 6 | 7 <- (26 to 51kPa)
| | |
_______|_______|_______|______ LO MAP 25 Kpa
| | |
0 | 1 | 2 | 3 <- (10.3 to 26kPa)
_______|_______|_______|______ 1) TC is saying that the boundary is the decimal value of the hex value. Is this right or wrong?
2) You mention that the corrected version of the hack is...
Code:
L8513: FCB 25 ; 19 kpa, LOW BLM CELL EDGE L8514: FCB 50 ; 28 kpa, MID BLM CELL EDGE L8515: FCB 80 ; 39 kpa, HI BLM CELL EDGE
I just realized I am using $8D version X in TC and there is currently a version AF out. Maybe it's time I update that and see if it matches what is going on in this discussion.
Thanks again. -Matt
I don't know your level of knowledge with the HC11 processor
or programming in general, so I will try and make it simple.
Please don't think I am talking down to you. I didn't learn
this stuff overnight :)
That formula is a simplified version of the code below.
Starting at line LB178 in the hack I will explain how the
processor does 16 bit math. You will have to know a little
about how the HC11 registers are set up.
Register A and B are 8 bits each. They can be combined and
used as register D (16 bit)
Registers X and Y are 16 bit only.
The first line is obvious. It just saves the A/D result
to the stack to be used in the BARO calc after the map calc.
Tab puts the value from A into B
Clearing A gets rid of any unwanted values.
Load 694 into register X
Now the FDIV operand (fractional divide)
We are going to divide register D by register X.
With DEC 128 in B and 694 in X,
the processor treats reg D as 128 X 65536 = 8388608
The processor then divides 8388608/694 = 12087 result in register X
PSHX,PULA,PULB is just a way to get the result
into reg D (A and B combined).
With base 2 math, the 16 bit result 12087/256 = 47 in reg A and the decimal value .216 (55) in B
Again 16 bit math here.
So by just moving the values from X to D is like dividing it by 256
when a 16 bit value is represented by two 8 bit registers.
12087/256 = 47.216
47 in reg A
55 in reg B which is the .216
Now add 2647 to reg D (A and B combined)
2647 will show up in reg A as 2647/256 = 10.33
10 in reg A, .33 for reg B
Now just simplify the whole thing in English so we can work with it.
1)KPA=(((A/D MAP/694) * 65536) +2647) /256 = (how the code does it)
2)KPA= A/D MAP * .3688 +10.33 (how we do it)
It's a whole lot easier to do step 2 than step 1
I also looked at the BLM code to see what is going on. I'm going to change
my statement that it must cross the boundry to get into the next cell.
This one does not. Using the CMPA then BCC calls, the processor
will jump to the next cell when it EQUALS the value.
Other ECMS do it a different way.
If TC is giving you the correct values shown. The hack it is wrong.
or programming in general, so I will try and make it simple.
Please don't think I am talking down to you. I didn't learn
this stuff overnight :)
That formula is a simplified version of the code below.
Code:
;------------------------------------------ ;SPD DENS MAP = (1 ATMOSP) ; = (((A/D MAP/694) * 65536) +2647) /256 ;------------------------------------------ LB178 PSHA ; THIS SAVES A/D VALUE FOR LATER TAB ; PUT A/D VALUE IN B REGISTER CLRA ; CLEAR REG A LDX #0694 ; LOAD 694 DEC IN REG X FDIV ; DIVIDE REG D BY X PSHX ; SAVE RESULT TO STACK PULA ; GET BACK MSB RESULT FRM STACK PULB ; GET BACK LSB RESULT FRM STACK ADDD #2647 ; ADD DEC 2647 TO REGISTER D STD $0079 ; STORE 16 BIT RESULT
processor does 16 bit math. You will have to know a little
about how the HC11 registers are set up.
Register A and B are 8 bits each. They can be combined and
used as register D (16 bit)
Registers X and Y are 16 bit only.
The first line is obvious. It just saves the A/D result
to the stack to be used in the BARO calc after the map calc.
Tab puts the value from A into B
Clearing A gets rid of any unwanted values.
Load 694 into register X
Now the FDIV operand (fractional divide)
We are going to divide register D by register X.
With DEC 128 in B and 694 in X,
the processor treats reg D as 128 X 65536 = 8388608
The processor then divides 8388608/694 = 12087 result in register X
PSHX,PULA,PULB is just a way to get the result
into reg D (A and B combined).
With base 2 math, the 16 bit result 12087/256 = 47 in reg A and the decimal value .216 (55) in B
Again 16 bit math here.
So by just moving the values from X to D is like dividing it by 256
when a 16 bit value is represented by two 8 bit registers.
12087/256 = 47.216
47 in reg A
55 in reg B which is the .216
Now add 2647 to reg D (A and B combined)
2647 will show up in reg A as 2647/256 = 10.33
10 in reg A, .33 for reg B
Now just simplify the whole thing in English so we can work with it.
1)KPA=(((A/D MAP/694) * 65536) +2647) /256 = (how the code does it)
2)KPA= A/D MAP * .3688 +10.33 (how we do it)
It's a whole lot easier to do step 2 than step 1
I also looked at the BLM code to see what is going on. I'm going to change
my statement that it must cross the boundry to get into the next cell.
This one does not. Using the CMPA then BCC calls, the processor
will jump to the next cell when it EQUALS the value.
Other ECMS do it a different way.
Code:
| | |
12 | 13 | 14 | 15 <- (80 to 104.3 kPa)
| | |
_______|_______|_______|______ HI MAP 80 Kpa
| | |
8 | 9 | 10 | 11 <- (50 to 79 kPa)
| | |
_______|_______|_______|______ MID MAP 50 Kpa
| | |
4 | 5 | 6 | 7 <- (25 to 19kPa)
| | |
_______|_______|_______|______ LO MAP 25 Kpa
| | |
0 | 1 | 2 | 3 <- (10.3 to 24kPa)
_______|_______|_______|______ Last edited by need4speed; Mar 7, 2003 at 03:56 PM.
Trending Topics
You are welcome.
Too bad I goofed!!
I accidently used the A/D value to determine the map boundry.
I meant to use ram location $0079 which will
be from 10.3 to 104.3 decimal
Not 1 - 255 decimal
So yes, after the conversion $0079 is a 1-1 ratio that will be compared against the calibration values at L513,L514,L515.
The hack is still wrong, but hey, mistakes are easily made!!!
Some days are like that I guess
I have corrected the post to reflect the changes.
Sorry..
Too bad I goofed!!
I accidently used the A/D value to determine the map boundry.
I meant to use ram location $0079 which will
be from 10.3 to 104.3 decimal
Not 1 - 255 decimal
So yes, after the conversion $0079 is a 1-1 ratio that will be compared against the calibration values at L513,L514,L515.
The hack is still wrong, but hey, mistakes are easily made!!!
Some days are like that I guess

I have corrected the post to reflect the changes.
Sorry..
Originally posted by need4speed
Too bad I goofed!!
Sorry..
Too bad I goofed!!
Sorry..
Your second to last post where you documented the register clearing, adding, etc. really helped out a bunch. Cheers, -Matt
Thread
Thread Starter
Forum
Replies
Last Post
2012sergen11
Engine/Drivetrain/Suspension Wanted
6
Oct 13, 2015 07:38 PM
3.8TransAM
NW Indiana and South Chicago Suburb
1
Sep 27, 2015 08:37 PM





