Pi AVR Programmer HAT Hookup Guide

Pages
Contributors: QCPete
Favorited Favorite 4

Speed Test - How Fast Can This Thing Go?

For some fun, and to demonstrate the difference in programming speeds, we created a massive Arduino sketch, and recorded some of the programming speeds. Once compiled, this sketch used up a whopping 20440 bytes of memory -- this is about 63% of the ATmega328P's memory. For comparison, blink is only 930 bytes -- or 2% of memory.

This test was done with a 5V Arduino running on a 16MHz Crystal (the SparkFun RedBoard), and so that allowed us to program reliably at 2MHz. If you are using a 3.3V Arduino at 8MHz, it would be smart to bring that down to 1MHz. Our experience in production programming at SparkFun has shown us that in fact 1/8 of oscillator speed is the best way to go for nearly 100% reliability.

Here were the speed test results:

  • Serial upload via Arduino IDE:

    • 6.32s upload

    • 6.89s verify

    • 13.21s total

  • ISP program via Arduino IDE and Pi AVR Programmer HAT:

    • 4.04s write

    • 3.40s read

    • 7.44s total

  • ISP program via Pi AVR Programmer HAT in stand alone mode -- using test.py and pi_program.sh:

    • 1.57s write

    • 0.74s read

    • 2.31s total

As you can see from the results above, the Pi AVR Programmer HAT used directly from avrdude was much faster than the other options! Almost 11 seconds faster than the traditional serial upload. Dang!