Posted: Wed Feb 16, 2005 11:00 pm
Well, I've actually learned more since the last revision of the scantool, so you'll actually have more in this box than my scantool does. 

A forum for 89-94 BC-BF(BJ) Legacy Owners and Fans
https://bbs.legacycentral.org/
Code: Select all
unsigned char AirflowTrimTable[16*16]={ //256 bytes, 1 entire page of SRAM
//.5, 1,1.5, 2,2.5, 3,3.5, 4,4.5, 5,5.5, 6,6.5, 7,7.5, 8 <<--------kRPM
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=34psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=32psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=30psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=28psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=26psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=24psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=22psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=20psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=18psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=16psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=14psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=12psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=10psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=8psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=6psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; //MAP=4psia
//.5, 1,1.5, 2,2.5, 3,3.5, 4,4.5, 5,5.5, 6,6.5, 7,7.5, 8 <<--------kRPM
unsigned char TimingTrimTable[16*16]={ //256 bytes, 1 entire page of SRAM
//.5, 1,1.5, 2,2.5, 3,3.5, 4,4.5, 5,5.5, 6,6.5, 7,7.5, 8 <<--------kRPM
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=34psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=32psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=30psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=28psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=26psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=24psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=22psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=20psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=18psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=16psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=14psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=12psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=10psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=8psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //MAP=6psia
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; //MAP=4psia
//.5, 1,1.5, 2,2.5, 3,3.5, 4,4.5, 5,5.5, 6,6.5, 7,7.5, 8 <<--------kRPM
//---------------------------------------------------------------------------------
unsigned char BoostSolenoidPwmTable[8*8]={ //64 bytes, 1/4 a page of SRAM
// 1, 2, 3, 4, 5, 6, 7, 8 <<--------kRPM
0, 0, 0, 0, 0, 0, 0, 0, //TPS=100% (WOT)
0, 0, 0, 0, 0, 0, 0, 0, //TPS=90%
0, 0, 0, 0, 0, 0, 0, 0, //TPS=75%
0, 0, 0, 0, 0, 0, 0, 0, //TPS=60%
0, 0, 0, 0, 0, 0, 0, 0, //TPS=45%
0, 0, 0, 0, 0, 0, 0, 0, //TPS=30%
0, 0, 0, 0, 0, 0, 0, 0, //TPS=15%
0, 0, 0, 0, 0, 0, 0, 0, }; //TPS=0% (idle)
// 1, 2, 3, 4, 5, 6, 7, 8 <<--------kRPM
unsigned char TPS_Reading=0;
unsigned char MAF_Reading=0;
unsigned char MAP_Reading=0;
unsigned char COOL_Reading=0;
unsigned char Tach_Reading=0;
unsigned char IGN_Delay=0;
unsigned char NumCylinders=4; //default of 4-cylinder since that's what me Scooby is - used to calc RPM
BOOL OneTachPulsePerSpark=1; //set to 0 for revolution tach pulses, set to 1 for spark tach pulses - button toggled
Code: Select all
/* ------Notes------
WILL WANT TO UTILIZE A CRYSTAL FOR PRECISE TIMING (P1_0, P1_1, external crystal global setting)
Table 1 - RPM vs MAP, contains AIRFLOW TRIMS, 16x16
Table 2 - RPM vs MAP, contains TIMING RETARD TRIMS 16x16 (to compensate for faked low-engine load ECU resultant timing advance)
Table 3 - RPM vs TPS, contains BOOST CONTROL SOLENOID DUTY CYCLE, 8x8
Table 4 - RPM vs MAP, contains VOLUMETRIC EFFICIENCY data? maybe an overall scale factor after the table pulls
-----------------------------INPUTS------------------------------------------
VOLTAGE / ADC INPUTS:
AIT = need to add an AIT sensor at some point
TPS = 5V? signal from tps on tb / on ECU pin __.
MAF = 5V signal from stock MAF sensor / intercepted from MAF.
MAP = 5V signal from stock boost control pressure exchange solenoid / from ECU pin __.
COOLANT TEMP = Should monitor/display this as well / from ECU pin __.
PULSE / DIGITAL INPUTS:
RPM = 12V square wave / pulses from ECU pin __. One pulse per (revolution or spark?) Time with TMR_TACH
IGN_1 = Ignition control line #1 / from ECU pin __.
IGN_2 = Ignition control line #2 / from ECU pin __.
-----------------------------------------------------------------------------
-----------------------------OUTPUTS-----------------------------------------
VOLTAGE / DAC OUTPUTS:
MAF_Scaled = Intercepted/scaled MAF signal / output to ECU pin __.
PULSE / DIGITAL OUTPUTS:
IGN_1_Out = Intercepted/delayed ignition control line #1 / output to coilpack
IGN_2_Out = Intercepted/delayed ignition control line #2 / output to coilpack
BOOST_PWM = Boost solenoid duty cycle / PWM output / output to boost solenoid
*/
I had to put my 2 cents in here. If you don't have a wideband 02 to see what your doing with a S-AFC then what is the point? If you do decide to start tuning shit without monitoring it, your going to do more bad then good.jake15
i was thinking and apexi afc or what doug did with the pentiometer thing, but i'm not that good at wiring things we'll see how it goes, hopefully it will learn how to control them within a day or two. Vikash said earlier in this thread that the ECU will control injectors up to 20% larger, and i figured that 440 is just below the 20% so hopefully the ECU will learn
Code: Select all
MAP = 400*V-280
Code: Select all
/* MAF signal conversion table, indexed by units of 5/256 V, each bit is 1/256 g/s */
unsigned int MAFConversion[256]={
28, 22, 22, 25, 31, 39, 49, 59,
68, 76, 85, 96, 110, 129, 151, 174,
195, 212, 228, 242, 258, 277, 297, 318,
338, 356, 373, 389, 405, 422, 440, 461,
485, 513, 544, 576, 606, 633, 660, 688,
721, 760, 801, 842, 878, 907, 931, 953,
979, 1010, 1046, 1085, 1126, 1167, 1207, 1246,
1283, 1319, 1355, 1395, 1440, 1492, 1550, 1610,
1668, 1723, 1777, 1831, 1889, 1952, 2020, 2090,
2159, 2227, 2294, 2362, 2432, 2505, 2576, 2641,
2695, 2736, 2772, 2817, 2881, 2972, 3078, 3182,
3268, 3324, 3367, 3415, 3491, 3608, 3750, 3893,
4015, 4099, 4161, 4223, 4308, 4432, 4582, 4739,
4882, 4997, 5093, 5184, 5283, 5401, 5531, 5660,
5779, 5879, 5968, 6057, 6158, 6278, 6413, 6554,
6692, 6822, 6947, 7076, 7214, 7367, 7530, 7697,
7862, 8019, 8172, 8324, 8479, 8640, 8808, 8979,
9152, 9327, 9504, 9686, 9874,10069,10268,10465,
10654,10833,11005,11177,11356,11545,11741,11939,
12132,12318,12502,12694,12901,13129,13372,13620,
13864,14097,14323,14552,14790,15043,15306,15572,
15833,16084,16331,16579,16836,17107,17388,17675,
17962,18246,18527,18808,19090,19375,19665,19959,
20258,20563,20872,21182,21492,21800,22108,22417,
22731,23051,23378,23712,24052,24399,24749,25100,
25448,25791,26134,26479,26831,27193,27560,27924,
28278,28618,28955,29304,29680,30093,30537,31000,
31472,31942,32408,32866,33315,33753,34183,34608,
35032,35458,35882,36301,36711,37111,37512,37930,
38377,38863,39375,39890,40391,40862,41311,41753,
42200,42663,43136,43612,44082,44540,44989,45433,
45878,46328,46789,47265,47761,48282,48833,49420};
Code: Select all
/* coolant temperature conversion table, indexed by units of 5/256 V, values in deg F */
signed int CLTConversion[256]={
401,387,372,360,345,331,318,304,291,284,277,270,264,257,250,243,
237,234,230,226,223,219,216,212,208,205,203,199,198,194,192,189,
187,185,183,181,180,178,176,174,172,171,169,167,165,163,162,160,
158,156,154,153,153,151,149,147,147,145,144,144,142,140,140,138,
138,136,135,135,133,131,131,129,129,127,127,126,126,124,124,122,
122,120,120,118,118,117,117,115,115,113,113,111,111,109,109,108,
108,106,106,104,104,102,102,100,100, 99, 99, 97, 97, 97, 95, 95,
95, 93, 93, 93, 91, 90, 90, 88, 88, 86, 86, 84, 84, 84, 82, 82,
82, 81, 81, 79, 79, 79, 77, 77, 77, 75, 75, 73, 73, 73, 72, 72,
72, 70, 70, 68, 68, 68, 66, 66, 66, 64, 64, 63, 63, 61, 61, 59,
59, 57, 57, 55, 55, 55, 54, 54, 54, 52, 52, 50, 50, 50, 48, 48,
48, 46, 46, 45, 45, 43, 43, 41, 41, 39, 39, 37, 37, 37, 36, 36,
36, 34, 34, 32, 32, 30, 30, 28, 28, 27, 27, 25, 25, 23, 23, 21,
21, 19, 18, 18, 16, 14, 14, 12, 12, 10, 9, 9, 7, 5, 5, 3,
3, 1, 0 -2, -4, -6, -8, -9, -9,-11,-13,-15,-17,-18,-20,-22,
-24,-27,-31,-33,-36,-40,-42,-45,-47,-47,-47,-47,-47,-47,-47,-47};
Actually, I have heard bad things about EGT's. As far as I know, the EGT's only measure the temperature of the exhaust after the turbo. A couple of factors could play a roll in this reading being accurate. 1) Extreme hot or cold days are going to play a roll in the temperature to which the EGT reads, and 2) If you are driving your car really hard, the EGT doesn't know this from your car leaning out. All they give as a guess to what the actual air/fuel mixture is. Kind of like hooking an A/F gauge up to a regular 02. The only way to actually monitor the thing your changing is by an 02. Please spend the cash on one. It's well worth the investment when modding cars.vrg3 wrote: J-MoNeY - You're absolutely right that to do any kind of tuning properly you do need good instrumentation, like a wideband oxygen sensor and/or an EGT monitor.