Page 1 of 1

programmable outputs - demo

Posted: Fri Apr 18, 2025 3:28 pm
by gurov
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:
image.png

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:
canbutton1.png
canbutton2.png
canbutton3.png
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:
rpm1.png
rpm2.png
rpm3.png
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:
image.png

and conditions are tied together with more logic links:
image.png
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.
image.png

Re: programmable outputs - demo

Posted: Fri Apr 18, 2025 4:17 pm
by mpgmike
So this is like creating "virtual" ports and/or conditions? No additional hardware or wiring involved? Intriguing! Thank you for sharing that incredibly useful information.

Re: programmable outputs - demo

Posted: Fri Apr 18, 2025 9:29 pm
by gurov
they're hardware ports on the CPU, connected to other hardware, injectors /ignition/generic mosfets, etc.

something that should've been there for a long time, just wasn't a priority

Re: programmable outputs - demo

Posted: Sat Apr 19, 2025 3:35 pm
by Adam_86
That is so awesome, we need that in the firmware. I wanted to control boost level from my display, this would solve it. Good job

Re: programmable outputs - demo

Posted: Sun Apr 20, 2025 1:28 am
by gurov
image.png
getting close to having it actually behave a bit more user-friendly with board-speciffic names.