[NOTE: This post covers using the original master branch of the software with an Arduino Mega. There is another branch that allows using an LCD with an Uno or Nano.]
The tallest hurdle for setting this up is finding the right Arduino IDE and libraries. Before assembling any hardware (and while waiting for my SD card board to arrive), I wanted to make sure I could compile the software. The software relies on an old SdFat library which is no longer to be found (by me anyway) and using the current version stops compilation in a recent IDE (1.8.4 at the time I tried). Github user Zemac was kind enough to post a solution in an open Issue on the SIO2Arduino github repository. I quote it here for your convenience:
If you want this code to run on the current Arduino IDE and need sdfat old library (ver.21.9.2013). It was also necessary to insert a code library SPI.h.Library and sketch can be found at this link. The code is already set on the control button and there is the added library SPI.h. The code is functional in the Arduino IDE 1.6.5.https://drive.google.com/file/d/0BwX94lwwuDfzcEdrUm1ub29VQm8/view?usp=sharing
Hello Zemáč
From Czech RepublicSince Zemac was successful with IDE 1.6.5, I decided to stick with that and not try to build the software under 1.8.4. To do so, I followed the steps below. I think there is a better way to do this using the arduino builder, but this got me up and running quickly:
- Download the older version (1.6.5) as the Windows .zip file (not the Windows installer) and uncompress it into its own directory arduino-1.6.5-r5.
- Download and unzip the Arduino.zip file from Zemac's Google Drive link into the arduino-1.6.5-r5 directory. This creates a directory called Arduino containing all the necessary files (both SIO2Arduino and libraries).
- Start the Arduino IDE. Select "Preferences" under the "File" menu and set the "Sketchbook location" to arduino-1.6.5-r5\Arduino.
- Select "SIO2Arduino" from the Sketchbook selector under the File menu.
The SIO2Arduino sketch and its supporting files should open in the IDE. From there, one follows the directions found on the original SIO2Arduino page. I set mine up in the config.h file as follows:
- Uncomment the #define ARDUINO_MEGA statement and comment out the others.
- Uncomment the #define LCD_DISPLAY statement
- Turn on debug output by uncommenting #define DEBUG
Select Mega from the Tools/Board menu and then hit the check mark to compile. Once you have a good configuration, build up the hardware.
Since the SD card break out board was new to me, I tested it out with the newer IDE and SD demo software before trying to load the SIO2Arduino. I used the Adafruit tutorial as a guide. Note, you'll have to change the wiring to use the SPI pins and the appropriate SD CS line on the Mega. After working through the SD card demo, the pin definitions in the config.h file should look familiar. I also tested out my LCD display (with parallel interface) ahead of time because I hadn't used it for a couple years. The Arduino tutorial helps there. There are newer displays that use a serial interface - I'm not sure if those will work with SIO2Arduino. Once I had both the SD card and LCD display working, I configured things for the SIO2Arduino and uploaded the code. I checked out the terminal to see the debug output - it indicated it could read the files, but of course there was no Atari attached.
I'll probably cover hooking it up to my Atari in a later post.
Happy New Year!
No comments:
Post a Comment