Can I have two functions sharing one output?

Ask questions about DIY board assembly issues, fault finding and testing. (Covers all Megasquirt versions and board.)

Moderators: jsmcortina, muythaibxr

Post Reply
Danbob
Experienced MS/Extra'er
Posts: 285
Joined: Sun May 19, 2013 12:57 pm

Can I have two functions sharing one output?

Post by Danbob »

My goal is to have my OEM CEL work as the MS CEL but also illuminate when knock is detected as a safety feature.


One way I can see to do this is to setup up Check Engine Lamp in TS as normal with F-Idle as output, then also setup a Programmable Off/On output on F-Idle to switch on at a certain Knock level.

However in TS it states "Do not try to enable an output port that is already in use for another function"

Can anybody tell me what harm would be caused by setting F-Idle as both CEL and programmable output for Knock lamp?


Alternatively, I could setup CEL on another output and Knock lamp output on F-Idle, then setup my harness so the OEM CEL wire goes to two separate Megasquirt pins. Would this way be a better/safer way to do it?


Any advice/experience welcomed.

Thanks
Dan
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: Can I have two functions sharing one output?

Post by prof315 »

Using 1 output for 2 functions cause a "Configuration Error" The car won't run.

Using 2 outputs on the OEM CEL will probably work but how do you differentiate between Knock and a Check engine event? 2 outputs and 2 indicators is the smart way to go
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
Danbob
Experienced MS/Extra'er
Posts: 285
Joined: Sun May 19, 2013 12:57 pm

Re: Can I have two functions sharing one output?

Post by Danbob »

Ok thanks for explaining, it's good to know the reasons why something won't work.

Regarding setting up the lamp on two separate output pins I think I should be able to tell the difference as the CEL can output a flashing output to show a code whereas the knock output will only flash at a certain knock threshold when the car is under load etc.

As long as that works ok electrically I think it should work functionally. Is there any risk of having the two pins linked from an electrical point of view? As long as they are both switched grounds I can't see there being an issue but my electrical knowledge is not great.

Two separate lamps would be ideal, but my ECU is in the boot and it's mid engined, I have just finished all of the harness running rear to front for my gauges etc. and just don't have time to open it up and add more for a standalone knock lamp at the moment. Would be more efficient to use what's already there.

Cheers
Dan
Post Reply