How to flash Atmega32U4 with an arduino sketch with inner quartz. As a programmer, I can use arduino uno or USBASP. I know how to flash Atmega 8. Thanks in advance

  • I also know how to flash the eighth with a sketch. I guess that this is the same way - Kirill

1 answer 1

  1. It is necessary to add the microcontroller description to the boards.txt file (hardware / arduino / avr directories). This is necessary because of the non-standard clock frequency - 8 MHz. You can copy the description of the Leonardo board by changing the frequency.
  2. Compile the Caterina loader at 8 MHz.
  3. Connect the programmer to the microcontroller via ICSP.
  4. Program the FUSE bits (hfuse 0xD8, lfuse 0xF2, efuse 0xCB) using the avrdude program.
  5. Select the programmer and microcontroller described in IDE.
  6. In IDE flash bootloader.

Further:

  • Or download the sketch via USB.
  • Either compile the sketch, find it in the / tmp directory (in Linux), and flash the hex file using the avrdude program.
  • Write the finished description of the board, please. - Letton
  • And can you learn more about the Caterina loader? What to do with him? - Letton
  • In the Makefile, change the frequency to 8 MHz and compile Caterina-Leonardo.hex. - Vanyamba Electronics