3

As an Arduino newbie I am a little bit confused about possible ways of programming and communicating with this device. I have done some research and it seems that:

ICSP is used for programming with a bootloader in MCU.

The USB (FTDI) port is used (mostly) for sending text messages to the PC and programming without a bootloader.

Am I right? How can I detect whether I have a bootloader installed (Uno R3 clone)? Thank you very much!

6

The ICSP is used for 'bare metal' programming. This what you'd use if you wanted to replace or remove the bootloader, change the clock oscillator settings, or program the device as a bare 328.

The USB port is for communicating with a program running on the Arduino. When it's first booted, the bootloader program checks to see if there's any activity on the serial link from the Arduino host program on a PC. If there is, then it allows downloading of a program from it. If not, it continues on to the last code that was programmed into it.

The easiest way to see whether a bootloader is installed is simply to start it up with the PC host, and see whether it can talk to it.

  • This is slightly mis-stating things. "bare metal" programming tends to refer to approaches with little in the way of runtime framework, for example targeting the ATmega not the Arduino APIs, and is something you can do even when using the bootloader to get your code onto the chip. Rather, the ICSP connector is for chips that haven't been initialized with a bootloader, or need the kinds of fuse or oscillator settings you mention which the bootloader may be unwilling to make. – Chris Stratton Dec 29 '17 at 19:52
  • As for the ability of a PC host to talk with the board, the base of that is really determined by the virtual USB firmware in the other ATmega on the board - there will be a virtual serial device if that exists, even if the main ATmega has been pulled off the board. To determine if there's a bootloader in the main ATmega, one should use avrdude (likely via the Arduino IDE) to try to upload something - but failure in that could as easily be a wrong baud rate, lack of auto reset, or bad manual reset timing, as a missing bootloader. – Chris Stratton Dec 29 '17 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy