PJSC(Pump Jet Solenoid Controller)はArduinoを使用したバイク用燃料噴射コントローラです。このプロジェクトは、オープンソースECUプロジェクト『Speeduino』をベースにしています。
[PJSC v1.01c] Support MUX output test mode.
| @@ -412,16 +412,16 @@ | ||
| 412 | 412 | testpw = scalar, U16, 113, "ms", 0.01, 0.00, 0, 655.35, 1 ; * ( 1 byte) |
| 413 | 413 | testinjcnt = scalar, U16, 115, "", 1, 0, 0, 65535, 0, noLocalUpdate ; |
| 414 | 414 | #if table4_spark ;[PJSC v1.01c] |
| 415 | - muxout1selection = bits, U08, 117, [0:3], "Disable", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" | |
| 416 | - muxout2selection = bits, U08, 117, [4:7], "Disable", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" | |
| 417 | - muxout3selection = bits, U08, 118, [0:3], "Disable", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" | |
| 418 | - muxout4selection = bits, U08, 118, [4:7], "Disable", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" | |
| 415 | + muxout1selection = bits, U08, 117, [0:3], "Disable/Test Mode", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" | |
| 416 | + muxout2selection = bits, U08, 117, [4:7], "Disable/Test Mode", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" | |
| 417 | + muxout3selection = bits, U08, 118, [0:3], "Disable/Test Mode", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" | |
| 418 | + muxout4selection = bits, U08, 118, [4:7], "Disable/Test Mode", "IDLE control", "Thermo Fan control", "Launch control", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" | |
| 419 | 419 | #endif ;[PJSC v1.01c] |
| 420 | 420 | #if table4_fuel ;[PJSC v1.01c] |
| 421 | - muxout1selection = bits, U08, 117, [0:3], "Disable", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c] | |
| 422 | - muxout2selection = bits, U08, 117, [4:7], "Disable", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c] | |
| 423 | - muxout3selection = bits, U08, 118, [0:3], "Disable", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c] | |
| 424 | - muxout4selection = bits, U08, 118, [4:7], "Disable", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c] | |
| 421 | + muxout1selection = bits, U08, 117, [0:3], "Disable/Test Mode", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c] | |
| 422 | + muxout2selection = bits, U08, 117, [4:7], "Disable/Test Mode", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c] | |
| 423 | + muxout3selection = bits, U08, 118, [0:3], "Disable/Test Mode", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c] | |
| 424 | + muxout4selection = bits, U08, 118, [4:7], "Disable/Test Mode", "IDLE control", "Thermo Fan control", "INVALID", "Fuel pump control", "Boost control", "VVT control", "Tach output", "INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID","INVALID" ;[PJSC v1.01c] | |
| 425 | 425 | #endif ;[PJSC v1.01c] |
| 426 | 426 | //[PJSC v1.01c] baroDenBins = array, U08, 102, [9], "kPa", 1.0, 0.0, 0.0, 255.0, 0 ;[PJSC v1.10] Bins for the Barometric density correction curve |
| 427 | 427 | //[PJSC v1.01c] baroDenRates = array, U08, 111, [9], "%", 1.0, 0.0, 0.0, 255.0, 0 ;[PJSC v1.10] Values for the \Barometric density correction curve |
| @@ -2635,36 +2635,36 @@ | ||
| 2635 | 2635 | panel = outputtestspk3 |
| 2636 | 2636 | panel = outputtestspk4 |
| 2637 | 2637 | |
| 2638 | - dialog = outputtestmux1, "MUX1", yAxis ;[PJSC v1.01c] | |
| 2639 | - commandButton = "Off", cmdtestmux1off,{testactive} ; | | |
| 2640 | - commandButton = "On", cmdtestmux1on,{!testenabled & testactive} ; | | |
| 2641 | - commandButton = "PWM", cmdtestmux150dc, {!testenabled & testactive} ; | | |
| 2642 | - field = "PWM freq.", dutyFreqTst9, {!testenabled & testactive} ; | | |
| 2643 | - field = "Duty ratio", dutyRatioTst9, {!testenabled & testactive} ; | | |
| 2644 | - dialog = outputtestmux2, "MUX2", yAxis ; | | |
| 2645 | - commandButton = "Off", cmdtestmux2off,{testactive} ; | | |
| 2646 | - commandButton = "On", cmdtestmux2on,{!testenabled & testactive} ; | | |
| 2647 | - commandButton = "PWM", cmdtestmux250dc, {!testenabled & testactive} ; | | |
| 2648 | - field = "PWM freq.", dutyFreqTst10, {!testenabled & testactive} ; | | |
| 2649 | - field = "Duty ratio", dutyRatioTst10, {!testenabled & testactive} ; | | |
| 2650 | - dialog = outputtestmux3, "MUX3", yAxis ; | | |
| 2651 | - commandButton = "Off", cmdtestmux3off,{testactive} ; | | |
| 2652 | - commandButton = "On", cmdtestmux3on,{!testenabled & testactive} ; | | |
| 2653 | - commandButton = "PWM", cmdtestmux350dc, {!testenabled & testactive} ; | | |
| 2654 | - field = "PWM freq.", dutyFreqTst11, {!testenabled & testactive} ; | | |
| 2655 | - field = "Duty ratio", dutyRatioTst11, {!testenabled & testactive} ; | | |
| 2656 | - dialog = outputtestmux4, "MUX4", yAxis ; | | |
| 2657 | - commandButton = "Off", cmdtestmux4off,{testactive} ; | | |
| 2658 | - commandButton = "On", cmdtestmux4on ,{!testenabled & testactive} ; | | |
| 2659 | - commandButton = "PWM", cmdtestmux450dc, {!testenabled & testactive} ; | | |
| 2660 | - field = "PWM freq.", dutyFreqTst12, {!testenabled & testactive} ; | | |
| 2661 | - field = "Duty ratio", dutyRatioTst12, {!testenabled & testactive} ; | | |
| 2662 | - ; | | |
| 2663 | - dialog = outputtest_mux, "MUX Output Test", xAxis ; | | |
| 2664 | - panel = outputtestmux1 ; | | |
| 2665 | - panel = outputtestmux2 ; | | |
| 2666 | - panel = outputtestmux3 ; V | |
| 2667 | - panel = outputtestmux4 ;[PJSC v1.01c] | |
| 2638 | + dialog = outputtestmux1, "MUX1", yAxis ;[PJSC v1.01c] | |
| 2639 | + commandButton = "Off", cmdtestmux1off, {testactive} ; | | |
| 2640 | + commandButton = "On", cmdtestmux1on, {!testenabled & testactive} ; | | |
| 2641 | + commandButton = "PWM", cmdtestmux150dc, {!testenabled & testactive} ; | | |
| 2642 | + field = "PWM freq.", dutyFreqTst9, {!testenabled & testactive} ; | | |
| 2643 | + field = "Duty ratio", dutyRatioTst9, {!testenabled & testactive} ; | | |
| 2644 | + dialog = outputtestmux2, "MUX2", yAxis ; | | |
| 2645 | + commandButton = "Off", cmdtestmux2off, {testactive} ; | | |
| 2646 | + commandButton = "On", cmdtestmux2on, {!testenabled & testactive} ; | | |
| 2647 | + commandButton = "PWM", cmdtestmux250dc, {!testenabled & testactive} ; | | |
| 2648 | + field = "PWM freq.", dutyFreqTst10, {!testenabled & testactive} ; | | |
| 2649 | + field = "Duty ratio", dutyRatioTst10, {!testenabled & testactive} ; | | |
| 2650 | + dialog = outputtestmux3, "MUX3", yAxis ; | | |
| 2651 | + commandButton = "Off", cmdtestmux3off, {testactive && pinLayout == 64} ; | | |
| 2652 | + commandButton = "On", cmdtestmux3on, {!testenabled && testactive && pinLayout == 64} ; | | |
| 2653 | + commandButton = "PWM", cmdtestmux350dc, {!testenabled && testactive && pinLayout == 64} ; | | |
| 2654 | + field = "PWM freq.", dutyFreqTst11, {!testenabled && testactive && pinLayout == 64} ; | | |
| 2655 | + field = "Duty ratio", dutyRatioTst11, {!testenabled && testactive && pinLayout == 64} ; | | |
| 2656 | + dialog = outputtestmux4, "MUX4", yAxis ; | | |
| 2657 | + commandButton = "Off", cmdtestmux4off, {testactive && pinLayout == 64} ; | | |
| 2658 | + commandButton = "On", cmdtestmux4on, {!testenabled && testactive && pinLayout == 64} ; | | |
| 2659 | + commandButton = "PWM", cmdtestmux450dc, {!testenabled && testactive && pinLayout == 64} ; | | |
| 2660 | + field = "PWM freq.", dutyFreqTst12, {!testenabled && testactive && pinLayout == 64} ; | | |
| 2661 | + field = "Duty ratio", dutyRatioTst12, {!testenabled && testactive && pinLayout == 64} ; | | |
| 2662 | + ; | | |
| 2663 | + dialog = outputtest_mux, "MUX Output Test", xAxis ; | | |
| 2664 | + panel = outputtestmux1 ; | | |
| 2665 | + panel = outputtestmux2 ; | | |
| 2666 | + panel = outputtestmux3, { pinLayout == 64 } ; V | |
| 2667 | + panel = outputtestmux4, { pinLayout == 64 } ;[PJSC v1.01c] | |
| 2668 | 2668 | |
| 2669 | 2669 | ;[PJSC v1.10] dialog = outputtest1,"Test Output Hardware" |
| 2670 | 2670 | dialog = outputtest1,"Output Test Mode - PWM" ;[PJSC v1.10] |
| @@ -24,6 +24,15 @@ | ||
| 24 | 24 | #define N2O_STAGE2_PIN_HIGH() *n2o_stage2_pin_port |= (n2o_stage2_pin_mask) |
| 25 | 25 | #define READ_N2O_ARM_PIN() ((*n2o_arming_pin_port & n2o_arming_pin_mask) ? true : false) |
| 26 | 26 | |
| 27 | +#define openMux1() *mux1_pin_port |= (mux1_pin_mask); //[PJSC v1.01c] For MUX output test mode | |
| 28 | +#define closeMux1() *mux1_pin_port &= ~(mux1_pin_mask); // | | |
| 29 | +#define openMux2() *mux2_pin_port |= (mux2_pin_mask); // | | |
| 30 | +#define closeMux2() *mux2_pin_port &= ~(mux2_pin_mask); // | | |
| 31 | +#define openMux3() *mux3_pin_port |= (mux3_pin_mask); // | | |
| 32 | +#define closeMux3() *mux3_pin_port &= ~(mux3_pin_mask); // | | |
| 33 | +#define openMux4() *mux4_pin_port |= (mux4_pin_mask); // V | |
| 34 | +#define closeMux4() *mux4_pin_port &= ~(mux4_pin_mask); //[PJSC v1.01c] For MUX output test mode | |
| 35 | + | |
| 27 | 36 | volatile PORT_TYPE *boost_pin_port; |
| 28 | 37 | volatile byte boost_pin_mask; |
| 29 | 38 | volatile PORT_TYPE *vvt_pin_port; |
| @@ -37,6 +46,15 @@ | ||
| 37 | 46 | volatile PORT_TYPE *n2o_arming_pin_port; |
| 38 | 47 | volatile byte n2o_arming_pin_mask; |
| 39 | 48 | |
| 49 | +volatile PORT_TYPE *mux1_pin_port; //[PJSC v1.01c] | |
| 50 | +volatile byte mux1_pin_mask; // | | |
| 51 | +volatile PORT_TYPE *mux2_pin_port; // | | |
| 52 | +volatile byte mux2_pin_mask; // | | |
| 53 | +volatile PORT_TYPE *mux3_pin_port; // | | |
| 54 | +volatile byte mux3_pin_mask; // | | |
| 55 | +volatile PORT_TYPE *mux4_pin_port; // V | |
| 56 | +volatile byte mux4_pin_mask; //[PJSC v1.01c] | |
| 57 | + | |
| 40 | 58 | volatile bool boost_pwm_state; |
| 41 | 59 | unsigned int boost_pwm_max_count; //Used for variable PWM frequency |
| 42 | 60 | volatile unsigned int boost_pwm_cur_value; |
| @@ -127,10 +127,10 @@ | ||
| 127 | 127 | #define MUX1_TIMER_DISABLE() TIMSK1 &= ~(1 << OCIE1A) // | |
| 128 | 128 | #define MUX2_TIMER_ENABLE() TIMSK1 |= (1 << OCIE1B) // | |
| 129 | 129 | #define MUX2_TIMER_DISABLE() TIMSK1 &= ~(1 << OCIE1B) // | |
| 130 | - #define MUX3_TIMER_ENABLE() TIMSK1 |= (1 << OCIE1A) // | | |
| 131 | - #define MUX3_TIMER_DISABLE() TIMSK1 &= ~(1 << OCIE1A) // | | |
| 132 | - #define MUX4_TIMER_ENABLE() TIMSK1 |= (1 << OCIE1B) // | | |
| 133 | - #define MUX4_TIMER_DISABLE() TIMSK1 &= ~(1 << OCIE1B) // | | |
| 130 | + #define MUX3_TIMER_ENABLE() TIMSK1 |= (1 << OCIE1C) // | | |
| 131 | + #define MUX3_TIMER_DISABLE() TIMSK1 &= ~(1 << OCIE1C) // | | |
| 132 | + #define MUX4_TIMER_ENABLE() TIMSK1 |= (1 << OCIE4C) // | | |
| 133 | + #define MUX4_TIMER_DISABLE() TIMSK1 &= ~(1 << OCIE4C) // | | |
| 134 | 134 | // | |
| 135 | 135 | #define MUX1_COMPARE OCR1A // | |
| 136 | 136 | #define MUX1_COUNTER TCNT1 // | |
| @@ -353,15 +353,6 @@ | ||
| 353 | 353 | volatile byte tempVEvalue[4]; //[PJSC v1.10] Multi VE Map support |
| 354 | 354 | volatile unsigned int dualFuelLoadVE; //[PJSC v1.10] Dual Fuel Load support |
| 355 | 355 | |
| 356 | -volatile PORT_TYPE *mux1_pin_port; //[PJSC v1.01c] | |
| 357 | -volatile byte mux1_pin_mask; // | | |
| 358 | -volatile PORT_TYPE *mux2_pin_port; // | | |
| 359 | -volatile byte mux2_pin_mask; // | | |
| 360 | -volatile PORT_TYPE *mux3_pin_port; // | | |
| 361 | -volatile byte mux3_pin_mask; // | | |
| 362 | -volatile PORT_TYPE *mux4_pin_port; // V | |
| 363 | -volatile byte mux4_pin_mask; //[PJSC v1.01c] | |
| 364 | - | |
| 365 | 356 | //These need to be here as they are used in both speeduino.ino and scheduler.ino |
| 366 | 357 | bool channel1InjEnabled = true; |
| 367 | 358 | bool channel2InjEnabled = false; |
| @@ -76,16 +76,6 @@ | ||
| 76 | 76 | #define coil4Low() (*ign4_pin_port &= ~(ign4_pin_mask)) |
| 77 | 77 | #define coil4High() (*ign4_pin_port |= (ign4_pin_mask)) |
| 78 | 78 | |
| 79 | -//[PJSC v1.01c] For MUX output test mode | |
| 80 | -#define openMux1() *mux1_pin_port |= (mux1_pin_mask); | |
| 81 | -#define closeMux1() *mux1_pin_port &= ~(mux1_pin_mask); | |
| 82 | -#define openMux2() *mux2_pin_port |= (mux2_pin_mask); | |
| 83 | -#define closeMux2() *mux2_pin_port &= ~(mux2_pin_mask); | |
| 84 | -#define openMux3() *mux3_pin_port |= (mux3_pin_mask); | |
| 85 | -#define closeMux3() *mux3_pin_port &= ~(mux3_pin_mask); | |
| 86 | -#define openMux4() *mux4_pin_port |= (mux4_pin_mask); | |
| 87 | -#define closeMux4() *mux4_pin_port &= ~(mux4_pin_mask); | |
| 88 | - | |
| 89 | 79 | void nullCallback(); |
| 90 | 80 | |
| 91 | 81 | static byte coilHIGH = HIGH; |
| @@ -240,10 +240,6 @@ | ||
| 240 | 240 | void pjsc2Toggle(); |
| 241 | 241 | void pjsc3Toggle(); |
| 242 | 242 | void pjsc4Toggle(); |
| 243 | -void mux1Toggle(); //[PJSC v1.01c] | |
| 244 | -void mux2Toggle(); // | | |
| 245 | -void mux3Toggle(); // V | |
| 246 | -void mux4Toggle(); //[PJSC v1.01c] | |
| 247 | 243 | void setPjsc1Duty(); |
| 248 | 244 | void setPjsc2Duty(); |
| 249 | 245 | void setPjsc3Duty(); |
| @@ -252,6 +248,10 @@ | ||
| 252 | 248 | void setCoil2Duty(); // | |
| 253 | 249 | void setCoil3Duty(); // | |
| 254 | 250 | void setCoil4Duty(); // | |
| 251 | +void mux1Toggle(); // | | |
| 252 | +void mux2Toggle(); // | | |
| 253 | +void mux3Toggle(); // | | |
| 254 | +void mux4Toggle(); // | | |
| 255 | 255 | void setMux1Duty(); // | |
| 256 | 256 | void setMux2Duty(); // | |
| 257 | 257 | void setMux3Duty(); // V |
| @@ -5,7 +5,7 @@ | ||
| 5 | 5 | byte getVE(); |
| 6 | 6 | byte getVE2(); //[PJSC v1.10]Multi VE Map support |
| 7 | 7 | byte getVE3(); //[PJSC v1.10]Multi VE Map support |
| 8 | -//byte getVE4(); //[PJSC v1.10]Multi VE Map support | |
| 8 | +byte getVE4(); //[PJSC v1.10]Multi VE Map support | |
| 9 | 9 | byte getAdvance(); |
| 10 | 10 | |
| 11 | 11 | byte selectVE(byte); //[PJSC v1.10]Multi VE Map support |
| @@ -13,7 +13,8 @@ | ||
| 13 | 13 | uint16_t calculateInjector2StartAngle(unsigned int); |
| 14 | 14 | uint16_t calculateInjector3StartAngle(unsigned int); |
| 15 | 15 | uint16_t calculateInjector4StartAngle(unsigned int); |
| 16 | -uint16_t calculateInjector4StartAngle(unsigned int); | |
| 16 | +//[PJSC v1.01c]uint16_t calculateInjector4StartAngle(unsigned int); | |
| 17 | +uint16_t calculateInjector5StartAngle(unsigned int); //[PJSC v1.01c] | |
| 17 | 18 | |
| 18 | 19 | struct config2 configPage2; |
| 19 | 20 | struct config4 configPage4; //Done |