LiNC Z50AYMSound User manual

AY3-8910/YM2149 based
sound-card for Z50Bus
Assembly guide
Version 0.1

AY/YM Sound-card
Assembly guide
v 0.1
Table of Contents
Introduction..........................................................................................................................................2
Parts list................................................................................................................................................3
Assembly..............................................................................................................................................4
Step 1: Add resistors........................................................................................................................4
Step 2: Add audio jack.....................................................................................................................
Step 3: Add IC sockets.....................................................................................................................6
Step 4: Add the jumpers...................................................................................................................7
Step : Add the DIP switch..............................................................................................................8
Step 6: Add the Z 0Bus connector..................................................................................................8
Step 7: Add the capacitors...............................................................................................................8
Step 8: Clean and dry the board, inspect.......................................................................................10
Step 8: Installing integrated circuits..............................................................................................10
Preparing for use.................................................................................................................................11
Introduction
The Z 0AYMSound is a chip-sound card designed around the General Instuments AY3-8910 and
the compatible Yamaha YM2149 sound chips. The AY3-8910 is a 3-voice programmable sound
generator, and was a widely used chip, appearing in famous computers such as the Amstrad CPC,
the MSX-line and probably most famously was used with the ZX Spectrum computer from Sinclair.
The YM2149 is a directly pin-compatible version of the '8910 made by Yamaha, and used in the
Atari ST. As such there exists a vast library of music created for these chips, much of it in
ProTracker format which can be played directly using the Z 0AYMSound card. Of course the card
is not limited to playing back tunes created by others. What you use the card for is fully in your
control.
The card features:
•Z 0Bus interface, designed to work with LiNC80 SBC1 and other Z 0Bus based
microcomputers.
•Stereo line out, user selectable ABC/ACB.
•Header for the two 8-bit digital I/O ports that the sound chip has built-in.
•I/O address fully decoded to any even base address.
•Generous prototyping area where you can build your own clock- or filter-circuits, or
anything else you want.
•The audio frequency clock is by default derived from the CPU clock, and can be set to Clk/4
(YM) or Clk/4 (AY).
Note the the YM and AY chips are both end of life. eBay often has these available, which are either
pulled from old hardware or Chinese clones. Because of this, I will only supply this kit without the
YM/AY chip, and you will have to source this yourself.
KiCAD schematic and layout, as well as example code, can be located at
https://github.com/linc80/Z 0AYMSound
Page 2 of 11

AY/YM Sound-card
Assembly guide
v 0.1
Parts list
Part type Value/designation Positions
1x Capacitor, ceramic 100n C1
2x Capacitor, ceramic 220n C2,C3
8x Resistor, radial 100k R1,R2,R3,R4,R ,R6,R7,R1
x Resistor, radial 60R R8,R9,R12,R13,R14
2x Resistor, radial 820R R10,R11
1x Sound Chip AY3-8910 or YM2149 U1 (Not included in kit)
1x Logic IC 74LS688 U2
1x Logic IC 74LS32 U3
1x Logic IC 74LS138 U4
1x Logic IC 74LS00 U
1x Logic IC 74LS74 U6
1x Connector, 0 pin male angled Z 0Bus J1
1x Stereo Jack connector PJ-307 / JYO-39- P J6
3x Pin headers w/jumpers 2x2, 1x2, 1x3 J2+J3, J4, J
1x DIP Switch, 8 positions SW_DIP_x08 SW1
6x Sockets Assorted 1 per IC
1x PCB
Page 3 of 11

AY/YM Sound-card
Assembly guide
v 0.1
Assembly
Step 1: Add resistors
Start with the 100k resistors. These are all located between U2 and the DIP-switch SW1, and are
labeled R1 through R7, and R1 . Next, add the two 820Ohm resistors R10 and R11. You should
now have five remaining resistors to mount, all 60Ohm, with labels R8, R9, R12, R13 and R14.
All resistors mounted. Pay attention to the values when assembling.
Page 4 of 11

AY/YM Sound-card
Assembly guide
v 0.1
Step 2: Add audio jack
The location J6 for the audio jack is fairly easy to spot, as there is a notch on the side of the PCB as
part of it's position. Place it in its location, and add a piece of tape across it to hold it in place while
you flip the board. Secure it by soldering in the middle pin, then remove the tape and inspect that
the connector sits close and flat with the board. Adjust if needed by heating the middle pin while
applying pressure to the connector. When the connector is properly aligned, solder the remaining
four pins.
Audio jack covers the notch in the side of the card in this picture.
Page of 11

AY/YM Sound-card
Assembly guide
v 0.1
Step 3: Add IC sockets
There are three 14-pin IC sockets, one 16-pin, one 14 pin and one 40 pin socket. Make note of their
orientation, fit them with the notch matching the legend on the PCB. By making sure the socket
clearly indicates the correct orientation in relation to pin one, you avoid mistakes when the IC
components get installed later.
One suggested tip for mounting the sockets follows:
Place all the sockets in their positions before soldering. Use painters masking tape to hold the
sockets in position, so they stay in place when you turn the board over. Once the board is turned so
the pins are facing you, solder the pins on opposing corners of each socket. You can now remove
the painters tape. Inspect how well seated the sockets are. If a socket is misaligned, heating the
already soldered pins lets you tweak its position. Once all sockets are properly located, the
remaining pins can be soldered in one go.
Using painters tape to temporarily hold IC sockets
Page 6 of 11

AY/YM Sound-card
Assembly guide
v 0.1
Step 4: Add the jumpers
The build uses one 1x2 pin jumper (J4), one 2x2 pin jumper set (J2+J3) and one 1x3 pin jumper
(J7).
J4 can be used to short Right and Left audio channels to create a “pseudo mono” output (note that
you can not use a Mono jack connector with J4 shorted, as this will short all audio to Ground). This
jumper is located next to the audio jack.
J2+J3 allows selection of ABC or ACB stereo. The location for this ABC/ACB selector is next to
pin 1 of the U1 AY/YM socket.
J7 is located between U3 and U6, and is used to source the audio clock for the AY/YM chip. The
options allow selection between CPU-clock divided by four (jumper pins 1-2, jumper on the side of
U1), divide by two (jumper pins 2-3, jumper on side of the prototyping area), or you can omit the
jumper, and build your own clock source on the prototyping area and feed its clock output to the
middle pin (pin 2 of J7).
Jumper locations seen left-to-right are J7 J2+J3 J4
Page 7 of 11

AY/YM Sound-card
Assembly guide
v 0.1
Step 5: Add the DIP switch
For the 8-position DIP switch, you can use the trick of holding them in place with painters tape
while starting the soldering. Your kit may contain either sliding style or piano style switches. For
the piano style, it is preferential to follow the silkscreen when orienting. For the sliding style,
observe the switch body marking for ON position, and select an orientation that makes sense to you.
Step 6: Add the Z5 Bus connector
The right-angled 0-pin connector gets fitted so the pins extend out over the edge of the PCB, so
that it can be inserted into your host Z 0Bus or back-plane. Insert and align the connector, and tack
it in place on two diagonally opposed pins. Check the alignment, and adjust as needed before
proceeding to solder the remaining pins.
Step 7: Add the capacitors
The decoupling capacitor C1 (100nF) is located directly next to the 0 pin Z 0Bus connector. The
audio output capacitors C2 and C3 (220nF) are located directly next to the audio jack. The 220nF
caps included in the kit as C2/C3 are selected for good dynamic when used as a line-out signal,
feeding an amplifier or active speakers. If you plan on primarily using headphones, these should be
replaced with capacitors of value in the 10-47uF range. If you do this, and use electrolytic caps, use
12V or higher rated ones, and place them so the negative polarity points to the jack connector.
Location of Z50Bus connector and capacitors and orientation of connector.
Also shows the default address 0x32 selected on the DIP switch SW1
Page 8 of 11

AY/YM Sound-card
Assembly guide
v 0.1
Step 8: Clean and dry the board, inspect
The typical implementation of a Z 0Bus is unbuffered, which means that any impedance issues on
an expansion card may make the whole system unstable, or inoperable. An example of an
unbuffered Z 0Bus system is the LiNC80 SBC1. You may be surprised that most rosin based fluxes
are to some degree conductive. This is extra true if the flux has by accident been overheated and
started carbonizing. Because of this, the board needs to be thoroughly cleaned when the soldering
has been completed.
To dissolve organic rosin based fluxes denatured alcohol (methylated spirits) or citrus based
cleaners work very well. Do NOT use acetone or acetone based cleaners, as they will damage the
plastic parts assembled on the board. Isopropyl/isopropanol is not suited, as it fails to properly
dissolve the organic rosin (even if it otherwise is a very good cleaning agent). Use a toothbrush or
similar brush to clean the board. You may after cleaning with alcohol or spirits use mineral-free
water to rinse the underside of the board. If you used a citrus based cleaner, rinsing is required.
After cleaning, the board needs to dry completely.
After cleaning, do a thorough and complete inspection. Look for solder bridges, cold or incomplete
joints and similar defects. If you find problems during inspection, you should be able to correct
them, but remember to clean the board again if you need to add (or remove) solder.
Step 8: Installing integrated circuits.
When installing (and preparing to install) the integrated circuits into their sockets, remember that
these are all static sensitive devices, and should be treated with ESD precautions.
When you first receive just about any DIP IC, the legs
will not be perpendicular to the main chip body. They
will bend out slightly. To be able to install them in
sockets without issues, the pins will need to be adjusted
slightly. Carefully bend either row of pins evenly
inwards by a small amount by pressing against a flat
surface (eg. tabletop).
When installing the components, pay attention to pin one,
normally indicated by a dot by pin one and/or a half-circle on the short edge where pin 1 is located.
Pin one is indicated on the silk-screen by a half-circle/crescent on the pin-one side.
Page 9 of 11

AY/YM Sound-card
Assembly guide
v 0.1
Preparing for use
The DIP switch SW1 selects the I/O address of the card. This simple digital I/O card uses a pair of
I/O address in the 0x00 to 0xFF range. The address is selected by setting SW1 so it creates an even
8-bit value for the address bus (the second, odd address in the pair, is taken from the LSB of the
address bus).
The switch has indicators 7 through 1, and “s”, where “s” is connected to an YM2149's clock select
line, and the numbers 7 through 1 represent the address lines A7...A1. A7 is the most significant bit,
A1 the second least significant. Setting an address switch to the OFF position (up for piano-style,
away from the ON marker for sliding style) provides a Low signal through pull-down resistors, and
a High when set to the ON position. The Select line is inverse of this, with a Pull-up resistor in the
OFF, and conneecting the line to Ground in the ON position (when using an AY3-8910, leave the
“s” switch in the OFF position).
The “default” or “official” address is 0x32, as this is the address used in the example source code,
and allocated in the LiNC80 official add-on address map.
The following picture shows the default jumper settings. The audio clock speed jumper J7 is set to
Clk/4 (quarter CPU-clock). The “Mono” jumper J4 is left un-jumpered.
The ABC/ACB selection decides how the three AY-3-8912 output channels (A, B and C) are mixed
to create stereo output channels (left and right). This stereo mixing scheme is based on, and
correctly reproduces music made for, the stereo capable AY3-8910 sound devices (or modifications)
created for 8-bit computers like the Sinclair ZX Spectrum. This means that if you want to hear a
song as it was arranged, you should select the correct channel mixing. There are two common
mixing standards:
•ABC: A is mixed to right, B to left and right, and C to left (common in west-Europe).
•ACB: A is mixed to right, C to left and right, and B to left (common in east-Europe).
The ABC/ACB jumpers is set to ABC by straddling J2 and J3 (if you prefer or will be playing
mostly ACB sound, set the jumpers 90 degrees to what is shown in the picture)
.
Page 10 of 11

AY/YM Sound-card
Assembly guide
v 0.1
Card installed on a LiNC80 with Z50Bus back-plane
with address set to non-default 0x50 and jumpered for ACB stereo.
When your card is fully soldered, cleaned and assembled, and your jumpers and DIP settings set to
their defaults, you are ready to install it onto a Z 0Bus. Install it either on a backplane, or directly to
the host microcomputer. Connect the stereo jack output to the Line in of an audio system or
powered speakers. If you choose to use headphones, and did not substitute the output capacitors as
described in Step 7, it will work, but the sound will be “tinny”.
You can start testing the sound output directly from SCMonitor on your LiNC80 SBC1:
SCMon command Description
o 33 7 Select Mixer register
o 32 ff All mixer channels off
o 33 8 Select Channel A Volume register
o 32 9 Fixed Volume = 9 (01001 binary)
o 33 9 Select Channel B Volume register
o 32 0 Fixed Volume = 0
o 33 a Select Channel C Volume register
o 32 0 Fixed Volume = 0
o 33 1 Select Channel A frequency, coarse tune
o 32 1 Rough tone adjust = 1
o 33 0 Select Channel A frequency, fine tune
o 32 ff Fine tone adjust = ff
o 33 7 Select Mixer register
o 32 fe Turn on Channel A Tone only
More examples using SCMonitor and BASIC, as well as the schematics, documentation for the
AY/YM chip, and a port of the famous PTxPlayer along with some example tunes can be
downloaded from the source repository at https://github.com/linc80/Z 0AYMSound/
More info and links are located at http://linc.no/products/z 0bus-ay3-8910-ym2149-sound-card/
Page 11 of 11

Table of contents