Jump to content
V-Cool

DIY SIO2USB

Recommended Posts

I think I am very close to it working.  I am using the following code in Arduino:

 

Spoiler

void setup() {
  Serial.begin(19200);
  Serial1.begin(19200);
}

void loop() {
  if (Serial.available()) {      // If anything comes in Serial (USB),
    Serial1.write(Serial.read());   // read it and send it out Serial1 (pins 0 & 1)
  }

  if (Serial1.available()) {     // If anything comes in Serial1 (pins 0 & 1)
    Serial.write(Serial1.read());   // read it and send it out Serial (USB)
  }
}

AspeQt gives a "get status" message when I turn the Atari on, but doesn't really get past that.  Cannot save (or load) anything.  I have the Ground pin connected, and the TX and RX pins connected to their respective slots in the SIO cable.

Share this post


Link to post
Share on other sites

Ok, I finally got it to work (turns out, I was supposed to connect to different pins on the arduino).  Does anybody know how I could connect the Command Line and have this used in the SIO chain? I'd love to be able to back-up all of my old floppy discs.

Share this post


Link to post
Share on other sites

You could use one of the digital lines in the Arduino to look at the command line 

then in your code you could monitor the command line, I assumed in your code

Serial is from the Atari and Serial1 is to the Atari

#define COMMAND 8

pinMode(COMMAND,INPUT_PULLUP); // may only need INPUT

 

void setup() {
  Serial.begin(19200);
  Serial1.begin(19200);
}

void loop() {

  if(!digitalRead(COMMAND) // COMMAND LOW

 {
      if (Serial.available()) {      // If anything comes in Serial (USB),
      Serial1.write(Serial.read());   // read it and send it out Serial1 (pins 0 & 1)
      }

 }

  if(digitalRead(COMMAND) // COMMAND HIGH

  {

       if (Serial1.available()) {     // If anything comes in Serial1 (pins 0 & 1)
       Serial.write(Serial1.read());   // read it and send it out Serial (USB)
       }

   }
}

image.thumb.png.21f01854fcb2100ada57ff6f50b8128b.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...