NanoProg v1

From lechacal
Jump to navigation Jump to search

Some more information on the link below.

How_to_program_an_Attiny85_or_Attiny84

Overview

The NanoProg is a shield for the Arduino Nano to program arduino chips.

Usage

Connect the hardware

Insert the MCU to program on the programmer board. Beware of the direction when the inserting the MCU. The small dot must be pointed toward the left of the board (toward the leds).

Connect the Programmer board to the computer with a USB cable.

Once all connected the Programmer board will show heartbeat with the green led.

Initial Setup

For anything below make sure Arduino as ISP is selected in Tools | Programmer menu.

Upload Bootloader

If programming an arduino MCU for the first time you must burn the bootloader onto it. For this first select the appropriate board in the Arduino IDE. Tools | Board . For example ATtiny85 @ 8Mhz or Arduino UNO. Then select Tools | Burn Bootloarder.

Upload Sketch (ATtiny)

Open your sketch file with the Arduino IDE. Make sure you select the appropriate MCU type in Tools | Board. Upload the sketch from the IDE.

How to program an Attiny85 or Attiny84

Upload Sketch (ATmega)

Open your sketch file with the Arduino IDE. Make sure you select the Arduino UNO type in Tools | Board. Upload the sketch from the IDE using the Upload Using Programmer function found under the File menu.

Warning. Do not use the normal Upload function of the IDE as it will overwrite the main mcu sketch. This can be recovered by re-uploading the ArduinoISP sketch.

Overwritten sketch

The primary ATmega328 sketch could be inadvertently overwritten. This is an easy fix. You can recover its initial state by uploading the original sketch. To do so remove all secondary chips. In the Arduino IDE select File | Examples | ArduinoISP. Then make sure Tools | Board | Arduino UNO is selected. Then upload that sketch.

Ubuntu users

When using the serial port for the first time the user must be added to the dialout group. Do this with the command below:

$ sudo usermod -a -G dialout $USER

Windows users

driver

The nano board with FT232rl chipset will require a special driver from FTDI. Download here

error

If you get an error of the kind below

exec: "avr-g++": executable file not found in $PATH
Error compiling for board ATtiny84 @ 8 MHz (internal oscillator; BOD disabled).

Open the platform.txt file from the tinycore folder. After the following comment

# Default "compiler.path" is correct, change only if you want to overidde the initial value

Insert the line below

compiler.path={runtime.tools.avr-gcc.path}/bin/

Save the file and restart IDE.

Related Articles

How_to_program_an_Attiny85_or_Attiny84

Update_RPICT_firmware_(CT7V1/CT4V3/CT8)