View Single Post
  #16 (permalink)  
Old November 11th, 2003, 11:15 PM
dennisL's Avatar
dennisL dennisL is offline
Member
 
Join Date: Aug 2002
Location: Marlton, NJ
Trader Rating: (0)
Posts: 114
Eric, you're right the extra multiply I suggested does not work. It looked good on paper, but I should have tested more numbers. The truth is I suffer from premature evaluation.

Your last bit of code will almost do it, but you need to take out the left shift (double it). Then it will work fine for 0 - 200% trim.

Here's what it now looks like:
3BAB: CE 35 6E LDX #$356E X = Fuel Trim vs. RPM (percentage 0-200% in 2% increments) E=N/1.28
3BAE: 96 19 LDAA $19 (load current RPM into A)
3BB0: BD FC 09 JSR $FC09 (do table lookup)
3BB3: 16 TAB B = A (copy A to B)
3BB4: 4F CLRA A = 0 (clear A)
3BB5: C3 00 80 ADDD (add 128 to D)
3BB8: DD 91 STD $91 (FuelTrim = D)
3BBA: 96 8F LDAA $8F (load PE A/F into A)
3BBC: 7E 3C 29 (go do multiply of AFR and fuel trim)

The easiest way to test this is plug in the min/mid/max percentages and check AFR. Eric already did max (200%) and got AFR = 4.66. Using the min (0%), you should get 14.0 AFR and the mid is 100% which should cut the AFR in half to 7:1.
__________________
'87 Buick GN (original owner)
'05 Chrysler 300C (5.7L Hemi)
'06 Impala SS (5.3L V8)
'70 Buick Electra 225 Custom convertable (455/370hp)
Reply With Quote