In the previous blog post in this series, we created the prototype from the design, up to the point were the programmer can be installed. In this post, we go through the process of installing the programmer on Nano.
THIS BLOG POST IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BLOG POST.
Connect the Nano via USB to your computer. Expect the power LED on the Nano to switch on. This LED can be identified by looking for POW or PWR next to the LED.
Here the Nano has Blink.ino loaded. Note the permanently burning POW LED and blinking bulletin LED.
Open the Arduino IDE. This version was used to create this step-by-step guide:
Version: 2.0.3 Date: 2022-12-05T09:30:25.331Z CLI Version: 0.29.0 [76251df9]
Open Example ArduinoISP.ino
The programmer that comes as part of the Arduino IDE examples. We will upload it to Nano in a later step. To open it, select
File -> Examples -> 11. ArduinoISP -> ArduinoISP
Set Verbose Output
If you want to get a better understanding of the compile and upload processes, make sure you have enabled verbose output during compile and upload.
File -> Preferences -> Show verbose output during compile upload
Check the boxes for both compile and upload. Then select OK.
Set Nano Details
Before we can upload the programmer to the Nano, make sure you have selected the correct port, board and processor. Select
Tools -> Board "<current board>" -> Arduino AVR boards -> Arduino Nano
Tools- > Port "<current port>" -> COM<x>
The Nano used here requires the processor "ATmega328P (Old Bootloader)".
Tools -> Processor -> ATmega328P (Old Bootloader)
Use the "Arduino as ISP" for the programmer option. Although it doesn't affect the programmer upload to Nano in this stage, we will need that later when programming the ATtiny85.
Tools -> Programmer: "<current programmer>" -> Arduino as ISP
Wrong Processor Error Messages
avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xa1 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xa1 Failed uploading: uploading error: exit status 1
Upload Programmer to Nano
Now that you prepared all the settings, you can go ahead and compile and upload the ArduinoISP.ino to the Nano.
Select the upload button button and wait for the upload process to finish.
You have now loaded the programmer software onto the Nano. You should see the green LED slowly pulsing as the "heartbeat", indicating ArduinoISP.ino is running.
Disconnect Nano from USB and make sure it is powered down.
Place ATtiny85 and Capacitors
With Nano powered down, install the last components to finish the design.
Place the 10 kF capacitor over RST and GND of the Nano. Place the positive pin of the capacitor in A14 (just below Nano's RST pin) and the negative pin in A15 (just below Nano's GND pin). I guess this will allow the Nano to be recognized as the programmer by the IDE when uploading to the ATtiny85.
To reduce interference, place a 104 capacitor (100,000 pF = 100 nF = 0,1 µF) over ATtiny85's pin 8 VCC (E24, via the red jumper wire) and pin 4 GND (G27). The red wire is used to have the 104 capacitor far enough out of the way to be able to let it sit in the breadboard while inserting and removing the ATtiny85 chips.
Place the ATtiny85 chip. Look for pin 1. Follow the design where pin 1 is placed top right in F30.
Ready to Upload to ATtiny85
Your programmer should now be ready for use and can be reconnected. Verify that all three LEDs blink shortly at startup. Then look for the green LED slowly pulsing as the "heartbeat", indicating ArduinoISP.ino is running.
In the next blog post we see how to burn the bootloader to the ATtiny85.