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

Rescaling Tables

Thread Tools
 
Search this Thread
 
Old 05-14-2015, 03:06 PM
  #1  
Supreme Member

Thread Starter
iTrader: (2)
 
bl85c's Avatar
 
Join Date: May 2007
Location: right behind you
Posts: 2,574
Likes: 0
Received 0 Likes on 0 Posts
Car: '85 maro
Engine: In the works...
Transmission: TH700 R4
Axle/Gears: 3.73 posi
Rescaling Tables

I finally have a bit of free time so I decided to dust off my old power adder $6E (PA6E) project. What I need to know is how the main timing table scales the rpm and load values. I need to rescale the load column in the main table to read a smaller portion of the MAP sensor I'm using. Instead of reading 41-257 KPa like it is now (roughly 0-4 volts) how do I rescale it to read 0-100 KPa? I see that there are constants for the min and max of the table but I can't imagine it's as simple as changing those.
Old 05-14-2015, 05:15 PM
  #2  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,401
Likes: 0
Received 215 Likes on 201 Posts
Car: check
Engine: check
Transmission: check
Re: Rescaling Tables

Need to create a 1-bar MAP ADC value from whichever MAP sensor you are using. See mask $58 to do this with a 2-bar MAP sensor.

The 1-bar MAP SD (I call it this for Speed Density) sensor value can be from 20 to 100 KPa. Looks like this:

Code:
	; 
	; Calc 1 bar SD map
	; 
	; L0026 = (MapADC - 26) * 151
	;

	LDAB	#151		; constant, coversion from adc to Kpa
	LDAA	L0058		; adc filtered map
	SUBA	#26		; constant, offset
	JSR	LFC1C		; a = (a * b) / 128
	STAA	L0026		; SD 1-bar map
				; 
	RTS			; And done. . .
The SD 1-bar MAP term can now be used for table look-ups. It ranges from 0 through 255 (BIN value), which makes the standard look-up every 5 KPa (KPa = (N * 0.3125) + 20). Divide by 2 for every 10 KPa, or, can also dual scale the SA table:

Code:
	LDAB 	L0026 		; SD 1-bar map
	CMPB 	#160 		; 70 kpa map
	BCC 	LSA00		; bra if map >= 70 kpa
				; 
	LSRB 			; map /= 2, scaling
	BRA 	LSA01		; map now by 10's
				; 
LSA00:	SUBB 	#80 		; sub offset for change to 5 kpa
				; 
LSA01:	LDX	#LHighSa	; preload high SA table address

RBob.
Old 05-14-2015, 10:14 PM
  #3  
Supreme Member

Thread Starter
iTrader: (2)
 
bl85c's Avatar
 
Join Date: May 2007
Location: right behind you
Posts: 2,574
Likes: 0
Received 0 Likes on 0 Posts
Car: '85 maro
Engine: In the works...
Transmission: TH700 R4
Axle/Gears: 3.73 posi
Re: Rescaling Tables

I'm using the A/D routine at LF2F7 to convert the MAP input, so I can just divide by 3 (it's a tta map) to get what I need, no?
Old 05-15-2015, 07:22 AM
  #4  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,401
Likes: 0
Received 215 Likes on 201 Posts
Car: check
Engine: check
Transmission: check
Re: Rescaling Tables

Originally Posted by bl85c
I'm using the A/D routine at LF2F7 to convert the MAP input, so I can just divide by 3 (it's a tta map) to get what I need, no?
No, here it is from the $58 code for a 2-bar MAP to 1-bar ADC value:

Code:
	;
	; L003D = ((MapAdc * 135) - 400) / 64
	;

 	LDAA 	L003F		; filtered map adc term, 2-bar
 	LDAB 	#135		; 
 	MUL  			; 
 	SUBD 	#400		; 
 	BCC  	LF57B		; 
 	CLRA 			; 
 	CLRB 			; 
				; 
LF57B: 	LSLD 			; AB *= 4 & chk for Ovrflw
 	BCS  	LF581		; 
 	LSLD 			; 
 	BCC  	LF583		; 
LF581: 	LDAA 	#255		; clr ovrflw
				; 
LF583: 	STAA 	L003D		; map, in ADC, scaled to 1 bar
Another way to look at the conversion equation:

Code:
1 bar ADC = ((2BarAdc * 0.527) - 1.5625) * 4
RBob.
Old 05-18-2015, 11:21 PM
  #5  
Supreme Member

Thread Starter
iTrader: (2)
 
bl85c's Avatar
 
Join Date: May 2007
Location: right behind you
Posts: 2,574
Likes: 0
Received 0 Likes on 0 Posts
Car: '85 maro
Engine: In the works...
Transmission: TH700 R4
Axle/Gears: 3.73 posi
Re: Rescaling Tables

Ok I think I have it figured out now. Another question, is it worthwhile on a turbo MAF car to have a spark retard vs intake temp table? Since the MAF essentially takes temp into account by the way it measures airflow I don't think it's worth having, but this may be dependent on whether or not the MAF is ahead or after the turbo/intercooler...
Old 05-19-2015, 06:57 AM
  #6  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,401
Likes: 0
Received 215 Likes on 201 Posts
Car: check
Engine: check
Transmission: check
Re: Rescaling Tables

I think that it is worth having SA reduction based on IAT. That is as long as the IAT is post intercooler (if equipped) and post turbo.

This way if the system starts to heat soak the SA can be reduced to help prevent detonation.

RBob.
Old 05-20-2015, 08:09 PM
  #7  
Supreme Member

Thread Starter
iTrader: (2)
 
bl85c's Avatar
 
Join Date: May 2007
Location: right behind you
Posts: 2,574
Likes: 0
Received 0 Likes on 0 Posts
Car: '85 maro
Engine: In the works...
Transmission: TH700 R4
Axle/Gears: 3.73 posi
Re: Rescaling Tables

I'm having trouble with a section of code I wrote. The spark I'm seeing doesn't match the table. BTW I've removed all the code related to highway mode spark. Here's the section.


;-------------------------------------------------
;
; Lk Up Sp vs Cmnd AFR Tbl
;
;-------------------------------------------------
CEC3: LDX #FFFF
CEC6: LDD L00D5 ; Cmnd AFR
CEC9: IDIV ; Conv to table units
CECA: CMPB #184 ; MAX AFR FOR LK UP
CECC: BLS LCED0 ; BR IF AFR LT
; ... else
CECE: LDAA #184 ; Force MAX AFR FOR LK UP
CED0: LCED0 LDAB #72 ; MIN AFR FOR LK UP
CED2: LDX #$C17F ; INDEX HWY MODE SPARK TBL
CED5: JSR LF3F2 ; 2D lk up, W/MIN VAL
CED8: STAA L0456 ; HU AFR SPARK ADVANCE
CEDB: PSHA ; SAVE AFR SPARK ADVANCE

Last edited by bl85c; 05-22-2015 at 03:37 PM.
Old 05-22-2015, 12:14 PM
  #8  
Supreme Member

Thread Starter
iTrader: (2)
 
bl85c's Avatar
 
Join Date: May 2007
Location: right behind you
Posts: 2,574
Likes: 0
Received 0 Likes on 0 Posts
Car: '85 maro
Engine: In the works...
Transmission: TH700 R4
Axle/Gears: 3.73 posi
Re: Rescaling Tables

Another question, can someone explain how the err 43 test is supposed to work? Because it looks like the section of code at F893 never gets run based on what's in the Start up Spark Decay Rate table at LC18C.
Old 05-23-2015, 11:22 PM
  #9  
Supreme Member

Thread Starter
iTrader: (2)
 
bl85c's Avatar
 
Join Date: May 2007
Location: right behind you
Posts: 2,574
Likes: 0
Received 0 Likes on 0 Posts
Car: '85 maro
Engine: In the works...
Transmission: TH700 R4
Axle/Gears: 3.73 posi
Re: Rescaling Tables

Still looking for a solution to this but it looks like removing the highway spark code caused some other problems as well. I may just move it elsewhere and put it back the way it was.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Azrael91966669
DIY PROM
25
06-20-2017 04:04 AM
antman89iroc
DIY PROM
36
01-31-2016 08:42 AM
86CamaroDan
Engine/Drivetrain/Suspension Parts for Sale
2
09-29-2015 10:08 PM
IROCThe5.7L
DIY PROM
3
09-17-2015 07:48 AM
ULTM8Z
DIY PROM
1
09-16-2015 09:15 AM



Quick Reply: Rescaling Tables



All times are GMT -5. The time now is 02:54 PM.