Jump to content





DH100-->A8 MIDI Interface

Posted by Pack007, 11 September 2017 · 159 views

dh100 midi
DH100-->A8 MIDI Interface

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.
 
Attached Image
 
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.
 
Attached Image
 
Attached Image
 
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.
 
Attached Image
 
Attached Image
 
Attached Image
 
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.






Recent Comments

Latest Visitors