1

Given that every ATTiny connected already has a bootloader (micronucleus) installed, here's my theoretical chain:

Computer > Master ATTiny (Connected via USB) > ATTiny Slave A > ATTiny Slave B

Is it possible to flash an individual slave (say, slave B) with new software without replicating it to all of the other slaves, or altering the master?

Can this be done with the normal MISO/MOSI/SCK/RESET method?

I've done some research (Programming multiple ATMegas/Arduinos at once) but I'm not looking for a batch flashing method; I want to upload custom programming to a single slave.

Note: I'm not trying to pass data between the master and the slaves. What I want is to reprogram the slaves from a single USB connection. It's also important that each slave has a fixed identity so I know exactly which one I'm flashing every time I boot the "system".

Disclosure: I'm an arduino novice and programming intermediate. This is my first project utilizing serial communication.

  • I recognize that I could simply connect each ATTiny as a unique USB device but (a). I don't want to have that many USB devices connected to my PC and (b). I would like to be able to pass some data between the master and slaves if it turns out reprogramming over the serial bus is feasible. – jamcube Feb 9 '16 at 23:48
  • What sort of wiring are you envisaging? How close is the slave to the master? Using the bootloader you normally reprogram using a serial connection (not MISO/MOSI/SCK). – Nick Gammon Feb 10 '16 at 0:43
  • Wiring is flexible, I haven't actually put together the hardware yet. Closest slave would be a few inches, furthest out 3-4 feet. Does that mean I would want these connected via I2C? – jamcube Feb 10 '16 at 1:31
  • Well, the current bootloader expects serial input, as I said. Not SPI and not I2C. You can write your own bootloader, but that would take more work than somehow adapting your hardware to use the existing one. – Nick Gammon Feb 10 '16 at 1:56
  • Is there a wiring diagram for that? I would like to have the ability of flashing the slaves in addition to master/slave serial communication (like with I2C). Can I use serial input to flash and I2C to communicate in-software? – jamcube Feb 10 '16 at 2:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.