How can I program multiple ATmega328p at once?
Like, for example, the Arduino Uno. How do they program it for mass manufacturing production?
How can I program multiple ATmega328p at once?
Like, for example, the Arduino Uno. How do they program it for mass manufacturing production?
To program in-circuit, you can also use either a JTAG-Connector - as seen on the J-Link Mini, or an on-PCB connector - as you can see on this tinyK22 microprocessor that's used at my university quite a lot. You can see the connectors next to the "K20" and "K22" print. The cable to plug this in is fairly expensive, but it allows you to program a board that only has the 'connector' implemented on the PCB.
Rather than downloading through the IDE, you'd download using a standalone flashing program.
If your quantities are high enough, just as the others said, you'd use preprogrammed chips from the factory.
Arduino exposes all the pins needed for "high voltage" parallel programming on the pin headers. This is faster than ICSP and probably how they are programmed in production, unless pre-programmed chips are used.
However the terminals needed for ICSP are also available so for low volumn production that's an option too.
If you do high volume production, the boards are assembled and tested automatically, so you already have a production step where voltage is applied to the board at selected spots.
Programming the board at this stage is just a matter of connecting to the appropriate pads for half a second, that is barely noticeable compared to the time that is spent testing for soldering defects.
If you are using the original arduino uno type chip, you can swap the chips or even get a ZIF socket for easier insertion and removal
Image source: Universal Solder - CANADUINO ZIF Socket Programming Shield V2 for Arduino
You can also pay atmel/supplier to program it for you