Can the GPIO run variable cam phasing?
Posted: Fri Mar 13, 2009 4:28 pm
Will this be able to work with vvt aka variable cam phasing?
Read only forum for GPIO Board from Bowling and Grippo.
http://www.msgpio.com/forums/
Code: Select all
// in millisecond section
if (PWMDTYx > 0) // i.e. if the output x is turned on, otherwise leave it off
{
pwm_refresh_count++; //increment the counter by one - is equivalent to: pwm_refresh_count = pwm_refresh_count +1;
if (pwm_refresh_count < N)
{ pwm_disable_flag = 0; // clear flag }
else
{ PWMDTYx = PWMPERx; // set to 100% to refresh the solenoid charge
pwm_disable_flag = 1; // set flag - will use in main loop to disable lookup of PWM in tables, etc.}
// endif
if (pwm_refresh_count) > (M+N-1))
{ pwm_refresh_count = 0; // reset the counter}
} // end if PWMDTYx > 0
Code: Select all
typedef struct {
...
unsigned char open_time; // injector open time (msecX100) for mileage calcs
unsigned int fuel_density; // fuel density (pounds/gallon)
unsigned char nSquirts; // number of squirt (divide by 2 if alternating)
} inputs1;
Code: Select all
typedef struct {
...
unsigned char open_time; // injector open time (msecX100) for mileage calcs
unsigned int fuel_density; // fuel density (pounds/gallon)
unsigned char nSquirts; // number of squirt (divide by 2 if alternating)
unsigned int refresh_int; // the interval time (msec) between dithers for output1 and output2
unsigned int refresh_dur; // the 100% duty cycle time for output1 and output2
unsigned int dither_intPC; // the interval time (msec) between dithers for the pressure control output
unsigned int dither_durPC; // the 100% duty cycle time for the pressure control output
} inputs1;
Code: Select all
;name = class, type, offset, shape, units, scale, translate, lo, hi, decimal digits
InputCaptureEdge = bits, U08, 0, [0:0], "Rising Edge", "Falling Edge"
...
nSquirts = scalar, U08, 537, "", 1.00, 0.0000, 1.0, 16.000, 0 ; number of squirts (divide by 2 if alternating)
; ****************************************************************** end inpram *********************
Code: Select all
;name = class, type, offset, shape, units, scale, translate, lo, hi, decimal digits
InputCaptureEdge = bits, U08, 0, [0:0], "Rising Edge", "Falling Edge"
...
nSquirts = scalar, U08, 537, "", 1.00, 0.0000, 1.0, 16.000, 0 ; number of squirts (divide by 2 if alternating)
refresh_int = scalar, U16, 538, "msec", 1.00, 0.0000, 10, 20000, 0 ; the interval time (msec) between dithers for output1 and output2
refresh_dur = scalar, U16, 540, "msec", 1.00, 0.0000, 0, 10000, 0 ; the 100% duty cycle time for output1 and output2
dither_intPC = scalar, U16, 542, "msec", 1.00, 0.0000, 10, 20000, 0 ; the interval time (msec) between dithers for the pressure control output
dither_durPC = scalar, U16, 544, "msec", 1.00, 0.0000, 0, 10000, 0 ; the 100% duty cycle time for the pressure control output
; ****************************************************************** end inpram *********************
Code: Select all
// Assign values to the in1flash parameters
const inputs1 in1flash = {
0, // input capture edge for VSS, 0=rising edge, 1 = falling edge
{10, // vss_table[MPH no = 0] , MPH (KPH), use for 12x12 auto shift table
20,30,40,50,60,70,80,90,100,120,140},
...
6073, // fuel density (pounds/gallon)
1 // number of squirts (divide by 2 if alternating)
};
Code: Select all
// Assign values to the in1flash parameters
const inputs1 in1flash = {
0, // input capture edge for VSS, 0=rising edge, 1 = falling edge
{10, // vss_table[MPH no = 0] , MPH (KPH), use for 12x12 auto shift table
20,30,40,50,60,70,80,90,100,120,140},
...
6073, // fuel density (pounds/gallon)
1, // number of squirts (divide by 2 if alternating)
50,8,10000,1000 // Refresh/Dither default values
};
Code: Select all
pageSize = 538, 30
Code: Select all
pageSize = 546, 30
Code: Select all
menuDialog = main
menu = "&General Settings"
subMenu = revlimits, "&Rev Limits"
subMenu = gearRatios, "&Gear Ratios"
subMenu = shiftFactors, "&Shift Factors"
subMenu = retards, "T&iming Adjustments"
subMenu = PWMSettings, "Solenoid &PWM Setup"
subMenu = VSSSettings, "&VSS Setup"
subMenu = TCCSettings, "&TCC Settings"
subMenu = stdIN, "Standard Inputs Configuration"
; subMenu = drag, "Drag Race Logging Configuration"
subMenu = noCANload, "no-CAN &Load Calibration", 0, { !CAN_enabled }
subMenu = Units, "&Units"
Code: Select all
menuDialog = main
menu = "&General Settings"
subMenu = revlimits, "&Rev Limits"
subMenu = gearRatios, "&Gear Ratios"
subMenu = shiftFactors, "&Shift Factors"
subMenu = retards, "T&iming Adjustments"
subMenu = PWMSettings, "Solenoid &PWM Setup"
subMenu = VSSSettings, "&VSS Setup"
subMenu = TCCSettings, "&TCC Settings"
subMenu = stdIN, "Standard Inputs Configuration"
subMenu = Dither, "PWM Refresh/Dither"
; subMenu = drag, "Drag Race Logging Configuration"
subMenu = noCANload, "no-CAN &Load Calibration", 0, { !CAN_enabled }
subMenu = Units, "&Units"
Code: Select all
dialog = Dither, "PWM Refresh and Dithering"
field = "Refresh Interval", refresh_int
field = "Refresh Duration", refresh_dur
field = "PC Dither Interval", dither_intPC
field = "PC Dither Duration", dither_durPC