@o_a_ravi still waiting for the ATTiny, but here's my first sketch for the controller:
I was coding this without the vehicle, just with an old Arduino and one button, so I'm not sure if this is going to work. But still, if that's not a problem for you, please tak a look at it and let me know if this should work.
I think this code should work, will need some minor tweaks during testing. Few pointers on the code., we should include few additional helper libraries such as button libraries for debouncing, etc.
Also on your original idea., few pointers -
1. Camera Connection to MIB2 should always connected to either RVC Camera or the S-Video from Front Camera., which will be connected by a SPST relay., so Normally Open will be connected to Front Cam and Normally closed (Energized) will be to RVC Cam.
2. Controller module (custom) using a ATTINY / ARDUINO UNO microcontroller board will have few milli seconds delay to - boot up, initialize and load., not sure if this will cause an error on the MIB module., need to be tested out.
Due to this limitation, i was thinking of implementing the same idea, purely using transistor and relay combination for instant switching without delay. And use attiny/arduino for the additional switch just for toggling purpose and status LED (FrontCam / RearCam). The circuit i have in mind will work as follows -
1. F_Cam (Front Cam) is always connected to MIB Unit using the Relay.
2. MIB is switched to R_CAM (Reverse Cam) IF Gear_Status = R
3. When ParkTronic_Status (OrangeLED) is ON,
Set ATTINY Controller = ON (Arduino Circuit is electronically turned ON by Parktronic Signal)
Set CamStatusLED = OFF
Set Relay_Status = State of Relay as Input
If Relay_Staus = True ; Set CamStatusLED = RED (When Relay is energized)
If Relay_Status = FALSE; Set CamStatusLED = BLUE (When Relay is OFF, default Video Signal is Front Cam)
Enable Button Toggle function. -> If Button Press, Toggle Relay Status.
#3 is basically your secondary ATTINY circuit is enabled only when ParkTronic mode is active. Which also means that the camera function will work (and option to toggle camera source) only on ParkTronic mode.
I assume you have Park module - PLA 2.0 or PLA 3.0 enabled ? Which get activated when the vehicle is put on reverse, upon P button press or auto enabled on slow speed.?
Let me know your thoughts., will post the circuit shortly.