Chicken or the egg (How to get the bootloader into the AVR)

Some people contacted and pointed out to me, that there is always the same "chicken or egg" issue with these kind of DIY boards.

Since real beginners don't have any equipment (i.e. a programming hardware) nor an already working board (which they could use as a programming hardware), how can they program the microcontroller to build their own board for the first time?

In this section I would like to present and collect ideas to handle this issue. Please contact me me, if you want to contribute to this list or just have remarks to it.

  1. If you already have for example some working tinyUSBboard, you can program and use it as an USBasp programming hardware

  2. The most easiest way to get your first controller programmed: Ask friends, go to local university or order a preprogrammed controller. For this purpose I try to offer (see here) an ebay auction. However this option may be not practical, esp. the last one outside of Germany.

  3. Even if there is not any equipment available. One thing nearly always is at the users disposal: Computers often (esp. the old ones) are equipped with some serial or parallel interface. ("COM" or "LPT" as windows users like to call them.)
    In such cases you could build and use a PONYPROG (
    But be careful the circuit may not be safe for your computer - it better should be an old one! And you really should just use it in rare cases. (For example just for building your tinyUSB board)

    Since USB emulators for such serial/parallel interfaces mostly do not work with ponyprog and you may only have a new or mobile computer, this option may also be unsatisfying.

  4. USB HUB ISP - Use an USB hub for ISProgramming by switching ports on and off.

  5. Sound Programmer (only GERMAN, also 1 and 2)
    I know there are bootloaders out there, which allow the AVR being programmed with sounds (from ADC input pin).
    THIS IS NOT SUCH A THING! (Because needing an installed bootloader wouldn't solve the chicken/egg problem.)
    This Trick lets your soundcard generate MOSI (right channel) and CLOCK (left channel) signals for true ISP programming.

  6. Also with a computer and maybe some simple transistors (and photo resistors or photo transistors) available, you could interface the computers keyboard LEDs (num-, caps-, and scroll-lock) as SCK, MOSI and RESET lines (to you AVR microcontroller). Even if your default keyboard has no LEDs or simply is too expensive to be "interfaced", you simply can plugin any further keyboard suitable for this purpose. (Since most operating systems broadcast the LED state to every keyboard connected.)
    You now just need to implement a program doing the ISP via flashing the keyboards LEDs. It may be slow - but it should do the job.

    • AVR Programmer built from a USB Keyboard

    • I also provided here ( some software (windows and linux) to build your ISP from a keyboard. You can call "tinyUSBboard.exe" to get an AVR (your board) programmed. Therefore you even do not need MISO (board-->PC).
      NUMLOCK will be CLK, CAPSLOCK will be MOSI and SCROLLOCK connects to RESET.
      If there is general interest in this solution (esp. the software part) I would be thrilled to help.

  7. Hardcore DIY