Time budget was 3 months, because that is what previous projects took. I pointed out that those projects didn't include code to talk to things that didn't exist yet, through a protocol nobody had specified.
Taking products back to dealers for upgrades is inconvenient and costly. The PIC used was not reprogrammable, and would need physical replacement. I felt this was not a practical option.
After careful thought, I designed the software to run in this main loop:
- Scan for input events (changes in rotors and buttons)
- Handle I2C messages in (from application modules)
- Do Integrated Amplifier Application code (respond to events, change outputs)
- Handle I2C messages out
- Update outputs (LEDs, VFD, volume controls and multiplexers)
- Wait for next 1 millisecond tick, then loop back.
An I2C command can tell the panel to jump over the Integrated Amplifier application code.
This turns the panel into a generic user interface for any expansion module to take over.
Since I had to develop this out before any other modules existed, I wrote code for a PC to bit-bang I2C master behaviour through the printer port. This allowed the PC to scan inputs, emulate an application module, and update outputs. Writing an emulation in C on a PC is great for demonstrating new applications before implementing them in microcontrollers.
This concept worked perfectly, and the front panel was re-used for amplifier expansion modules (e.g. home cinema module) and also a digital radio tuner.
The company effectively got several front panels for the price of one, which was great deal for them but made me redundant.
The manufacturers are very good at support, and their service manuals can be download from various places on the net. I have put copies here.