I'm struggling with a concept - I've noticed that your average 'Arduino' board has the ATMega328 as its core controller but also has an ATMega16U to handle USB.
So far so good, the Arduino IDE can send a 'sketch' via USB, the 16U takes that and programmes the 328, except that it doesn't? As far as I can tell the 16U appears simply to convert USB to SERIAL and passes that on to the 328 which then runs it through its bootloader and programs itself.
My question is why? Why does the 16U not use SPI to program the 328 (which is what happens when you use 'Arduino as ISP')? If you're going to the trouble of including a whole extra MCU on a board, why not use its resources and save the boot loader space on the 'main' MCU?
I ask this because I'm struggling with the next iteration of a design for a small gaming device. I'm using the ATMega1284P as my main MCU and currently just break out the ISP pins to a header and program it directly. I'm trying to be a little more elegant in using USB to program it. My researches so far have lead me to conclude that having a separate chip to deal with USB might be a good idea, but I don't understand why I would still then have to put a boot loader onto my 1284? I refuse to believe that this great idea of mine is the first time anyone has thought of this, so what have I missed that makes it obviously stupid? I suppose I can save a handful of pins maybe? but then surely I can still use the ISP pins if I really need to because they only program when RESET is low?
What I'd *really* like is the ability to drag-and-drop a .hex file using USB Mass Storage, which I'm sure is possible if complicated and surely something you'd stick on a separate chip so you don't have to worry about boot loader size creep? The BBC micro:bit does this and it's really neat!