Home -> Magazines -> Issues -> Articles in this issue -> View
Micromusic | |
TRS80 Analogue/Digital InterfaceArticle from Electronics & Music Maker, April 1982 | |

Channels 0 to 15 are decoded from the computer's IN and OUT signals with the required port address, 0 to 255. This is simpler than using memory mapped addressing with a Z80 based computer as less decoding hardware is required. A 74154 TTL 4 to 16 line decoder is used to select one out of 16 external devices. Channels 16 to 23 are decoded as shown in the circuit and are used for the analogue inputs, leaving channels 0 to 15 spare to use as required.
A TTL 74LS244 octal buffer, tri-state is used to interface TTL compatible signals to the input of the TRS80. For example, a SPST switch can be connected as shown, to set the bit to 1 or 0. One of the most simple and obvious applications is to use an external clock oscillator or controller (such as the Synclock or MF1) at one input port bit for setting the tempo of music and rhythms generated by the microcomputer.
A 74LS373, octal tri-state latch is used to interface devices to the output of the data bus. Two 7404 hex inverters can also be used to drive LEDs as shown - useful for confirming coding of output port lines to, for example, a drum generator board (such as in the E&MM Electric Drummer).
A ZN429 Digital to Analogue converter is wired as shown in Figure 1, to the interface. This device has an 8 bit input, lus settling time and typically 2.5V output which can be increased by use of an op-amp. For each additional analogue output a separate 74LS373 and ZN429 is used.

Several analogue outputs could be used for external synthesiser control of such sections as VCO, VCF, VCA etc. on a modular system. Alternatively, provided output voltages are programmed carefully, to match semitones, it's quite straight forward to match most synths CV in and TRIG in for computer control of your instruments (usually up to 5V output is required).

The circuit shown is a simple but effective multiplexing circuit connected to an 8 bit Analogue to Digital Converter. The ADC804 is a successive approximation ADC with 100us conversion time. The simple circuit is achieved by running the converter in the self clocking continuous converter mode. One out of eight output channels is selected from input ports 16 to 23 by software control, and the appropriate address is latched by the 74LS173D type register and the analogue multiplexer input is connected to the ADC.
There are obviously a multitude of possible applications in two main groups: the computer could be an intermediary between the musician and the control parameters of the synthesiser, in which case it can take over all the 'donkey work' such as remembering different settings, initiating sequences or controlling a number of events, at the touch of a button.
Alternatively, everything could be controlled by the software, the computer be- coming its own composer or the musician only controlling the general characteristics of the piece in progress.
Lastly, a completely new and very exciting field is open by connecting transducers of our bodily parameters like muscle activity, skin temperature, etc. There is already a large choice of 'biofeedback' sensors commercially available, which after processing could be used to control the synthesiser. Who knows? Maybe thought control isn't unreachable after all...
It should be pointed out that although this is necessarily limited in complexity, a first improvement could be to use one of the digital outputs to initiate the A to D conversion, thus eliminating possible erroneous readings that can arise if the computer reads data at an instant of transition.



Analogue input
10 CLS
20 A=INP(B)
30 PRINT A
40 FOR Q=1 TO 500:NEXT
50 GOTO 10
where B is input port; use ports 16 to 23 for analogue channels
Analogue output
10 OUT B,D
where B=port number: D=Data, D=0, all bits are 0, D=255, all bits are 1
| Resistors - all ⅓W 5% unless specified | Maplin Code | |
| 180R | 8 off | (M180R) |
| 1k0 | 1 off | (M1k0) |
| 10k | 3 off | (M10K) |
Capacitors | ||
| 15nF polyester | 1 off | (BX71N) |
| 10uF 35V | 1 off | (FF04E) |
| 470uf 25V | 1 off | (FF16S) |
Semiconductors | ||
| W005 Bridge rectifier | 1 off | (QL37S) |
| BZY88C2V7 zener diode | 2 off | (QH00A) |
| LED | 8 off | (WL27E) |
| UA78M05UC regulator | loff | (QL28F) |
| 4051 BE | loff | (QW34M) |
| 7404 | 2 off | (QX40T) |
| 74LS32 | 2 off | (YF21X) |
| 74154 | 2 off | (WH08J) |
| 74LS173 | loff | (YF73Q) |
| 741S244 | loff | (QQ56L) |
| 74LS373 | 2 off | (YH15R) |
| ADC0804 LCN A/D converter | 1 off | (QQ00A) |
| ZN429 D/A converter | 1 off | (Ferranti) |
Miscellaneous | ||
| 40 pin IC socket | 1 off | (HQ38R) |
| 40 way DIP jumper cable single ended | 24" (Watford Electronics) | |
| 40 position card edge connector | (Tandy 276-1558) | |
The above parts list is for the following port connections: 8 bit digital output, one analogue output, an 8-bit digital input and an 8-channel analogue input.
Hands On: Apple Macintosh Computers |
Software Support - Hints, tips & news from the world of Music Software |
Macro Music (Part 1) |
Mac Notes |
Apple Notes |
Technically Speaking |
Musical Micro |
The Musical Micro |
MIDI and the Micro |
Software Support - Hints, Tips & News From The World Of Music Software |
On The Net |
Atari Notes |
Browse by Topic:
Feature by Lyndsay Robinson
Previous article in this issue:
Next article in this issue:
mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.
If you value this resource, you can support this project - it really helps!
New issues that have been donated or scanned for us this month.
All donations and support are gratefully appreciated - thank you.
Do you have any of these magazine issues?
If so, and you can donate, lend or scan them to help complete our archive, please get in touch via the Contribute page - thanks!