2

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.

Greenonline
  • 2,844
  • 7
  • 31
  • 46
jamcube
  • 21
  • 1
  • 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 09 '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 00: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 01: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 01:56
  • 1
    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 02:30
  • 1
    If I can't control individual slave flashing, then pushing a software update through to master and every attached slave would suffice. Just unsure of the wiring I'm going to need and where to research. – jamcube Feb 10 '16 at 02:31
  • Given that the ATtiny85 has 8 pins, 3 of which are Vcc, Gnd, and Reset, you don't have all that many to play with. This is starting to sound like an [X-Y problem](http://xyproblem.info/) - rather than asking about flashing multiple chips either at once or individually, perhaps explain more about the project? – Nick Gammon Feb 10 '16 at 02:37
  • Here is an app note that can inspire: http://www.atmel.com/images/doc8079.pdf – Mikael Patel Feb 10 '16 at 07:12

0 Answers0