6
Interfacing the Am186CC Controller to an AMD SLAC Device Using Enhanced SSI
Appendix A gives the listings for two general-purpose
read and write routines. They have been coded in
assembly language to maximize speed. In most cases,
the natural flow of the software guarantees that there is
at least 5
μ
s between bytes. In the listing given, the
print commands between writes and reads take much
longer than 5
μ
s. If this is not the case, either a software
delay or the Am186CC controller’s timer could provide
the necessary wait.
INITIALIZATION
The initialization process requires two steps. First, the
on-board peripheral of the Am186CC controller (PIO
and SSI ports) must be set up for proper operation.
This includes setting the mode and direction of the PIO
signals as well as setting the pin itself to a known state.
Second, now that the interface is operational, the
SLAC device itself should be initialized. Each of the
SLAC devices has a recommended power-up
sequence that can be found in the data sheet. For
example, the QSLAC device’s recommended
sequence is as follows:
1. Select MCLK (command #6)
2. Reset software (command #2)
3. Program coefficients and parameters
4. Activate (command #5)
The Am186CC controller’s PIO and SSI ports should
be initialized as soon as possible after reset to ensure
that the output pins are in the correct state. However,
after power is stable, 1 ms is needed before commands
can be sent to the SLAC device. Most systems have an
external power-up-reset monitor that provides this
delay. If not, or if they have separate power supplies,
software must wait before sending the first command.
The QSLAC device has a power interruption flag (PI,
command 23, bit 7), which should be checked after the
delay.
SOFTWARE LISTING
The software listing given in Appendix A is written in C
and compiled with Microsoft’s C/C++ compiler. This
example code illustrates how to read the QSLAC
device’s Z-filter coefficients. The software was tested
on several of the evaluation boards available from
AMD. An ASLAC Device Interface Board (ACIF
board) was used to load a known set of coefficients into
a QSLAC device low-noise board. An Am186CC
controller demonstration board was then connected in
place of the ACIF board to read back the coefficients.
The main body of the program first initializes the
various ports and then sends a read Z-filter command.
The for loop then reads back the 15 bytes of the Z-filter
coefficients. The subroutines, SLAC_read and
SLAC_write, are written in assembly language for
speed and clarity. These subroutines implement the
code required to send or receive a single byte.
Appendix B shows how to modify the write routine to
use PIOs instead of SDEN. This example makes use of
the Am186CC controller's new PIO set and clear
registers to ensure that no other PIOs are affected by
this low-level routine. The new registers make it easy
to set the state of a specific PIO without affecting any
other PIOs, even though all 16 bits are written. The
modification of the other routines is left to the reader.
SUMMARY
The new features of the Am186CC controller make it
easy to interface with AMD SLAC devices using the
SSI. The telecommunications features of the
Am186CC controller make it an excellent choice for
higher performance linecards.