Jump to content
  • entries
    94
  • comments
    63
  • views
    73,223

DH100-->A8 MIDI Interface


k-Pack

1,032 views

 Share

blog-0657879001505164271.jpg

I have 9 optocouplers setup to receive data from the Arduino for the SAM Rock You project. Eight for the MIDI data byte from the Arduino and 1 to signal the Trigger when new data is ready to be read by the Atari8. A tenth optocoupler needs to be added so that the A8 can let the Arduino know that it is ready for the next byte.

 

That 10th optocoupler can indicate the status set using the Cassette Motor Control. The Cassette Motor Control line on the SIO port (Pin8) is used to turn the cassette motor on and off. I have used an accessory for the Diamond GOS that sets this bit to control the cassette for audio play back. Even though I wrote the accessory, I can't remember which bit to set but I remembered the program would set that bit to test the circuit.

 

blogentry-37655-0-04386900-1505164048_thumb.jpg

 

The circuit was put together on a breadboard for testing before soldering onto the prototype board. Preliminary tests proved that the optocoupler would switch states to achieve 2000 bytes/sec. Atari BASIC isn't going to outpace this circuit.

 

The input side of the optocoupler was wired to SIO PIN 8(motor control) and PIN4(ground). The Arduino was programed to read a pin status set by the output of the optocoupler and then turning on/off an LED. The Diamond GOS "ON/OFF CAS" accessory successfully toggle SIO-Pin8 when activated.

 

blogentry-37655-0-12219300-1505164036_thumb.jpg

 

blogentry-37655-0-36821000-1505164016_thumb.jpg

 

This simple Arduino program is used to read the optocoupler output attached to Arduino digital pin 4 and turn on the LED attached to pin 6.

 

 

//check connection between A8 sio cassette

//motor pin and Arduino

 

int casMotorPin= 4;

int ledPin= 6;

 

void setup() {

// put your setup code here, to run once:

 

pinMode(casMotorPin, INPUT);

pinMode(ledPin, OUTPUT);

}

 

void loop() {

if (digitalRead(casMotorPin) == HIGH){

digitalWrite(ledPin, HIGH);}

else {

digitalWrite(ledPin, LOW);}

}

 

 

Later the prototype was soldered together and added to the Arduino hardware board.

 

blogentry-37655-0-44540400-1505164040_thumb.jpg

 

blogentry-37655-0-04892600-1505164044_thumb.jpg

 

blogentry-37655-0-60111600-1505164046_thumb.jpg

 

The next step is to write the software for the Arduino to pass all relevant MIDI data to the Atari and a short Atari program to monitor the incoming data and test the data flow control. I suppose I should also look over the accessory source code to remind myself how to set the cassette motor control bit.

  • Like 1
 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   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...