Upload Arduino sketch to Atmega328: Difference between revisions

From lechacal
Jump to navigation Jump to search
No edit summary
Line 19: Line 19:
=Steps=
=Steps=


==1 [OPTIONAL]==
==-1-==
Connect the Nanoprog to the circuit board to program using the 6 pin ribbon cable.
[[File:IMG_1148_small.png]]
 
==-2-==
[OPTIONAL]
This might be optional if you are uploading to a minor version change (e.g. 2.5.4. to 2.5.5). For major version upgrade the eeprom will most certainly need to be erased before uploading.
This might be optional if you are uploading to a minor version change (e.g. 2.5.4. to 2.5.5). For major version upgrade the eeprom will most certainly need to be erased before uploading.
Get the eeprom erase sketch.
[http://lechacal.com/RPICT/tools/eeprom_erase_v1_0.ino eeprom_erase_v1_0.ino]
Open this sketch with the Arduino IDE.
Then select '''Sketch''' | '''Upload Using Programmer'''.
Let the sketch being uploaded. Once the upload complete the eeprom will be erased.
==-3-==
Open the new sketch to upload with the Arduino IDE.
Then select '''Sketch''' | '''Upload Using Programmer'''.
==-4-==
Disconnect the circuit board from the Nanoprog.
The configuration will be blank and need to be uploaded again.
Get the default configuration from the configuration guide. At time of writing the latest is this following page here. [[Over_Serial_Configuration_-_Sketch_2.8#Restore_Default_Config]].
Use the lcl-rpict-config.py tool to upload the new configuration.

Revision as of 14:59, 12 October 2018


Overview

This is a guide to upgrade a sketch on atmel atmega328 chip.

Involved product are RPICT8, RPICT7V1, RPCT4V3, Emonwrt3.

Preliminaries

Required hardware is the Nanoprog.

The board hosting the Atmega328 chip will have an ISP connector (In System Programmer). This is a 6 pin connector as 3x2.

Required software is the Arduino IDE.

Download the desired sketch to upload. Each product page will have a link to the latest sketch.

Steps

-1-

Connect the Nanoprog to the circuit board to program using the 6 pin ribbon cable.

-2-

[OPTIONAL]

This might be optional if you are uploading to a minor version change (e.g. 2.5.4. to 2.5.5). For major version upgrade the eeprom will most certainly need to be erased before uploading.

Get the eeprom erase sketch. eeprom_erase_v1_0.ino

Open this sketch with the Arduino IDE.

Then select Sketch | Upload Using Programmer.

Let the sketch being uploaded. Once the upload complete the eeprom will be erased.

-3-

Open the new sketch to upload with the Arduino IDE. Then select Sketch | Upload Using Programmer.

-4-

Disconnect the circuit board from the Nanoprog. The configuration will be blank and need to be uploaded again.

Get the default configuration from the configuration guide. At time of writing the latest is this following page here. Over_Serial_Configuration_-_Sketch_2.8#Restore_Default_Config.

Use the lcl-rpict-config.py tool to upload the new configuration.