UPDATE - 9/10/2018
Thanks to David Hansel, there is a new, easier method of updating your Arduino Due that does not require installing the Arduino IDE.Click Here
If you need to reload the software on your Arduino Due, here is the step-by-step procedure.
- Install the Arduino IDE. You can download it from this website.
Once you have the IDE installed and running, you’ll need to install a few libraries.
- Click Sketch > Include Library > Manage Libraries…
In the search box, enter “DueFlashStorage”, select the library, and click Install.
Search for the SD library (by SparkFun) and install version 1.1.1 (the default version has a problem with the Altair-Duino).
Search and install SdFat by Bill Greiman.
- You will also need to install support for the Arduino Due board.
Click Tools > Board > Boards Manager…
Search for “SAM” and install 32-bit “Arduino SAM Boards (ARM Cortex-M3)”.
- Download the source code from GitHub.
Click the “Clone or Download” button and choose “Download ZIP”.
- Unzip the folder. The Arduino IDE creates an Arduino folder in Documents. That where I like to put my projects.
Once it’s unzipped, change the folder name from “Altair8800-master” to “Altair8800”.
- Double-click the file “Altair8800.ino”. This will launch the Arduino IDE and open the Altair8800 source code.
If you are using the DB9 serial module on serial port 2, you will need to change a precompiler directive:
- In host_due.h, change
“#define USE_SERIAL_ON_A6A7 0” to “#define USE_SERIAL_ON_A6A7 1”
NOTE: This will disable the function of the PROTECT switch.
- In host_due.h, change
- Plug the USB cable into the “Programming ATMEGA16U2” port of your Arduino Due and into your computer.
- In the Arduino IDE, click Tools > Port > Arduino Due (Programming Port)
- Make sure the correct board is selected. Click Tools > Board > Arduino Due (Programming Port).
You may have to scroll a long list of available boards.
- You are now ready to program your Arduino Due.
Click Sketch > Upload. (Don’t select Upload using Programmer.)
The code will compile and upload to the Arduino Due, this will take about three minutes.
You are now ready to plug the Arduino into your project!
Errors?If you receive an error like “No device found on COMxx An error occurred while uploading the sketch”, this common (apparently there is a design issue with some Arduino Due’s.) No problem, press the “erase” button on the Due and try the upload again. It should work fine.
If you would like to install new software to your Altairduino without installing the Arduino IDE, follow this process:
- Download the latest code in this archive: UploadBinaryDue.zip
- Unzip the archive to a location you can access from the command line (eg. c:\UploadBinaryDue).
- Connect your Altairduino via USB to your computer (if your Arduino is not currently installed in your Altairduino, make sure you connect to the “Programming Port”).
- Find the COM port number assigned to your Altairduino. I use Device Manager:
- Open a command prompt and “cd” to the folder where you unzipped the archive:
- Run the following command:
upload altair8800.bin COMn
[where n is the port number determined above]
- Uploading the new binary will take just a couple minutes.
Since this is a precomplied binary, you will not be able to modify any of the precompliler directives. This version has the following options:
- Serial port enabled on pins A6/A7
- PROT switch disabled (used for serial port)
- Processor switching enabled on the Configuration Menu
If you want other options, you will need to follow the full process with the Arduino IDE.