Here is my set up: I have a large series of control boards that are connected to each other through an I2C bus. Each board sends out a PWM signal (to control a motor on an ESC) and has a sensor signal line that goes to a sensor board. The series of control boards are connected to a master board which is connected to a PC. The PC directs the master board to send signals to specific control boards thereby controlling specific motors along this chain to get some kind of motor control action going.
For experimentation purposes I need to be able to reprogram the control boards in this entire series since I want to test a large ammount of control methods all of which require some kind of tweaking to specific coeffients. The problem I am encountering is that I am having difficulty coming up with a method to sequentially reprogram each board without me having to physically connect and reprogram each board manually.
My first idea is to add on two address lines on to the board and adding some simple logic to "address" each board individually. This would use up no uC lines and would make the addressing of each board done in discrete hardware. Since I am using the AVRISPMKII I would have the boards hardwired to each individual address and if the address would set the reset pin to program. I figure each additional board would ignore the programming signals sent by the master and simply not do anything.
A second idea is to modify the bootloader to use the I2C bus to rewite the firmware through purely programmatic methods. That is the bootloader would just over write certain sections to alter the programming of the uC.
Any other ideas on how to do this? Any ideas which one of these methods would be easier?
For experimentation purposes I need to be able to reprogram the control boards in this entire series since I want to test a large ammount of control methods all of which require some kind of tweaking to specific coeffients. The problem I am encountering is that I am having difficulty coming up with a method to sequentially reprogram each board without me having to physically connect and reprogram each board manually.
My first idea is to add on two address lines on to the board and adding some simple logic to "address" each board individually. This would use up no uC lines and would make the addressing of each board done in discrete hardware. Since I am using the AVRISPMKII I would have the boards hardwired to each individual address and if the address would set the reset pin to program. I figure each additional board would ignore the programming signals sent by the master and simply not do anything.
A second idea is to modify the bootloader to use the I2C bus to rewite the firmware through purely programmatic methods. That is the bootloader would just over write certain sections to alter the programming of the uC.
Any other ideas on how to do this? Any ideas which one of these methods would be easier?