# Diode Mode Implementation Details To implement diode mode on a microcontroller like the Raspberry Pi Pico, follow this circuit and logic. ## Circuit Design 1. **Pull-up Resistor**: Connect a 10kΩ resistor from 3.3V to the common Signal pin of your Multiplexer. 2. **Measurement Point**: Connect an ADC pin (e.g., GPIO 26) to the same Signal pin of the Multiplexer. 3. **HDMI Ground**: Connect HDMI Pin 17 (DDC/CEC Ground) and the Shell to the Microcontroller's Ground. ## Logic (Pseudo-code) ```cpp float measureDiode(int channel) { // 1. Select the channel on the Mux setMuxChannel(channel); // 2. Wait for voltage to stabilize sleep_ms(5); // 3. Read ADC value (0-4095 for 12-bit ADC) uint16_t raw = adc_read(); // 4. Convert to voltage float voltage = (raw * 3.3f) / 4095.0f; return voltage; } ``` ## Fault Logic for Intake Mode The software uses the following logic to provide "Educated Guesses": | Reading | Possible Fault | Hint | |---------|----------------|------| | 0.0V - 0.1V | Short to Ground | Check ESD protection diodes or internal IC short. | | 1.0V - 3.2V | High Resistance / Open | Check for cracked solder joints on the HDMI port. | | 3.3V (VCC) | Full Open | Line is completely disconnected. Port might be ripped. | | 0.3V - 0.7V | Nominal | Line is likely connected to Redriver or APU correctly. | ## Redriver IC Testing If all lines show nominal diode readings but there is still no video: 1. Check the **+5V line** (Pin 18). If it's missing, the console won't trigger the TV's HPD. 2. Check the **DDC lines** (SCL/SDA). If these are open, the console cannot read the EDID from the TV. 3. If Diode mode is perfect, the issue is likely the **Redriver IC** itself being powered down or having internal logic failure, or the **APU** encoder.