Because of the limited I/O on the uS, have you ever thought about implementing a MUX switch? that way you could have multiple user inputs using a single input on the ECU. I know there is at least one other ECU out there that does this with just resisters. They use the analog ref out and wire it up to 3 specific resisters that are connected to their own switches. That way they can read the voltage and determine what inputs are on or off.
IE if:
Resister 1: 1K
Resister 2: 4.7K
Resister 3: 10k
Switch 1 and 2 both flipped would be 5.7K
1 & 3 would be 11K
2 & 3 would be 14.7K
All three would be 15.7K
So on and so forth.
I know the hardware side would be pretty simple, how about the code side?
Thanks,
Jazz
Mux switch implementation.
Moderators: jsmcortina, muythaibxr