Skip to content

How to flash the Arduino

sanni edited this page Oct 14, 2022 · 1 revision
Clone this wiki locally

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 Cart Reader/Arduino Mega into a USB port. The ON/OFF switch needs to be set to ON.

1) Download 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 Cart_Reader.ino tab and define your hardware version by removing the // in front of your version. You can also enable some add-ons here that allow you to dump even more systems like PC Engine.

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

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.