To start this off I've whipped up a simple schematic for the basic hardware needed to get this idea up and running.
To make our tiny cloud we need two basic things from the hardware:
- A way to tell the infrastructure how to do a thing
- A way to give the infrastructure things to do it with
Said another way, we need to be able to:
- Flash programs to the ATtiny microcontrollers
- Communicate with those programs once they are running
To gain these abilities I'm planning to use an ATmega32U4, which is a microcontroller that has a USB interface and a good number of pins. But not quite a good enough number of pins, so I've thrown in two shift registers as well.
There are 16 ATtiny10 microcontrollers to a board. During programming the shift registers are used to hold a particular one of them in reset while the same two data and clock pins that are connected to all of the ATtinys are wiggled just so - as dictated by the Tiny Programming Interface specification - in order to flash that particular chip. All those not in reset will ignore the wiggles, so we can walk through the entire array by holding each one in reset in turn. This is kind of slow, but we're not planning on reflashing them all the time so we'll live with it.
Once the ATtinys are flashed we'll start shuffling serial data to and from them via ports B and D on the 32U4 (one half of the array per port so it takes 2 assembly instructions to grab the state). The 32U4 will accept packets over the USB bus that contain the index of an ATtiny and some data to send to it, and in reverse it will export packets distilled from the tortured screams of the ATtinys.
PCB design coming next!