In a previous topic...
...I mentioned that I'm often having to support the field upgrade of software. In the final post of that thread I wondered about connecting an SPI EEPROM to the ISP connector and running a bootloader. The issue has come around again and it's now worth a serious look.
It needs to be a cheap solution whereby we can just mail out something physical in the mail and not worry if we don't get it back.
My initial thought was that as I fit a standard ISP connector to all my boards I have access to the SPI bus, power, ground and reset. Make a simple PCB with nothing more than a cheap 32k x 8 (for example) SPI EEPROM and a ribbon ending in a 6-pin female header and have a bootloader on the AVR look for the external EEPROM and then bootload from it. You'd need to do version and compatibility checks but that's easily do-able with embedded text strings. A quick calculation shows that I can build those for well under 5 pounds/dollars/euros.
The problem I've come across is that all the SPI EEPROMs I've found so far need /CS as well and rely on /CS toggling to initiate transfers of data. I'd prefer to use SPI as it has the least code size requirements making it easy to fit in a bootloader.
So, problem 1 is 'How could I add /CS to an existing 6-pin ISP?'. I'm doodling ideas around generating it on the dongle with some sort of capacitive arrangement from one of the other lines but it's not looking feasible
The other option is to go I2C. The dongle costs would be the same (well, two extra resistors) but I'd bit-bang an I2C bus using the SPI pins.
Thoughts? This seems to come up with other people from time to time needing a cheap production/field programming solution.