programmable outputs - demo

It's all about the code!
Post Reply
gurov
Posts: 46
Joined: Wed Feb 07, 2024 10:43 pm
Location: nj
Github Username: ggurov
Slack: ggurov
Contact:

programmable outputs - demo

Post 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
You do not have the required permissions to view the files attached to this post.
1994 6speed supra turbo [ single turbo/1000cc ID/twin fuel pumps/bc2 262 cams ]. J&S safeguard for knock , UAEFI / 407 disco with rusefi / AEM EMS v2 / MS3pro PNP / Speeduino (mega2560 / teensy41 / stm32f411)
2020 BMW X3m - bootmod3 stage1
User avatar
mpgmike
Posts: 75
Joined: Thu Aug 15, 2024 2:49 pm
Location: Oklahoma, USA

Re: programmable outputs - demo

Post 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.
'95 Jeep Grand Cherokee, 4.6 Stroker
gurov
Posts: 46
Joined: Wed Feb 07, 2024 10:43 pm
Location: nj
Github Username: ggurov
Slack: ggurov
Contact:

Re: programmable outputs - demo

Post 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
1994 6speed supra turbo [ single turbo/1000cc ID/twin fuel pumps/bc2 262 cams ]. J&S safeguard for knock , UAEFI / 407 disco with rusefi / AEM EMS v2 / MS3pro PNP / Speeduino (mega2560 / teensy41 / stm32f411)
2020 BMW X3m - bootmod3 stage1
Adam_86
Posts: 3
Joined: Sun Sep 10, 2023 2:06 am
Github Username: Adamg-86

Re: programmable outputs - demo

Post 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
gurov
Posts: 46
Joined: Wed Feb 07, 2024 10:43 pm
Location: nj
Github Username: ggurov
Slack: ggurov
Contact:

Re: programmable outputs - demo

Post by gurov »

image.png
getting close to having it actually behave a bit more user-friendly with board-speciffic names.
You do not have the required permissions to view the files attached to this post.
1994 6speed supra turbo [ single turbo/1000cc ID/twin fuel pumps/bc2 262 cams ]. J&S safeguard for knock , UAEFI / 407 disco with rusefi / AEM EMS v2 / MS3pro PNP / Speeduino (mega2560 / teensy41 / stm32f411)
2020 BMW X3m - bootmod3 stage1
Post Reply