3 How to flash the Arduino
Ancyker edited this page 2024-04-02 07:24:52 -04:00

Using the Firmware Updater

Go to the website for the Firmware Updater and follow the prompts. You must be running a Chromium-based browser (Chrome, Edge, etc) on a desktop (or laptop) to use the Firmware Updater -- it does not work on mobile browsers or Firefox.

Before updating ensure all cartridges are removed from the OSCR. If you don't see your OSCR in the list you must install the driver first. There's a link to the driver installer on the updater page. Download and extract the installer then run it. Follow the instructions, restarting if needed. Your OSCR should show up then.

Currently, the Firmware Updater cannot be used to flash a new Arduino for the first time or to update very old OSCR firmware versions. Use the manual method described below for that.

Updating Manually

The Cart Reader's firmware is released as source code and needs to be compiled before flashing. Both compiling and flashing can be done with the Arduino IDE.
You can either use the Portable Release or the official Arduino IDE installer.

Portable Release:

Each Cart Reader release comes with a pre-configured and tested portable Arduino IDE tailored for that specific release which includes the Cart_Reader.ino sketch as well as all the needed Arduino libraries and SD database files and does not interfere with any previous Arduino installation.

To upload the firmware to the Cart Reader please follow these steps:

0) Plug your Open Source Cartridge Reader into a USB port of your PC. The ON/OFF switch needs to be set to ON.

1) Download the latest V#.#_Portable.zip from the Releases tab and extract it.

image

2) Install CH341 drivers if needed by running SETUP.exe in the "CH341 Drivers" folder.
After the successful installation of the driver, there should be a CH340 entry in the device manager(WIN+R devmgmt.msc). This will also tell you what COM Port you need to select later on.

image

3) Launch "arduino.exe" found in the "Arduino IDE Portable" folder you just extracted(right-click "Run as administrator" might be necessary).

image

4) In the Arduino IDE go File -> Sketchbook -> Cart_Reader

image

5) Then Tools -> Board and set it to "Arduino Mega or Mega 2560".

image

6) Now Tools -> Port and select the COM port your Arduino is using.

image

7) Next you need to go to the config.h tab(earlier version have this in Cart_Reader.ino) and define your hardware version by removing the // in front of your version. You can also remove // before #define enable_XXX to enable add-on modules you need.

image

You can tell which hardware version you got by comparing your OSCR with this image:

image

8) In case you do not have the Clock Generator installed you need to change the line "#define clockgen_installed" to "//#define clockgen_installed".

image

You can tell if you have the clock generator installed by comparing your OSCR with this image:

image

9) Finally Sketch -> Upload

image

10) Also don't forget to update the SD database files like described here

Official Arduino IDE Installer:

Alternatively you can download and install the Arduino IDE and then copy the "libraries" and "Cart_Reader" folder from the current release "VX.X_Portable\Arduino IDE Portable\portable\sketchbook" to "C:\Users\your_username\Documents\Arduino" and launch the Arduino IDE from the start menu.