

                           Special Debug/Test Commands
                                    04/27/93



        **** Note: Do not rely on the debug port image commands to remain 
        the same. It is provided here only for references purposes. The 
        commands can and most likely will change in future versions of 
        the software. 



        Command                                                    Number
        ----------------------------------------------------------------- 
        Warm Start                                               *****  0

         1000 H            The number 0 + 1000H
         0000 H            No data sent
         EFFF H            Inverted checksum

        This command is only available in debug mode. When given it 
        causes the audiometer to return to the system monitor. 

        Note: This command is NOT available in production units. 



        ----------------------------------------------------------------- 
        Get I/O Port Image                                        **** 29

         101D H            The number 29 + 1000H
         0000 H            No data sent
         EFE2 H            Inverted checksum

        This command returns a copy of the memory image used to control 
        the I/O ports in the audiometer. This can be used to monitor the 
        status of the ports in the instrument. This is provided primarily 
        as a diagnostic tool, and is not intended for general purpose 
        operation. The format and operation of the port image may and 
        probably will change in the future.

















                                        1


        Response                                     (Command)     Number
        ----------------------------------------------------------------- 
        I/O Port Image                               **** (29)     -28643
                                                                  [901DH]    
         101D H            The number 29 + 1000H
         0020 H            32 data words follow
         xxxx              I/O Port image array 
         ....
         zzzz              Inverted checksum

        This response returns a copy of the master output memory image 
        used to control the I/O ports in the audiometer. The output image 
        is formatted in an array of 64 bytes in the following form:

         Name  [Pos]  ;Description
         AIOFLG [0]  ;Misc AIO control flags
             ;Bit 0 = NZ=left channel is changing (dirty)
             ;Bit 1 = NZ=right channel is changing (dirty)
             ;Bit 2 = NZ=left channel mode changing
             ;Bit 3 = NZ=right channel mode changing
             ;Bit 4 = NZ=left long ramp up/down delay;  Z=Short delay
             ;Bit 5 = NZ=right long ramp up/down delay; Z=Short delay
             ;Bit 6 = NZ=right chan owns mix bit; Z=Left owns mix bit
             ;Bit 7 = NZ=Use sync freq in both chan (use left freq)
             ;Bit 8 = NZ=left chan is noise;      Z=tone/speech
             ;Bit 9 = NZ=right chan is noise;     Z=tone/speech
             ;Bit 10 = NZ=left chan is speech;    Z=tone/noise 
             ;Bit 11 = NZ=right chan is speech;   Z=tone/noise
             ;Bit 12-15 = not used @@@

         SNPWEN [2]  ;Sound/Noise/Pulse/Warble action flags
             ;Bit 0 = Left Pure Tone Sound Enable (NZ=active)
             ;Bit 1 = Right Pure Tone Sound Enable (NZ=active)
             ;Bit 2 = Left Noise Sound Enable (NZ=active)
             ;Bit 3 = Right Noise Sound Enable (NZ=active)
             ;Bit 4 = Left Warble Enable (NZ=active)
             ;Bit 5 = Right Warble Enable (NZ=active)
             ;Bit 6 = Left Pulse/Sisi Test Enable (NZ=active)
             ;Bit 7 = Right Pulse/Sisi Test Enable (NZ=active)
             ;Bit 8 = Left Mic/Ext Enable (NZ=active)
             ;Bit 9 = Right Mic/Ext Enable (NZ=active)
             ;Bit 10 = Left ABLB/MLB Test Enable (NZ=active)
             ;Bit 11 = Right ABLB/MLB Test Enable (NZ=active)
             ;Bit 12-15 = not used @@@













                                        2


         LEDIMG [4]  ;(2bytes) Keyboard LED output image
         RFLCLK [6]  ;(3bytes) Right filter clock select image
         LFLCLK [9]  ;(3bytes) Left filter clock select image
         RDPWM  [12] ;Right Dpot Wiper Mux
         RDPW1  [13] ;Right Dpot Wiper 1
         RDPW0  [14] ;Right Dpot Wiper 0
         LDPWM  [15] ;Left Dpot Wiper Mux
         LDPW1  [16] ;Left Dpot Wiper 1
         LDPW0  [17] ;Left Dpot Wiper 0
         RFSEL  [18] ;right hi nib=dest mux, lo nib=gross atten 
         LFSEL  [19] ;left hi nib=dest mux, lo nib=gross atten 
         RFMUX  [20] ;right hi nib=src mux, lo nib=filter mode
         LFMUX  [21] ;left hi nib=src mux, lo nib=filter mode
         SAAIMG [22] ;(32bytes) Sound chip control image registers

         KEYIMG     [54] ;(6bytes) Keyboard port input image
         RSXFLG     [60] ;(1byte)  rs232 control line input
         TDUMMY     [61] ;(3bytes) DUMMY AREA TO FILL IT TO EVEN 64


        The SAAIMG is a subarray within the port record. It is a direct 
        copy of the port map of the SAA1099. The SAA1099 is used for 
        sound generation in the audiometer. 

        SA1099 register definitions:

          Name  [Pos]  ;Description
         SAAMP0 [00H]  ;L/R Amplitude 0
         SAAMP1 [01H]  ;L/R Amplitude 1
         SAAMP2 [02H]  ;L/R Amplitude 2
         SAAMP3 [03H]  ;L/R Amplitude 3
         SAAMP4 [04H]  ;L/R Amplitude 4
         SAAMP5 [05H]  ;L/R Amplitude 5
         SAFRQ0 [08H]  ;Left channel Frequency 0
         SAFRQ1 [09H]  ;Left channel Frequency 1
         SAFRQ2 [0AH]  ;Left channel Frequency 2
         SAFRQ3 [0BH]  ;Right channel Frequency 0
         SAFRQ4 [0CH]  ;Right channel Frequency 1
         SAFRQ5 [0DH]  ;Right channel Frequency 2
         SAOCT0 [10H]  ;Octave 0,1
         SAOCT2 [11H]  ;Octave 2,3
         SAOCT4 [12H]  ;Octave 4,5
         SAFQEN [14H]  ;Frequency enables
         SANSEN [15H]  ;Noise enables
         SAPNEN [16H]  ;Predefined Noise enables
         SAENV0 [18H]  ;Envelope Generator 0 Config
         SAENV1 [19H]  ;Envelope Generator 1 Config
         SASNDE [1CH]  ;Sound Enable (all)


        For a more specific description of the operation of each register 
        in the SAA1099 refer to the manufacture's manual for the part 
        (Signetics/Phillips).




                                        3


        The KEYIMG array is a subarray within the Port record. It is 
        formed in the following manner:
           
         KEYIMG [0]
             Bit 0-2 : Right input encoder
             Bit 3-4 : Right output encoder
             Bit 5-7 : Right simulator encoder
         KEYIMG [1]
             Bit 0-4 : Right level encoder
             Bit 5   : Right stimulus button
             Bit 6   : Right -2.5 button
             Bit 7   : Right Reverse stimulus button
         KEYIMG [2]
             Bit 0-3 : Frequency encoder button
             Bit 4   : Destination Reverse button
             Bit 5   : Pulse button
             Bit 6   : Warble button
             Bit 7   : Talk Forward button
         KEYIMG [3]
             Bit 0-4 : Left level encoder
             Bit 5   : Left stimulus button
             Bit 6   : Left -2.5 button
             Bit 7   : Left Reverse stimulus button
         KEYIMG [4]
             Bit 0-2 : Left input encoder
             Bit 3-4 : Left output encoder
             Bit 5-7 : Left simulator encoder
         KEYIMG [5]
             Bit 0-7 : Patient Response button (all bits are the same)
         RSXIMG [0]
             Bit 0-3 : not used (0) 
             Bit 4   : RS232 CTS line state
             Bit 5   : RS232 DSR line state (currently always on)
             Bit 6   : RS232 RI  line state (on=FIPP, off=ASCII)
             Bit 7   : RS232 DCD line state (currently always off)

        The TDUMMY array of four bytes is set aside for future expansion 
        as needed.

        The entire 64 byte array is referred to as the AIOIMG array in 
        the audiometer software. The various components are updated each 
        time the Control Panel Register set is changed. Once every 8ms, 
        the AIOIMG array is copied to the transfer mailbox to be sent to 
        the hardware update routines. Once the array passes though the 
        mailbox, it becomes the TIKIMG array. Sometime after the array 
        has been transferred out of the mailbox (typically 7ms or so) the 
        data in the array is used to update the audiometer hardware.
        The I/O port image function can be used to monitor the status of 
        the ports in the instrument. This is provided primarily for a 
        diagnostic tool, and is not intended for general purpose 
        operation. 

        *Warning:* The format and operation of the port image may and 
        probably will change in the future.



                                        4


        04/27/93 - med : Split off from main manual file
























































                                        5
