Whenever you're ready, walk me through how you'd approach this.
Explain how the I2C and SPI communication protocols work. Compare them in terms of speed, wire count, and master-slave architecture.
Cover the electrical signaling, transaction structure, device selection, and practical tradeoffs of each protocol. Explain when you would choose I2C versus SPI for an embedded peripheral, including relevant limitations such as addressing, chip-select usage, and bus sharing.
Keep the answer focused on standard embedded implementations rather than vendor-specific controller APIs.