The SN76489 Firmware has been ported to Arduino.
Note that a variable called "byte USB_SERIAL_MODE = 1;" sets whether or not data should be read from a traditional MIDI input or from a USB serial connection.
If USB_SERIAL_MODE = 1, then the mode is set to accept input from a USB serial connection. A traditional 5 pin MIDI connection will not work.
If USB_SERIAL_MODE = 0, then the mode is set to accept input from a traditional 5 pin MIDI connection. A USB serial connection will not work.
Download the firmware here: http://milkcrate.com.au/_other/downloads/teensy/SN76489_USB_MIDI_101/SN76489_USB_MIDI_101_ARDUINO.ino
==== DATA ====
Arduino PORTC 0 = Analog Pin 0 --> SN76489 Pin 10 (Data 0)
Arduino PORTC 1 = Analog Pin 1 --> SN76489 Pin 11 (Data 1)
Arduino PORTC 2 = Analog Pin 2 --> SN76489 Pin 12 (Data 2)
Arduino PORTC 3 = Analog Pin 3 --> SN76489 Pin 13 (Data 3)
Arduino PORTC 4 = Analog Pin 4 --> SN76489 Pin 15 (Data 4)
Arduino PORTC 5 = Analog Pin 5 --> SN76489 Pin 1 (Data 5)
Teensy PORTB 0 = Arduino Digital Pin 8 --> SN76489 Pin 2 (Data 6)
Teensy PORTB 1 = Arduino Digital Pin 9 --> SN76489 Pin 3 (Data 7)
==== CONTROL AND MIDI INPUT ====
Arduino PORTD 2 = Arduino Digital Pin 2 --> SN76489 Pin 5 (Write Enable)
Arduino PORTD 0 = Arduino Digital Pin 0 / RX --> Receive data from MIDI INPUT CIRCUIT
==== POWER AND CRYSTAL ====
Teensy Ground --> SN76489 Pin 8 (ground)
Teensy Ground --> SN76489 Pin 6 (Output Enable)
Teensy Ground --> Xtal Osc Ground
Teensy 5V --> SN76489 Pin 16
Xtal Osc Signal --> SN76489 Pin 14 (Clock)
==== AUDIO OUTPUT ====
SN76489 Pin 7 --> Audio Output Signal
SN76489 Pin 8 --> Audio Output Ground
==== MIDI INPUT CIRCUIT (ONLY IF REQUIRED) ===
MIDI Input DIN 5 Pin 4 --> 4n28 Pin 1
MIDI Input DIN 5 Pin 5 --> 4n28 Pin 2
N4148 Diode (positive anode) --> 4n28 Pin 1
N4148 Diode (negative cathode) --> 4n28 Pin 2
4n28 Pin 6 --> 100k resistor (leg 1)
100k resistor (leg 2) --> Teensy Ground
4n28 Pin 5 --> Teensy PORTD 2 = Teensy Digital Pin 7
4n28 Pin 5 --> 3.3k resistor (leg 1)
3.3k resistor (leg 1) --> Teensy 5V
4n28 pin 4 --> Teensy Ground
Here are diagrams of the various devices.
Friday, May 10, 2013
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment