


                          FA10/12/18 Keyboard commands
                                    


        *** Warning: Since the Raw Keyboard information is a copy of the 
        raw keyboard panel information, the information contained in 
        these registers will change when the keyboard on the audiometer 
        changes.


        Command                                                    Number
        ----------------------------------------------------------------- 
        Get Raw Keyboard Input Registers                                9

         1009 H            The number 9 + 1000H 
         0000 H            No data follows
         EFF6              Inverted checksum

        Response
        --------
         9009 H            The number 9+9000H (-28663)
         0008 H            Eight data words follow
         xxxx              Keyboard register data
         ....
         zzzz              Inverted checksum

        The raw keyboard registers can be read at anytime with this 
        command. The raw registers are unaffected by the Computer Control 
        selection. That is the reading is the same whether the audiometer 
        is under computer control or font panel control. This provides a 
        means to read the keyboard switches without affecting the 
        operation of the audiometer. This command returns a snapshot of 
        the keyboard at the time the command was given.

        the raw keyboard registers are unprocessed keyboard information 
        that reflects the mechanical positions of the panel controls. The 
        raw keyboard register information is debounced, but it is not 
        converted to the internal audiometer register and control format. 
        See the Get Control Panel Register commands for reading processed 
        keyboard information.















                                        1


        =================================================================

                          Keyboard Input Register Data

        The keyboard registers consist of 16 bytes (eight words). The 
        registers contain debounced and decoded keyboard selections. 
        They are in the following format:

        KEYDAT[0]  - KEYSTM   Stimulus push button status       
        KEYDAT[1]  - KEYPBM   Miscellaneous push button status  
        KEYDAT[2]  - ROTSWT0  Frequency switch           (Rot Switch #0)
        KEYDAT[3]  - ROTSWT1  Right Level switch         (Rot Switch #1)
        KEYDAT[4]  - ROTSWT2  Right Input (Src) switch   (Rot Switch #2)
        KEYDAT[5]  - ROTSWT3  Right Output (Dest) switch (Rot Switch #3)
        KEYDAT[6]  - ROTSWT4  Right Simulator switch     (Rot Switch #4)
        KEYDAT[7]  - ROTSWT5  Left Level switch          (Rot Switch #5)
        KEYDAT[8]  - ROTSWT6  Left Input (Src) switch    (Rot Switch #6)
        KEYDAT[9]  - ROTSWT7  Left Output (Dest) switch  (Rot Switch #7)
        KEYDAT[10] - ROTSWT8  Left Simulator switch      (Rot Switch #8)
        KEYDAT[11] - PATRSW   Patient switch / RS232 flags register           
        KEYDAT[12] - KEYERR   Keyboard error register NZ=error  
        KEYDAT[13] - FLAKEY   Flaky level switch error flags
        KEYDAT[14] - KDUMMY1  Dummy byte to fill space          
        KEYDAT[15] - KDUMMY2  Dummy byte to fill space          

        Remember that even though the keyboard data registers are sent in 
        word format (eight words) by the FIPP routines, they are accessed 
        in byte format.

        KEYSTM  has the following format:           
         bit 0 - Left stimulus master      (1=stimulus toggle is on) 
         bit 1 - Left Stimulus button      (1=button pressed)      
         bit 2 - Left -2.5 button          (1=button pressed)          
         bit 3 - Left Rev Stimulus button  (1=button pressed)  
         bit 4 - Right Stimulus master     (1=button pressed)     
         bit 5 - Right Stimulus button     (1=button pressed)     
         bit 6 - Right -2.5 button         (1=button pressed)         
         bit 7 - Right Rev Stimulus button (1=button pressed) 

        KEYPBM  has the following format:           
         bit 0 - Dest Rev button           (1=button pressed) 
         bit 1 - Pulse button              (1=button pressed) 
         bit 2 - Warble button             (1=button pressed) 
         bit 3 - Talk Fwd button           (1=button pressed) 
         bit 4 - Patient Response          (1=button pressed) 
         bit 5 - N/A <reserved>                       
         bit 6 - N/A <reserved>                       
         bit 7 - Stenger Master flag       (1=Stenger button mode is on)

        KDUMMY  The Dummy fill bytes are used to fill out the register 
        array to eight words for transmission by the fipp commands. They 
        will normally be zero, but this should not be relied upon. Should 
        an extra keyboard input register be need in the future, these 
        bytes may take on a real value. 


                                        2


        Frequency switch selection definitions (ROTSWT0):

                   125 = switch pos 0
        Frequency  250 = switch pos 1
        in Hertz   500 = switch pos 2
                   750 = switch pos 3
                  1000 = switch pos 4
                  1500 = switch pos 5
                  2000 = switch pos 6
                  3000 = switch pos 7
                  4000 = switch pos 8
                  6000 = switch pos 9
                  8000 = switch pos 10
             <invalid> = switch pos 11
             <invalid> = switch pos 12
             <invalid> = switch pos 13
             <invalid> = switch pos 14
             <invalid> = switch pos 15


        Level switch selection definitions (ROTSWT1,ROTSWT5):
             
                   -10 = switch pos 0     
                    -5 = switch pos 1     
        Hearing      0 = switch pos 2     
        Level        5 = switch pos 3     
        in HL       10 = switch pos 4     
                    15 = switch pos 5     
                    20 = switch pos 6     
                    25 = switch pos 7     
                    30 = switch pos 8     
                    35 = switch pos 9     
                    40 = switch pos 10     
                    45 = switch pos 11     
                    50 = switch pos 12     
                    55 = switch pos 13     
                    60 = switch pos 14     
                    65 = switch pos 15     
                    70 = switch pos 16     
                    75 = switch pos 17     
                    80 = switch pos 18     
                    85 = switch pos 19     
                    90 = switch pos 20      
                    95 = switch pos 21     
                   100 = switch pos 22     
                   105 = switch pos 23     
                   110 = switch pos 24     
             <invalid> = switch pos 25     
             <invalid> = switch pos 26     
             <invalid> = switch pos 27     
             <invalid> = switch pos 28     
             <invalid> = switch pos 29     
             <invalid> = switch pos 30
             <invalid> = switch pos 31


                                        3


        Input switch selection definitions (ROTSWT2, ROTSWT6):
             TONSRC = 0 : Tone source select
             MICSRC = 1 : Mic source select
             EXTSRC = 2 : External source select
             EXOSRC = 3 : Other External source select
             STNSRC = 4 : Stinger source select
             WBNSRC = 5 : WN source select
             SBNSRC = 6 : SN source select
             NBNSRC = 7 : NBN source select

        Output switch selection definitions (ROTSWT3, ROTSWT7):
             DOFF   = 0 : channel is off (not a real switch pos)
             DPHONE = 1 : switch pos 0   (Phone)
             DBONE  = 2 : switch pos 1   (Bone)
             DSPKR  = 3 : switch pos 2   (Spkr)
             DOTHER = 4 : switch pos 3   (Other Ch)

        Simulator switch selection definitions (ROTSWT4, ROTSWT8):
             SIMOFF  = 0 : switch pos 0  (flat / off)
             SIM6DB  = 1 : switch pos 1  (6db)
             SIM12DB = 2 : switch pos 2  (12db)
             SIM18DB = 3 : switch pos 3  (18db)
             SIMHFE  = 4 : switch pos 4  (hfe)
             OPTC    = 5 : switch pos 5  (option C)
             OPTB    = 6 : switch pos 6  (option B)
             OPTA    = 7 : switch pos 7  (option A)

        PATRSW contains a copy of the patient switch register. Bit zero 
        will be off if the patient switch is not pressed. Bit zero will 
        on if the switch is being pressed. The upper four bits contain a 
        copy of the RS232 control lines. The control lines are debounced, 
        but they do not trigger events in the audiometer. Bit 4 is the 
        CTS control line, bit 5 is the DSR control line. Currently the 
        DSR control line is not wired on the audiometer, and will always 
        be on.  Bits 1,2,3,6,7 are undefined and should not be relied on 
        to contain valid information. 

        KEYERR is not a switch output, but rather contains the error code 
        for any switch errors that might occur. The push button switches 
        and some rotary switches cannot be tested, so are not included in 
        the test procedure. When an error occurs the led associated with 
        the switch will be flashed. 


             SWERR0 : Bit 0 = Unknown switch error
             SWERR1 : Bit 1 = Rotary switch #0 is bad - Freq
             SWERR2 : Bit 2 = Rotary switch #1 is bad - RLev
             SWERR3 : Bit 3 = Rotary switch #4 is set wrong - Rsim
             SWERR4 : Bit 4 = Rotary switch #5 is bad - LLev
             SWERR5 : Bit 5 = Rotary switch #8 is set wrong - Lsim
             SWERR6 : Bit 6 = Unknown switch error
             SWERR7 : Bit 7 = Input buss error (all FFs)




                                        4


        FLAKEY contains the error flags with indicates if a level switch 
        has been detected to be flakey. A flakey level switch is 
        determined by the switch increasing the level by more than 20dB 
        within 8ms. The lower switch position will be retained in the 
        register until the switch is set back to the lower level.

             FSWER2 : Bit 2 = Rotary switch #1 is flaky - RLev
             FSWER4 : Bit 4 = Rotary switch #5 is flaky - LLev

        Any other error in KEYERR or FLAKEY is an unknown switch error 
        that could not be identified. A value of zero means that no error 
        occurred. 







        History: 04/27/93 -med : split from main command file
                 05/02/97 -med : included cmd response format
        <eof>


































                                        5
