Information provided by: Andrew Gale
When you finally get round to designing your first piece of SAM
hardware, you may wonder how to actually put the thing together. The
easiest method I've found is this:
- Get yourself a plug for the expansion connector on the back of
the SAM. They are usually listed in electronics catalogues as "DIN
41612 right-angle plug, rows A & C" - note that anything else, such as
rows A & B is useless.
- You will find markings of the plug to tell you which pin
is which - you may need a magnifying glass! They should be numbered
from A1 to A32 and C1 to C32. Now, referring to the SAM manual, pull
out any pins you don't need using a pair of pliers. Be careful not to
pull out the wrong pins - it's tricky putting them back in. For most
[but not all!] hardware, you can pull out all the pins EXCEPT d0, d1,
d2, d3, d4, d5, d6, d7, a0, a1, a2, a3, a4, a5, a6, a7, IORQL, RDL,
WRL, +5v, 0V, and DBDIR. You may also like to leave PRINTL, MREQL,
RESETL and CPUCLK, depending on your hardware.
- Now take a piece of stripboard with at least 32 strips -
you can often find stripboard with 40 strips, which is ideal. Make
sure you have sufficient holes per strip to fit all of your
components. Now break each stip about 10 holes from one end - the DIN
41612 plug is going to be soldered onto the isolated section of
stripboard, with all of your components on the other part.
- Place the DIN 41612 plug on to strip board. You should
find that by bending some of the longer pins you can arrange them so
that each pin goes into its own strip. Ensure that no two pins are
connected to any one strip. If you can't arrange the pins just by
bending them then snip don't insert them through a hole - instead
solder a piece of wire to them any take them to a free strip, When you
are happy that each pin has its own unique strip, solder them in
place. You may like to use some glue to hold the connector onto the
- Make a visual check that there are no solder bridge, or
unbroken tracks where there should be broken ones. Before adding your
other components it is worth pluggin it into the SAM and powering up -
if the SAM goes haywire then switch off IMMEDIATELY and check your
construction. Are there any solder bridges? Are there two pins in any
one track? If the SAM works OK, then proceed.
- You can now add your components to the rest of the
stripboard, breaking tracks where necessary. Use pieces of insulated
wire to link to the SAM's signals by connecting to the short stips
connected to each pin, and routing the signals to wherever you need it
on the main stripboard.
There are a few points to bear in mind when designing SAM
- It's a good idea to put a 'decoupling' capacitor across the power
supply of each i.c. you use. Simply solder a 0.1 microfarad ceramic
(or similar) capacitor between +ve and ground. This reduces the chance
of power glitches.
- Make sure that your hardware drives the DBDIR line. At
the moment you may think there's no need - but when the new SAMBus
comes out you will be sorry because your hardware won't work with it!
If you do not drive the DBDIR line then you won't be able to send any
data to the CPU (i.e. during a read) and you may not be able to get
any data from the CPU (i.e. during a write). All you have to do is set
DBDIR to logic 0 (ideally by means of an open-collector output) in
order to connect to the CPUs data lines.
- Don't drive DBDIR low when your interface is not being
addressed - it will corrupt the data lines.
- The NMIL and RESETL lines are not debounced - that is
when the NMI or RESET buttons are pressed you may get several logic
- The SAM power supply can only provide a certain
current. If you have lots of devices attached to the expansion port
then you may need an additional power supply.
- Avoid using the joystick port as an easy input - you will
probably get loads of junk typed on the screen when you switch on!