Rescaling Tables
#1
Supreme Member
Thread Starter
iTrader: (2)
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.
#2
Moderator
iTrader: (1)
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:
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:
RBob.
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. . .
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.
#3
Supreme Member
Thread Starter
iTrader: (2)
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?
#4
Moderator
iTrader: (1)
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
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
Code:
1 bar ADC = ((2BarAdc * 0.527) - 1.5625) * 4
#5
Supreme Member
Thread Starter
iTrader: (2)
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...
#6
Moderator
iTrader: (1)
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.
This way if the system starts to heat soak the SA can be reduced to help prevent detonation.
RBob.
#7
Supreme Member
Thread Starter
iTrader: (2)
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
;-------------------------------------------------
;
; 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.
Trending Topics
#8
Supreme Member
Thread Starter
iTrader: (2)
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.
#9
Supreme Member
Thread Starter
iTrader: (2)
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.
Thread
Thread Starter
Forum
Replies
Last Post
86CamaroDan
Engine/Drivetrain/Suspension Parts for Sale
2
09-29-2015 10:08 PM