DIY PROM Do It Yourself PROM chip burning help. No PROM begging. No PROMs for sale. No commercial exchange. Not a referral service.

3 Bar map w/$58????

Thread Tools
 
Search this Thread
 
Old 07-08-2005, 07:53 PM
  #1  
Member

Thread Starter
 
TurboedTPI's Avatar
 
Join Date: Apr 2004
Location: on the street
Posts: 467
Likes: 0
Received 1 Like on 1 Post
Car: 92 Formula 350
Engine: L98 with a T-76
Transmission: ArtCarr 700-R4
Axle/Gears: Bone stock 10bolt and 3.23's
3 Bar map w/$58????

I know you need a special bin to use a 3 bar map sensor with the $58 but where can I get it or research it? Thanks
Old 07-08-2005, 07:59 PM
  #2  
Supreme Member
 
Grumpy's Avatar
 
Join Date: Jun 2000
Location: In reality
Posts: 7,554
Likes: 0
Received 1 Like on 1 Post
Car: An Ol Buick
Engine: Vsick
Transmission: Janis Tranny Yank Converter
Search for 3 Bar Patch.
Old 05-20-2006, 06:12 PM
  #3  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
I started looking for the $58 3 bar patch using the search tool. The best thread I could find about any 3 bar patch was this:
https://www.thirdgen.org/forums/diy-...ht=3+Bar+Patch

There was lots of mis-information about resolution and other stuff but not much about if a public 3 bar patch is available.

Is it true that there is no public 3 bar patch for the $58 code? If it is true, I would rather not waste time searching for something that doesn't exist and start working on a 3 bar patch.

Thanks,
Junk
Old 05-21-2006, 09:53 AM
  #4  
Member
 
1981TTA's Avatar
 
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes on 0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
If you want to do the source code route, Grumpy's already taken care of the hard work.......

https://www.thirdgen.org/forums/diy-...atch-58-a.html
Old 05-21-2006, 10:15 AM
  #5  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Thank you for posting the link. I will spin up a bin and test it out on the bench.

Thank you Grumpy for doing the 3 bar patch. I am going to test it out on the bench first and go though the equation change later. It looks like just the MAP multiply/divider is changed for the mV vs. KPA difference of the 3 bar MAP.
Old 05-21-2006, 01:22 PM
  #6  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
It tested good on the bench. I did the constant change and inserted NOPs in place of the removed code so the bin was easier to diff after the assemble.

I played with the code change on the bench using the latest TunerPro ADS file from NWSTP. The 3-bar boost (KPA) and 3-bar boost (PSI) reads correctly via the ALDL using an air compressor to pressurize the 3-bar MAP sensor.

The "3-bar KPA MAP from 1-bar MAP variable" reports correctly at max boost (28PSI). It reports 67KPA at not boost, no vacuum. It should be reporting around 99KPA at this point. The equation is uses is:
MAP_KPA = (ECM_AtoD_N * 1.23 + 2.2).

The same equation is used for the "3-bar boost (KPA)". I think they should differ. Anyone else come across this "3-bar KPA MAP from 1-bar MAP variable" not reading correctly? Maybe the 3-bar NON-GM MAP sensor I have reads slightly different than a GM 3-bar MAP sensor. I really don't think that this is the case. At sea level it reads 53 A/D counts and at 28PSI it reads 253 A/D counts.
At worse, I will have to make a table to calibrate it. I really don't think that is the case though. I am leaning towards the ADS file needing a tweak.
Old 05-21-2006, 03:54 PM
  #7  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
The 3-bar MAP from 1-bar variable just doesn't seem right.
Here is a plot of the Actual PSI measure with an air pressure gauge in the MAP sensor vs. the ALDL MAP A/D counts.
The second plot is the 3-bar MAP from 1-bar variable vs. the MAP A/D counts.

Anyone see anything strange......like 0 PSI reading 67KPA on the ALDL line?
Attached Thumbnails 3 Bar map w/????-3bar_map.jpg  
Old 05-21-2006, 06:33 PM
  #8  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Here is some 3 BAR MAP data. It looks like it is a non-linearity problem.
The $58 BBZB reports the raw MAP A/D count value (non-filtered) to byte 30 of the ALDL stream. I plotted the MAP A/D count value vs what the MAP should be in KPA. It is non-linear to matter (to me anyway).

The stock ADS file uses the equation of KPA = MAP_AtoD * 1.23 + 2.2. Doing a linear approx. to my MAP sensore gives: KPA = MAP_AtoD * 1.04 + 46

Here is the info that goes along with this. Maybe it isn't such a good idea to try and interpret the ALDL MAP byte 30 location to KPA all the way to 3 bar due to the non-linearity error. Maybe that is why GM did it as 1 bar for ALDL byte 30 and another ALDL byte for Boost KPA.
Attached Thumbnails 3 Bar map w/????-3bar_linear_approx.jpg  
Old 05-21-2006, 06:53 PM
  #9  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
As I dig deep it looks like this piece of code was forgotten about:

LF69E: brclr *L0022,#0x20,LF6AF
ldaa *L003F
cmpa #0x7D
bcs LF6AA
bra LF725
LF6AA: staa *L0017

Not to mention that under overboost (28 PSI), the ALDL starts reading 2.52 PSI. I haven't checked what the injectors BPW do........but I sure hope they are fueling for 28 PSI and not 2.52 PSI.

Last edited by junkcltr; 05-21-2006 at 06:57 PM.
Old 05-21-2006, 10:00 PM
  #10  
Supreme Member
 
Grumpy's Avatar
 
Join Date: Jun 2000
Location: In reality
Posts: 7,554
Likes: 0
Received 1 Like on 1 Post
Car: An Ol Buick
Engine: Vsick
Transmission: Janis Tranny Yank Converter
Originally Posted by junkcltr
Not to mention that under overboost (28 PSI), the ALDL starts reading 2.52 PSI. I haven't checked what the injectors BPW do........but I sure hope they are fueling for 28 PSI and not 2.52 PSI.
I've never seen that happen.
Might try another scanner.
BTW, the 58 code has issues.
Old 05-21-2006, 10:23 PM
  #11  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Originally Posted by Grumpy
I've never seen that happen.
Might try another scanner.
I am not sure yet if the scanner is causing it or there is overflow in the ECM calcs causing it. I only have TunerPro as a scanner for the $58 mask. I am going throught the code to see if the ADS file equations are correct. It sure would be nice if some one running a GM 3-bar with this patch using TunerPro to post if the equations are correct. Anyway, I should be able to figure it out eventually using the $58 code.

Originally Posted by Grumpy
BTW, the 58 code has issues.
Ha ha, the more I add in comments, the more I see that is true. I am learning a lot from it though so maybe when I am done I can try to fix up (maybe mess up) some of it or have a decent idea of how to add some boost code to the $8D mask. I like the $8D better. It would have been nice if GM made an ECM that did SEFI, DIS, and boost for the V8s.
Old 05-22-2006, 02:05 AM
  #12  
Member
 
1981TTA's Avatar
 
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes on 0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
I think the problem is with your sensor. Did you log the sensor voltage vs. pressure? The $58 code simply applies a linear equation to do the conversion of A/D counts to MAP. The $0039 location simply shows the actual A/D counts. I know not all MAP sensors share the same transfer function......

As I dig deep it looks like this piece of code was forgotten about:

LF69E: brclr *L0022,#0x20,LF6AF
ldaa *L003F
cmpa #0x7D
bcs LF6AA
bra LF725
LF6AA: staa *L0017
Yep, have to update the BARO properly. Also, the default BARO cals will have to be changed accordingly, too. (If you are concerned about default operation....)
Old 05-22-2006, 05:11 AM
  #13  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
I did find that I need to do a 2D lookup table for the 3-bar sensor I am using. A simple linear equation is not a good match for it. The 100 KPA point is at 53 A/D counts where as a linear MAP would have it around 85 A/D counts. So, this MAP sensor is more accurate for boost conditions. That is really where I will be using it anyway. I could have went to a polynomial, but the lookup is easier and more precise.

I posted the error with the current 3-bar patch at https://www.thirdgen.org/forums/diy-...atch-58-a.html. Yes, the default at 0xC034 (or 0xC334, I forget) needs to be changed also.
Old 05-22-2006, 06:32 AM
  #14  
Supreme Member
 
Grumpy's Avatar
 
Join Date: Jun 2000
Location: In reality
Posts: 7,554
Likes: 0
Received 1 Like on 1 Post
Car: An Ol Buick
Engine: Vsick
Transmission: Janis Tranny Yank Converter
Originally Posted by junkcltr
I like the $8D better.
Then why not just add the 3 bar to the 8D, rather then trying to figure out the 58's problems?.
Old 05-22-2006, 08:50 AM
  #15  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Originally Posted by Grumpy
Then why not just add the 3 bar to the 8D, rather then trying to figure out the 58's problems?.
Wastegate control, boost spark control, boost VE tables. All that keeps me using the $58 for a while. Once I have a better handle on how the $58 does everything, then I might look to modifying the $8D code. The $58 is simple and does what I need it to at this point in the project (starts, idles, does WOT). It doesn't have coolant fan anticipate code which is a pain in the butt. When I really start needing more then I may play with the $8D code, but that would be a long time from now.

I chose the $58 because I knew nothing about turbos and wanted to learn how they worked and how an ECM could operate them (optimally or not optimally). I understand how the turbo thingy work somewhat (still in the novice category), so now I am focusing more on the ECM aspect. I have been learning a lot just commenting the $58 BBZB code, so it is not time wasted. It will help a lot if I look into modifying the $8D later on.
Your advice on using the $8D is good, but I am just not ready for it yet.
Old 05-22-2006, 02:36 PM
  #16  
Member

 
skwayb's Avatar
 
Join Date: Jun 2004
Posts: 157
Likes: 0
Received 0 Likes on 0 Posts
Car: 93 GMC Typhoon
Engine: 4.3L V6 Turbo Charged
Transmission: 4L80e
Originally Posted by Grumpy
BTW, the 58 code has issues.
Grumpy can you fill us in on what the issues are so we don't waste time playing with bad code?
Old 05-22-2006, 02:49 PM
  #17  
Member

 
skwayb's Avatar
 
Join Date: Jun 2004
Posts: 157
Likes: 0
Received 0 Likes on 0 Posts
Car: 93 GMC Typhoon
Engine: 4.3L V6 Turbo Charged
Transmission: 4L80e
Originally Posted by junkcltr

I played with the code change on the bench using the latest TunerPro ADS file from NWSTP. The 3-bar boost (KPA) and 3-bar boost (PSI) reads correctly via the ALDL using an air compressor to pressurize the 3-bar MAP sensor.

The "3-bar KPA MAP from 1-bar MAP variable" reports correctly at max boost (28PSI). It reports 67KPA at not boost, no vacuum. It should be reporting around 99KPA at this point. The equation is uses is:
MAP_KPA = (ECM_AtoD_N * 1.23 + 2.2).

The same equation is used for the "3-bar boost (KPA)". I think they should differ. Anyone else come across this "3-bar KPA MAP from 1-bar MAP variable" not reading correctly? Maybe the 3-bar NON-GM MAP sensor I have reads slightly different than a GM 3-bar MAP sensor. I really don't think that this is the case. At sea level it reads 53 A/D counts and at 28PSI it reads 253 A/D counts.
The equation MAP_KPA = (ECM_AtoD_N * 1.23 + 2.2) is directly from the Datamaster Manual. They couldn't locate one from GM so they did experiments and determined this was the best formula to match the graph. It may not be 100% correct but is the best one we could locate for 3 Bar. If anyone knows a better one, please chime in.

Make sure you have the latest ADS file off NWSTP (Rev 6a). I correct a couple of errors in it a couple of weeks ago.

Ok now for boost.... it gets a little tricky. From what I can see the ECM doesn't output anything to byte 44 or 45 until you hit 100 kpa. (0 PSI). The stock 2 Bar Datastream definitions has these formulas for boost and desired boost.

45 BSTPRESS TURBO BOOST PRESSURE
KPa = N/1.28
In Tuner Pro the Forumla is kPa = 0.78125 * N

46 DESBOOST DESIRED TURBO BOOST PRESSURE
KPa = N/1.28
In Tuner Pro the Forumla is kPa = 0.78125 * N

The ECM only outputs 1 BAR KPA on Byte 30 in the ALDL Stream. You can use the same formula that is used for Boost on the 1 BAR variable (KPa = N/1.28, In Tuner Pro the Forumla is kPa = 0.78125 * N) to calculate the 2 Bar KPA equivalent.

So on 3 Bar, the formula to convert the 1 BAR output (byte 30) to 3 Bar MAP is kpa = 1.22*N + 2.2 like you previous stated. Seeing that the same formula on the 2 Bar conversion of the 1 BAR MAP was used for Boost, I applied the same logic to the Boost Variables for 3 BAR and used kpa = 1.22*N +2.2 for both boost formulas. Now, if you enter in that formula and look at the range in Tuner Pro you will see it goes up to 300 kPa. So that is correct. 0 - 100 kpa is under Vaccum. 100 - 300kPa is under boost. Now if you look at the boost formula in PSI, I converted the kPa to PSI by multiplying the numbers by .14504. Since nothing is output until 100kPa is hit, then it should work and only display 0 - 30 PSI even though in tunerpro it says the forumula will output up to 45psi.

If you come up with a better way to calculate the 3 BAR kPa and PSI, let me know.

Last edited by skwayb; 05-30-2006 at 01:54 AM.
Old 05-22-2006, 03:07 PM
  #18  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Originally Posted by skwayb
The equation MAP_KPA = (ECM_AtoD_N * 1.23 + 2.2) is directly from the Datamaster Manual. They couldn't locate one from GM so they did experiments and determined this was the best formula to match the graph. Make sure you have the latest ADS file off NWSTP. I correct a couple of errors in it a couple of weeks ago.
Sounds about right for a GM 3-bar (linear) MAP. I had to calibrate my 3-bar MAP the same way. It wasn't a TP ADS equation problem.......it was that my 3-bar NON-GM MAP is not linear at all around 0PSI and vacuum. I will grab the latest ADS at NWSTP and diff it against the version I am using. Thank you for the heads up on that.



Originally Posted by skwayb
Ok now for boost.... it gets a little tricky. From what I can see the ECM doesn't output anything to byte 44 or 45 until you hit 100 kpa. (0 PSI). The stock 2 Bar Datastream definitions has these formulas for boost and desired boost.

45 BSTPRESS TURBO BOOST PRESSURE
KPa = N/1.28

46 DESBOOST DESIRED TURBO BOOST PRESSURE
KPa = N/1.28

The ECM only outputs 1 BAR KPA on Byte 30 in the ALDL Stream. You can use the same formula on the 1 BAR variable (KPa = N/1.28) to calculate the 2 Bar KPA equivalent.
The source code I posted at: https://www.thirdgen.org/forums/di...atch-58-a.html shows exactly how the 1-bar and 2-bar bytes are broken up and how they are reported on the ALDL. What you said is entirely correct.

The problem is with the 3-bar patch. It calculates the boot variable as:
BOOST_MAP_A2D = MAP_A2D_count - MEM[0x0017]. Where MEM[0x0017] is the non-boosted MAP_A2D count. Since the 3-bar patch still uses a value of 0x7D (125d) (2-bar, 100KPA) instead of 0x55 (85d) (3-bar, 100KPA) then the Boost byte 45 is wrong.

BOOST_MAP_A2D = MAP_A2D_count - 0x7D
should be (for 3-bar)
BOOST_MAP_A2D = MAP_A2D_count - 0x55

Therefore, when the 3-bar reads an MAP A/D of 127, it will report 127-85 = Positive boost.

Also, the patch creates the MAP value used for calculating the injector BPW.
The stock 1-bar is: (FILT_MAP_A2D * 189d) + 21d + carry_bit
The stock 2-bar is: (FILT_MAP_A2D * 211d) + 8d + carry_bit
The 3-bar patch is: FILT_MAP_A2D

The 3-bar patch makes no sense to me from a logical point of view. It looks like it was created by trial and error. It really should be using a multiplier greater than 211d, but then the value interpolates to 298d.........and then overflow can occur when the MAP value for fueling is created.

Lots of stuff to take into account when going 3-bar........I am still trying to figure it out.

Last edited by junkcltr; 05-22-2006 at 03:10 PM.
Old 05-23-2006, 12:22 PM
  #19  
Member

 
skwayb's Avatar
 
Join Date: Jun 2004
Posts: 157
Likes: 0
Received 0 Likes on 0 Posts
Car: 93 GMC Typhoon
Engine: 4.3L V6 Turbo Charged
Transmission: 4L80e
Well the 3bar code I am using isn't the same one Grumpy came up with. I am using the one Brian Green/Dig made years ago that is in a chip I bought from Brian Green. It probably isn't as accurate as Grumpys but it is well known in the Sy/Ty world and many chips are based off it. I was told it is about 6% off when compared to Grumpys code. I need to look into it some more.
Old 05-23-2006, 12:41 PM
  #20  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,432
Likes: 0
Received 225 Likes on 211 Posts
Car: check
Engine: check
Transmission: check
Originally Posted by junkcltr
Also, the patch creates the MAP value used for calculating the injector BPW.
The stock 1-bar is: (FILT_MAP_A2D * 189d) + 21d + carry_bit
The stock 2-bar is: (FILT_MAP_A2D * 211d) + 8d + carry_bit
The 3-bar patch is: FILT_MAP_A2D

The 3-bar patch makes no sense to me from a logical point of view. It looks like it was created by trial and error. It really should be using a multiplier greater than 211d, but then the value interpolates to 298d.........and then overflow can occur when the MAP value for fueling is created.

Lots of stuff to take into account when going 3-bar........I am still trying to figure it out.
The 3-bar patch is using a multiplier greater then 211d, it is 256d. Here is the correct equations:

The stock 1-bar is: ((FILT_MAP_A2D * 189d) / 256) + 21d + carry_bit
The stock 2-bar is: ((FILT_MAP_A2D * 211d) / 256) + 8d + carry_bit
The 3-bar patch is: FILT_MAP_A2D

The 3 bar can also be written as such:

The 3-bar patch is: (FILT_MAP_A2D * 256d) / 256

But it isn't being multiplied. It is just being left as is.

RBob.
Old 05-23-2006, 12:54 PM
  #21  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Originally Posted by RBob
The 3-bar patch is using a multiplier greater then 211d, it is 256d. Here is the correct equations:

The stock 1-bar is: ((FILT_MAP_A2D * 189d) / 256) + 21d + carry_bit
The stock 2-bar is: ((FILT_MAP_A2D * 211d) / 256) + 8d + carry_bit
The 3-bar patch is: FILT_MAP_A2D

The 3 bar can also be written as such:

The 3-bar patch is: (FILT_MAP_A2D * 256d) / 256

But it isn't being multiplied. It is just being left as is.

RBob.
Correct. And it underestimates fuel. A correct 3-bar patch would have the equation as:
The 3-bar should be: ((FILT_MAP_A2D * 200d*1.5d) / 256) + 8d + carry_bit

The 3-bar should be: ((FILT_MAP_A2D * 300d) / 256) + 8d + carry_bit

This is correct and verified with a spreadsheet. Use that eqn. and compare against the 3-bar patch eqn. and you will see it under estimates fuel. Plug in a 3-bar MAP A/D count value for the 3-bar patch eqn. and the 3-bar eqn. I posted. You will see the MAP term sent to the Fuel eqn. difference.

Would it be better or easier to see if I posted the spreadsheet showing the Hex values and the equations and how the 3-bar patch underestimates fuel?
Old 05-23-2006, 01:57 PM
  #22  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Here is what I had in mind. Notice the *L003Ax is not a real memory location and a free memory location will need to be used for the new MAP fuel term variable

Code:
	;; 
	;; Modified Grumpy's 3 bar patch (5/23/2006)
	;; 
	ldab	#0xCB		; #0x87 load reg_b with 0xCB (203d)
	mul			; multiply filtered MAP A/D (0x00-0xFF) by 0xCB (203d), result is xx.yy
	subd	#0x0190		; (FILT_MAP_A2D * 203d) - 400d
	bcc	LF57B		; br if (FILT_MAP_A2D * 203d) is greater than 400d
	clra			; clr result if less than 400d, clr if MAP A/D is less than 0x02 (3d) (for 2-bar)
	clrb			; clr result if less than 400d, clr if MAP A/D is less than 0x01 (2d) (for 3-bar)
LF57B:	lsld			; 2 * [(FILT_MAP_A2D * 203d) - 400d]
	bcs	LF581		; br if overflow
	lsld			; 2 * {2 * [(FILT_MAP_A2D * 203d) - 400d]}
	bcc	LF583		; br if no overflow, overflow occurs when MAP A/D is 0x7D (125d) or about 104.84 KPA
				;  for a 2-bar MAP,	overflow when 3-bar MAP A/D is 83d (0x53), 104.3 KPA 
LF581:	ldaa	#0xFF		; else, overflow occurred, clamp calc. MAP value to 0xFF
LF583:	staa	*L003D		; save MSB as calc. MAP value (for calc. Load MAP stuff)
	ldaa	*L003F		; get the filtered MAP A/D value
	ldab	#0xFA		; #0xC8  load reg_b with 0xC8 (200d) for 2-bar, load with 0xFA (300d) for 3-bar
	mul			; (FILT_MAP_A2D * 200d or 300d), overflow DOES NOT happen here for 2-bar
	adca	#0x08		; (FILT_MAP_A2D * 200d or 300d) + 8d + carry_bit, overflow DOES NOT happen here for 2-bar
	;; check for 3-bar overflow, clamp to 0xFF if overflow (over flow occurs at 3-bar MPA value of 271KPA,
	;; 3-bar MAP A/D count of 219d (0xDB), so all BPW fuel MAP calcs would be lean from 271 KPA to 315 KPA
	ldab    #0x01		; default; assume no overflow and load the MAP_FOR_BPW_3BAR value  (fuel multiply by 1)
	stab    *L003Ax		; save the MAP_FOR_BPW_3BAR term (that is used at approx. addr. 0xD684 fuel equation)
  	bcc	LF58C		; branch if no overflow from 3-bar MAP
	staa	*L003Ax		; else, overflow occurred, save the new MAP_FOR_BPW_3BAR term for the fuel calc.
  	ldaa	#0xFF		; clamp the MAP value used for BPW calc. to 0xFF
LF58C:	staa	*L003A		; save MSB as calc. filtered MAP A/D value for injector BPW calculation
	rts			; return to caller
	;; -------------------------------------------------------	
LF58F:	staa	*L003D		; 2-bar MAP not installed, do MAP fuel calc. for 1-bar MAP sensor
	ldab	#0xBD		; load reg_b with 0xBD (189d) for 1-bar
	mul			; (FILT_MAP_A2D * 189d)
	adca	#0x15		; (FILT_MAP_A2D * 189d) + 21d + carry_bit, overflow DOES NOT happen here
	staa	*L003A		; save MSB as calc. filtered MAP A/D value for injector BPW calculation
	ldab    #0x01		; default; load the MAP_FOR_BPW_3BAR value  (multiply by 1)
	stab    *L003Ax		; save the MAP_FOR_BPW_3BAR term
	rts
	;; -------------------------------------------------------
	;; LAG Filter
	;; 
	;; New Y value is returned in reg_a and reg_b
	;; 
	;; Inputs:	reg_x = old value Y0
	;;		reg_a = input X
	;;		reg_b = filter coefficient K
	;; Output:	reg_a = Y MSB
	;;		reg_b = Y LSB
	;; 
	;; Y = Y0 + K * (X - Y0) = Y0 + K*X - K*Y0
	;; Y = new value
	;; Y0 = old value
	;; X = input
	;; K = coefficient
Old 05-23-2006, 03:47 PM
  #23  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Originally Posted by skwayb
Well the 3bar code I am using isn't the same one Grumpy came up with. I am using the one Brian Green/Dig made years ago that is in a chip I bought from Brian Green. It probably isn't as accurate as Grumpys but it is well known in the Sy/Ty world and many chips are based off it. I was told it is about 6% off when compared to Grumpys code. I need to look into it some more.
Is that patch public or closed source? It cracks me up to see closed source code when it is all derived from open source GM code. The "you can't reverse engineer my code that was created from open source code" is a riot. Ok, enough rambling.

The Grump patch is off by about (256/300) or 15% in terms of MAP fueling. It is off by about 204/211 or 3% in terms of the "Load MAP" variable. It is off by a varying amount for ALDL byte 45 (boost pressure). It is off when things overflow and "default" CAL data values are used. Not trying to pick on it, it is just off in a lot of areas.

So where is the 6% difference between the BG/Dig patch vs. Grumpy's patch? I wonder which is closer to theoretically correct?

HHHHhhhhmmmm, how did I end up getting into all this? All I wanted to do is record some exhaust gas back pressures. All go stuff, I am sure I will use the 3-bar for the intake eventually.
Old 05-23-2006, 03:49 PM
  #24  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,432
Likes: 0
Received 225 Likes on 211 Posts
Car: check
Engine: check
Transmission: check
Are you referring to a 3 bar GM sensor or your sensor?

Also, the GM 2 bar routine uses this equation to create the PW MAP term:

The stock 2-bar is: ((FILT_MAP_A2D * 200d) / 256) + 8d + carry_bit

Which is different then what you posted.

RBob.
Old 05-23-2006, 03:57 PM
  #25  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Originally Posted by RBob
Are you referring to a 3 bar GM sensor or your sensor?

Also, the GM 2 bar routine uses this equation to create the PW MAP term:

The stock 2-bar is: ((FILT_MAP_A2D * 200d) / 256) + 8d + carry_bit

Which is different then what you posted.

RBob.
Stock GM 3-bar (linear, at least I was told that it was). My sensor is totally different. I do a 2-D lookup after the A/D read before the value is stored to 0x0039. The 2D lookup does a piece wise linearize for my non-linear NON-GM MAP sensor.

True, the eqn. I posted was in error with the 211d constant. It should have been as you posted. That is why I posted that for a 3-bar the multiplier should be 1.5*200d = 300d.
That is, 3-bar gets a 300d, 2-bar gets a 200d multiplier. Plug in some 3-bar linear MAP values and you will see that Grumpy's patch does under estimate fuel. Or look at the example I gave for a MAP value of 141KPA.
Old 05-23-2006, 05:23 PM
  #26  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,432
Likes: 0
Received 225 Likes on 211 Posts
Car: check
Engine: check
Transmission: check
Originally Posted by junkcltr
Stock GM 3-bar (linear, at least I was told that it was). My sensor is totally different. I do a 2-D lookup after the A/D read before the value is stored to 0x0039. The 2D lookup does a piece wise linearize for my non-linear NON-GM MAP sensor.

True, the eqn. I posted was in error with the 211d constant. It should have been as you posted. That is why I posted that for a 3-bar the multiplier should be 1.5*200d = 300d.
That is, 3-bar gets a 300d, 2-bar gets a 200d multiplier. Plug in some 3-bar linear MAP values and you will see that Grumpy's patch does under estimate fuel. Or look at the example I gave for a MAP value of 141KPA.
3-bar gets a 300d, 2-bar gets a 200d multiplier

And the 1 bar uses a multiplier of 189d. Using 300d for a 3 bar doesn't add up. . .

RBob.
Old 05-23-2006, 05:46 PM
  #27  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Originally Posted by RBob
3-bar gets a 300d, 2-bar gets a 200d multiplier

And the 1 bar uses a multiplier of 189d. Using 300d for a 3 bar doesn't add up. . .

RBob.
Yes, it adds up the way I see it. ALDL MAP 2-BAR = N*.781+8. ALDL MAP 3-BAR = N*1.23+2.2.

3-bar gain over 2-bar is 1.23/.781 = 1.57 ~= 1.5

Basically, you want the value that is sent to the fuel eqn. to have the same KPA vs. fuel term as it was with a 2-bar sensor. A constant of 300d does this.

That is exactly what Grumpy did with the change from 135d to 211d for the "Load MAP" variable calc., but for the MAP fuel term he didn't do the calc. and just approximated it by using the straight MAP A/D value as the fuel term. He is doing the "triple" thing here by upping the constant from 135d to 211d.........he doesn't have to worry about overflow....because the stock code already checks for overflow. The RANGE is extended for the 3-bar sensor. Just like the 300d constant will do for the fuel term.

I still don't see what you were trying to say about the MAP_FOR_BPW being tripled after this calc. is done to create the 0x003A mem value that is directly multiplied to the running fuel term BPW 0x0074 variable. I know you are getting at something important, but I just can't see it. Maybe it will become apparent when I compile and start playing with the bin on the bench.

Thank you for posting RBob. I don't think you even use the $58 code and you know more about it than the guys that actually run it. Any $58 users out there actually running Grumpy's patch and have some real world info you could add??

Last edited by junkcltr; 05-23-2006 at 05:50 PM.
Old 05-23-2006, 08:09 PM
  #28  
Supreme Member
 
Grumpy's Avatar
 
Join Date: Jun 2000
Location: In reality
Posts: 7,554
Likes: 0
Received 1 Like on 1 Post
Car: An Ol Buick
Engine: Vsick
Transmission: Janis Tranny Yank Converter
Originally Posted by junkcltr
Any $58 users out there actually running Grumpy's patch and have some real world info you could add??
I did, and that part of the code worked.
Like I've been saying thou, there are other issues.
And, it's just a patch, not a rewrite of the code, it was done before there was source code to work with.

Instead of cracking on what I've done, why don't you just rewrite the code as you see fit?. I wish I had the luxury of just looking at others work, and then with the benefit of hindsight, guestion what they'd done.
Old 05-23-2006, 10:56 PM
  #29  
Supreme Member

iTrader: (1)
 
junkcltr's Avatar
 
Join Date: Jan 2002
Location: garage
Posts: 4,432
Likes: 0
Received 1 Like on 1 Post
Engine: 3xx ci tubo
Transmission: 4L60E & 4L80E
Originally Posted by Grumpy
I did, and that part of the code worked.
Like I've been saying thou, there are other issues.
And, it's just a patch, not a rewrite of the code, it was done before there was source code to work with.
As far as I know the only $58 source code out there is the one that I have been working on. I could find no other public source code already out there that was well commented. I'll keep chipping away at it.

Originally Posted by Grumpy
Instead of cracking on what I've done, why don't you just rewrite the code as you see fit?. I wish I had the luxury of just looking at others work, and then with the benefit of hindsight, guestion what they'd done.
I find it interesting how others try to solve problems so I took a look at the patch. I think I will do the 3-bar code differently. I need a 2D lookup table to begin with. In terms of looking at others peoples work.......I really don't think you would be at the point that you are unless you are the ECMGUY or wrote the hac that has the ECMGUYs name on it. Or maybe you never saw it.
I was questioning the 3 bar patch to see if it was correct before just burning a PROM and going for it. Maybe others just burned it in and went on their way. I guess that was the way it was supposed to be intended to be used. I guess I should give up on this and keep going with a patch of my own. It was interesting to look at anyway. I was questioning it to see how it was suppose to work because I didn't see any comments about saying what it was trying to do with the code. It doesn't even say what 3-bar it works with. You told me that directly. I will stop posting to this.......it seems it is an old subject that not many are interested in.
Old 05-24-2006, 12:42 AM
  #30  
Member
 
1981TTA's Avatar
 
Join Date: May 2004
Location: SE Michigan
Posts: 289
Likes: 0
Received 0 Likes on 0 Posts
Car: 81 Turbo Trans Am
Engine: 301 T
Transmission: 200-4R
I was questioning the 3 bar patch to see if it was correct before just burning a PROM and going for it. Maybe others just burned it in and went on their way. I guess that was the way it was supposed to be intended to be used.
My impression is that most people simply baked the difference in fueling into the VE tables to get their engines up and running. Changing the various MAP loads likely would have been done during the engine recalibration effort as well. As Grumpy mentioned, before the days of source code, this patch was a pretty good effort toward getting a 3-bar sensor to "work".

I still don't see what you were trying to say about the MAP_FOR_BPW being tripled after this calc. is done to create the 0x003A mem value that is directly multiplied to the running fuel term BPW 0x0074 variable. I know you are getting at something important, but I just can't see it. Maybe it will become apparent when I compile and start playing with the bin on the bench.
Take a look at the fueling calculation just past where the inverse AFR table is referenced. The beginning part of the BPW calculation (BPC*invAFR*VE*0x003A) is "LSL"ed for a 2-bar MAP sensor selection. Inverse MAT and BLMs are multiplied after that.

I will stop posting to this.......it seems it is an old subject that not many are interested in.
I don't know that people aren't interested as much as most of these details are way over the heads of the vast majority reading this!
Old 05-24-2006, 08:50 PM
  #31  
Member
iTrader: (1)
 
midniteplowboyy's Avatar
 
Join Date: Sep 2004
Location: NE, TX
Posts: 183
Likes: 0
Received 0 Likes on 0 Posts
Car: 91-Z28
Engine: SLOW ONE
I don't know that people aren't interested as much as most of these details are way over the heads of the vast majority reading this!
Thats me, I'm like when it comes to this stuff, I have trouble applying a patch that someone else made, but I want to thank everyone who is much smarter than me, that contributes much to the rest of us,. Maybe one day I will get a grasp on all this or go insane, until then I'll keep reading.
Old 05-25-2006, 07:35 AM
  #32  
Junior Member
 
all spooled up's Avatar
 
Join Date: Jun 2005
Posts: 23
Likes: 0
Received 0 Likes on 0 Posts
Car: 89 IROC-Z / Turbo Grand Prix
Engine: 406 MPFI / 3.1 intercooled turbo
Transmission: 700r4 / HM282 5 speed
Axle/Gears: 4.10 / 3.91
If you think ya got it bad jus try makeing a 8f 3 bar.Every time I mess with it I loose several brain cells.Seems like my time would be better suited in Amsterdam for that.At least the scenery would be different..

Last edited by all spooled up; 05-25-2006 at 07:40 AM.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
BrianChevy
Wheels and Tires
5
10-13-2015 12:33 PM
darwinprice
Organized Drag Racing and Autocross
17
10-11-2015 11:51 PM
loud91rs
Camaros for Sale
7
10-05-2015 10:05 PM
meeklay812
Camaros for Sale
1
10-01-2015 03:46 PM



Quick Reply: 3 Bar map w/$58????



All times are GMT -5. The time now is 12:16 PM.