Programmer Pin Diagram and Configuration
This post is more for me to remember and access easily in the future since I’ve spent a considerable amount of time doing this (for the second time!).
I have 2 AVR programmers and after a lot of trial and error, I realised that the pinout is different for each of them. Also, the datasheets for both the programmers are hopelessly unclear and show the pinout for the pins on the programmer. When you plug in a ribbon cable and turn it around to face you, the pin configuration becomes a mirror image and it’s quite taxing on the brain to correlate the pin config from the board to the cable. Hence the images below for reference!
For the programmer from nskelectronics, the pinout diagram is as per the image below:
For the AVR Programmer from Online TPS, the pinout diagram is as shown below:
Setting up AVRDude in Atmel Studio
If you are like me, then you probably just downloaded AVRDude into your downloads folder (on Windows) and are looking to link to that directly from Atmel Studio so that you don’t have to copy paste the hex file everytime. So, here is the configuration that I use for the parameters in Atmel Studio’s external tools which allows me to program the chip without having to leave Atmel Studio (showing for Atmel Studio version 6.2). This configuration works even if there are spaces in the path like “Atmel Studio” etc, because we’re setting the Initial Directory to be the TargetDir which would be either “Debug” or “Release” depending on the build target that you set in Atmel Studio. For more information on the available variables for external tools, refer to the Atmel Studio help page.
Arguments: -c usbasp -p t2313 -U flash:w:”$(TargetName).hex”
Initial Directory: $(TargetDir)
“Use Output Window”