85
trial, equation (27) is used to calculate the initial position correction offset, C (on the left side of equation (27)), and the initialization flag is set so that this equation is bypassed in subsequent usage of this routine. The actual stimulus angle, T (on the left side o f equation (28)), is the result to be sent to the 12 bit D/A converter for controlling the SPS. Incorporated into the calculation of T is a preconditioning for compatibility with the D/A converter. The angle sent to the converter first needs to be converted to an integer in the range of 0 to 4095 (a 12 bit binary number) corresponding to a stimulus movement range of Q0 to 320 (as dictated by the limitations of the SPS as discussed in section 2.3.2) It should be noted that the preconditioning includes a change of convention for the stimulus angle from a straight ahead position (along the Y axis in Figure 4) being called 0' to being called 160. After the angle is converted to an integer, it needs to be left justified 4 bit positions so that its most significant bit is the most significant bit of a 2 byte word (as discussed in section C.1 in the Appendix). Two of these left shifts are later performed by a D/A converter handling routine, D/A.MLP, as part of its out of bounds error detecting function, and so only two left shifts are incorporated into this present calculation of T.
For any stimulus angle within the acceptable 160 160 range, the calculation of the preconditioned actual stimulus angle in equation (28) will result in the BASIC floating
..