programmable outputs - demo
Posted: Fri Apr 18, 2025 3:28 pm
this is a feature that's pretty standard in most standalone ECUs, observe:
it is a standard interface in TunerStudio, some may be familiar with it.
in this implementation i added ALL of the GPIO ports on my lqfp208 board, and 3 connectable conditions:
this particular one checks for 7th bit in canButtons18 variable, which is a combination of my canbus toggleable buttons from previous post, the condition is "AND 64", which is basically " & b0100 0000", it could check for more than one bit being set
here is a setup for this demo:
3 ports i picked as they weren't used, but tested, and routed to my bench board
https://youtube.com/shorts/7QgUez-ZSdQ
and you can see them light up when i hit a button on the keypad, keypad is connected to hardware that sends the keycode over canbus to the ECU, ecu toggles a canButton on/off (in this case button 6 7 and 8)
which results in LED turning on and off
the following setup is for RPM-based condition with hysteresis:
and video of it in action, twisting the RPM knob on the simulator
https://youtube.com/shorts/-GI-mWJbn9c
each output has 3 conditions
each condition can be:
and conditions are tied together with more logic links:
they are executed in order they appear, allowing for:
1
1 AND 2
1 OR 2
1 AND 2 AND 3
1 AND 2 OR 3
1 OR 2 OR 3
1 OR 2 AND 3
it breaks if an output is already assigned, as expected.
it is a standard interface in TunerStudio, some may be familiar with it.
in this implementation i added ALL of the GPIO ports on my lqfp208 board, and 3 connectable conditions:
this particular one checks for 7th bit in canButtons18 variable, which is a combination of my canbus toggleable buttons from previous post, the condition is "AND 64", which is basically " & b0100 0000", it could check for more than one bit being set
here is a setup for this demo:
3 ports i picked as they weren't used, but tested, and routed to my bench board
https://youtube.com/shorts/7QgUez-ZSdQ
and you can see them light up when i hit a button on the keypad, keypad is connected to hardware that sends the keycode over canbus to the ECU, ecu toggles a canButton on/off (in this case button 6 7 and 8)
which results in LED turning on and off
the following setup is for RPM-based condition with hysteresis:
and video of it in action, twisting the RPM knob on the simulator
https://youtube.com/shorts/-GI-mWJbn9c
each output has 3 conditions
each condition can be:
and conditions are tied together with more logic links:
they are executed in order they appear, allowing for:
1
1 AND 2
1 OR 2
1 AND 2 AND 3
1 AND 2 OR 3
1 OR 2 OR 3
1 OR 2 AND 3
it breaks if an output is already assigned, as expected.