Another Version of Description
Refer to the diagram of the attached file:
- We press the RST button of the ArduinoUN. The ATmega328 has gone to boot location
There is a small program (known as Boot Loader) beginning from this location;
this program checks:
(a) if there is any incoming code/data (sketch) about to come from the Host Computer for onward
fusing into the application area (application flash) of the MCU;
(b) else, the processor begins of the previously loaded application program.
The User clicks on the Upload command of the Arduino IDE for transferring/fusing a new sketch
(the application program) into the application flash of the target MCU (ATmega328 of Arduino).
(a) The command, in the form of electrical activities in compliance with USB protocol, goes down to
the ATmega16U2 chip of the Arduino.
(b) The 16U2 uses its PD7-pin and resets the ATmega328.
(c) The target MCU (ATmega328) goes to Step-1(a) and begins communication (using asynchronous
serial port, Rx/Tx) with 16U2.
- (a) 16u2 receives USB signals from the Host Computer and converts it into Asynchronous Serial
Format (ASF) and vice versa. the ASF signal goes to ATmega328 via Rx/Tx pins.
(b) ATmega32 receives ASF signals from 16U2 and extracts the needed 8-bit information which is
the code/data to be fused in the application flash.
The control remains with Boot Loaded Program until the ATmega32 finishes reception and fusion
of all the bytes of the incoming sketch (the application program).
Finally, the control goes to the beginning address of the application program.
ASF (1).PDF (94.1 KB)