00001 /* config.c 00002 00003 Copyright 2008 Fred Cooke 00004 00005 This file is part of the FreeEMS project. 00006 00007 FreeEMS software is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 FreeEMS software is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with any FreeEMS software. If not, see <http://www.gnu.org/licenses/>. 00019 00020 We ask that if you make any changes to this file you send them upstream to us at admin@diyefi.org 00021 00022 Thank you for choosing FreeEMS to run your engine! */ 00023 00024 #include "inc/freeEMS.h" 00025 00026 00027 const volatile fixedConfig fixedConfigs FIXEDCONF1 = { 00028 /* Each bit represents the state of some core setting, masks below and above where the same one is used */ 00029 /* Settings variables : 0 = false */ 00030 /* unsigned short coreSettingsA = */ 0x07F0, /* See definitions in freeems.h */ 00031 00032 /* Pre configured value settings for the sensor inputs */ 00033 /* unsigned short presetIAT = */ roomTemperature, 00034 /* unsigned short presetCHT = */ runningTemperature, 00035 /* unsigned short presetTPS = */ halfThrottle, 00036 /* unsigned short presetEGO = */ stoichiometricLambda, 00037 /* unsigned short presetBRV = */ runningVoltage, 00038 /* unsigned short presetMAP = */ idleManifoldPressure, 00039 /* unsigned short presetAAP = */ seaLevelKPa, 00040 /* unsigned short presetMAT = */ roomTemperature, 00041 /* unsigned short presetEGO2 = */ stoichiometricLambda, 00042 /* unsigned short presetIAP = */ maxExpectedBoost, 00043 /* unsigned short presetBPW = */ idlePulseWidth, 00044 /* unsigned short presetAF = */ idleAirFlow, 00045 00046 00047 /* Fuel injection settings */ 00048 /* unsigned short perCylinderVolume = */ typicalCylinderSize, 00049 /* unsigned short stoichiometricAFR = */ stoichiometricAFROctane, 00050 /* unsigned short injectorFlow = */ typicalInjectorSize, 00051 /* unsigned short densityOfFuelAtSTP = */ densityOfOctane, 00052 00053 00054 /* Sensor related settings */ 00055 /* unsigned short TPSClosedMAP = */ offIdleMAP, /* Around 30kPa */ 00056 /* unsigned short TPSOpenMAP = */ nearlyWOTMAP, /* Around 95kPa */ 00057 00058 00059 /* Sensor input conditioning settings */ 00060 /* These are used to calculate MAP, EGO and TPS from ADC readings. */ 00061 /* unsigned short MAPMinimum = */ MPX4250AMin, /* Default to MPX4250A 260kPa - 8kPa = 252kPa See the link for the transfer function */ 00062 /* unsigned short MAPRange = */ MPX4250ARange, /* www.freescale.com/files/sensors/doc/data_sheet/MPX4250A.pdf */ 00063 /* unsigned short AAPMinimum = */ MPX4100AMin, /* Default to MPX4100A 107.5kPa - 14kPa = 93.5kPa See the link for the transfer function */ 00064 /* unsigned short AAPRange = */ MPX4100ARange, /* www.freescale.com/files/sensors/doc/data_sheet/MPX4100A.pdf */ 00065 /* unsigned short EGOMinimum = */ LC1LambdaMin, /* Default to Innovate LC-1 on lambda 0.5 - 1.5 for 0-5V range */ 00066 /* unsigned short EGORange = */ LC1LambdaRange, /* Range of lambda 1.0 */ 00067 /* unsigned short BRVMinimum = */ batteryVoltageMin, /* 0 - 24.5 Volt measurement with 10k and 39k resistors */ 00068 /* unsigned short BRVRange = */ batteryVoltageRange, /* http://www.google.com/search?hl=en&safe=off&q=5+*+(39000+%2B+10000)+%2F+10000&btnG=Search */ 00069 /* unsigned short TPSMinimumADC = */ TPSDefaultMin, /* 25% of voltage = closed (0%) */ 00070 /* unsigned short TPSMaximumADC = */ TPSDefaultMax, /* 75% of voltage = open (100%) */ 00071 00072 /* Setting variables (must be inited with useful values) */ 00073 /* unsigned short capacityOfAirPerCombustionEvent = */ 500, /* Default to TODO duplicated above */ 00074 /* unsigned short perPrimaryInjectorChannelFlowRate = */ 550, /* Default to */ 00075 /* unsigned short perSecondaryInjectorChannelFlowRate = */ 550, /* Default to */ 00076 /* unsigned short readingTimeout = */ 500, /* Default to half a second 60rpm for a 4 cylinder */ 00077 /* unsigned char ports = */ 6, /* Default to maximum */ 00078 /* unsigned char coils = */ 6, /* Default to */ 00079 /* unsigned char combustionEventsPerEngineCycle = */ 6, /* Default to */ 00080 /* unsigned char revolutionsPerEngineCycle = */ 2, /* Default to */ 00081 /* unsigned char primaryTeeth = */ 24, /* Default to */ 00082 /* unsigned char missingTeeth = */ 0, /* Default to */ 00083 00084 /* unsigned short baudDivisor = */ baudDivisor115p2, /* Used to create the serial clock */ 00085 /* unsigned char networkAddress = */ 1, /* Unique identifier on the network */ 00086 00087 /* unsigned char tachoTickFactor = */ tachoTickFactor4at50, 00088 /* unsigned short tachoTotalFactor = */ tachoTotalFactor4at50, 00089 00090 /* temporary contents for notes etc "0123456789012345678901234567890n" null terminated */ 00091 /* unsigned char userTextField[userTextFieldArrayLength] = */ {"Place your personal notes here!"} 00092 }; 00093 00094 00095 const volatile fixedConfig fixedConfigs2 FIXEDCONF2 = { 00096 /* Each bit represents the state of some core setting, masks below and above where the same one is used */ 00097 /* Settings variables : 0 = false */ 00098 /* unsigned short coreSettingsA = */ 0x07F0, /* See definitions in freeems.h */ 00099 00100 /* Pre configured value settings for the sensor inputs */ 00101 /* unsigned short presetIAT = */ roomTemperature, 00102 /* unsigned short presetCHT = */ runningTemperature, 00103 /* unsigned short presetTPS = */ halfThrottle, 00104 /* unsigned short presetEGO = */ stoichiometricLambda, 00105 /* unsigned short presetBRV = */ runningVoltage, 00106 /* unsigned short presetMAP = */ idleManifoldPressure, 00107 /* unsigned short presetAAP = */ seaLevelKPa, 00108 /* unsigned short presetMAT = */ roomTemperature, 00109 /* unsigned short presetEGO2 = */ stoichiometricLambda, 00110 /* unsigned short presetIAP = */ maxExpectedBoost, 00111 /* unsigned short presetBPW = */ idlePulseWidth, 00112 /* unsigned short presetAF = */ idleAirFlow, 00113 00114 00115 /* Fuel injection settings */ 00116 /* unsigned short perCylinderVolume = */ typicalCylinderSize, 00117 /* unsigned short stoichiometricAFR = */ stoichiometricAFROctane, 00118 /* unsigned short injectorFlow = */ typicalInjectorSize, 00119 /* unsigned short densityOfFuelAtSTP = */ densityOfOctane, 00120 00121 00122 /* Sensor related settings */ 00123 /* unsigned short TPSClosedMAP = */ offIdleMAP, /* Around 30kPa */ 00124 /* unsigned short TPSOpenMAP = */ nearlyWOTMAP, /* Around 95kPa */ 00125 00126 00127 /* Sensor input conditioning settings */ 00128 /* These are used to calculate MAP, EGO and TPS from ADC readings. */ 00129 /* unsigned short MAPMinimum = */ MPX4250AMin, /* Default to MPX4250A 260kPa - 8kPa = 252kPa See the link for the transfer function */ 00130 /* unsigned short MAPRange = */ MPX4250ARange, /* www.freescale.com/files/sensors/doc/data_sheet/MPX4250A.pdf */ 00131 /* unsigned short AAPMinimum = */ MPX4100AMin, /* Default to MPX4100A 107.5kPa - 14kPa = 93.5kPa See the link for the transfer function */ 00132 /* unsigned short AAPRange = */ MPX4100ARange, /* www.freescale.com/files/sensors/doc/data_sheet/MPX4100A.pdf */ 00133 /* unsigned short EGOMinimum = */ LC1LambdaMin, /* Default to Innovate LC-1 on lambda 0.5 - 1.5 for 0-5V range */ 00134 /* unsigned short EGORange = */ LC1LambdaRange, /* Range of lambda 1.0 */ 00135 /* unsigned short BRVMinimum = */ batteryVoltageMin, /* 0 - 24.5 Volt measurement with 10k and 39k resistors */ 00136 /* unsigned short BRVRange = */ batteryVoltageRange, /* http://www.google.com/search?hl=en&safe=off&q=5+*+(39000+%2B+10000)+%2F+10000&btnG=Search */ 00137 /* unsigned short TPSMinimumADC = */ TPSDefaultMin, /* 25% of voltage = closed (0%) */ 00138 /* unsigned short TPSMaximumADC = */ TPSDefaultMax, /* 75% of voltage = open (100%) */ 00139 00140 /* Setting variables (must be inited with useful values) */ 00141 /* unsigned short capacityOfAirPerCombustionEvent = */ 500, /* Default to TODO duplicated above */ 00142 /* unsigned short perPrimaryInjectorChannelFlowRate = */ 550, /* Default to */ 00143 /* unsigned short perSecondaryInjectorChannelFlowRate = */ 550, /* Default to */ 00144 /* unsigned short readingTimeout = */ 500, /* Default to half a second 60rpm for a 4 cylinder */ 00145 /* unsigned char ports = */ 6, /* Default to maximum */ 00146 /* unsigned char coils = */ 6, /* Default to */ 00147 /* unsigned char combustionEventsPerEngineCycle = */ 6, /* Default to */ 00148 /* unsigned char revolutionsPerEngineCycle = */ 2, /* Default to */ 00149 /* unsigned char primaryTeeth = */ 24, /* Default to */ 00150 /* unsigned char missingTeeth = */ 0, /* Default to */ 00151 00152 /* unsigned short baudDivisor = */ baudDivisor115p2, /* Used to create the serial clock */ 00153 /* unsigned char networkAddress = */ 1, /* Unique identifier on the network */ 00154 00155 /* unsigned char tachoTickFactor = */ tachoTickFactor4at50, 00156 /* unsigned short tachoTotalFactor = */ tachoTotalFactor4at50, 00157 00158 /* temporary contents for notes etc "0123456789012345678901234567890n" null terminated */ 00159 /* unsigned char userTextField[userTextFieldArrayLength] = */ {"Place your personal notes here!"} 00160 };