Example: Identifying SPiceX outputs

This example program is handy for familiarizing yourself with the mapping of the SPiceX outputs.

;IDENTOUT.SPT : Sample program to identify which outputs get
;activated from which bytes/bits of U when using the
;SPxTxfr instruction.

;The program sends (up to) the first 8 bytes of RAM
;out to a chain of (say) XBIO16 boards. Byte 0 is counted
;up in binary. The other bytes are statically preloaded
;with their own address, i.e. byte 5 contains binary 5.

********************************************************************
;Set the following constant to reflect the number of bytes of 
;data being shifted out.
;
;       XBIO16          2 bytes
;       MBIO16          2 bytes
;       XIRO16          1 byte
;       HIO16           1 byte
;       FP16            1 byte


ShiftLength     EQU             8       ;Minium 5 with standard expansion boards!

**** NOTE ****
;SPiceX mode works only with standard XPice expansion boards when
;there is more than 5 bytes of data. For less than that the
;automatic detection will sense the boards and map them as
;regular I/O. 
;With custom expansion boards it may work with fewer than 5 bytes,
;depending on the design of the board. Please consult the board documentation
****************************************************************

                SPxMode         6
                SetMem          0,0             ;Pre-load RAM images
                SetMem          1,1
                SetMem          2,2
                SetMem          3,3
                SetMem          4,4
                SetMem          5,5
                SetMem          6,6
                SetMem          7,7

                SetV            ShiftLength
A               MemToUV         0,0             ;Transfer V bytes from RAM to U

                SPxTxFrU        0               ;Send it out
                Pause           10
                IncM            0               ;Increment counter
                GoTo            A