CURSOR CONTROL DEVICE

Abstract: A grating plate for use in an edge detection system of a cursor control device for optically detecting the position of the cursor.

Description: CURSOR CONTROL DEVICE Field of the Invention The present invention relates to computer control devices and, more particularly, to devices for controlling the position of a cursor on a computer display. Background of the Invention A wide variety of techniques for positioning a cursor on a computer display are available and well known in the computer industry. Conventional cursor control devices include, for example, mice, track balls, touch screens, joy sticks, and light pens. Cursor control devices are also commonly referred to as pointing devices, as they allow a user to select (or "point to") a specific location on a computer screen. Conventional cursor control devices generally suffer from one or more deficiencies. For example, many cursor control devices, such as a typical mouse, require the user to move his or her hand across large areas to operate efficiently and permit movement of the cursor throughout the display area. Often, a user's workspace is limited, and the user must repeatedly lift, move and set down the mouse in order to move the cursor across the screen. In such situations, use of a mouse is inconvenient and frustrating. It can also lead to physical fatigue and repetitive stress injuries. In order to overcome many of the disadvantages of conventional cursor control devices, improved cursor positioning devices have been developed, such as the patented FELIX™ devices produced by Altra Corporation. Devices of this type are disclosed in U.S. Patents No. 4,782, 327, issued on November 1, 1988 and 4,935,728, issued on June 19, 1990; these patents are hereby incorporated by reference in their entirety (and referred to herein as the "Kley Patents"). Devices such as Altra's FELIX™ device permit comfortable movement of a cursor using finger, not wrist or arm, movements. These devices allow for great precision of movement and, in many cases, a cursor can be moved across an entire computer screen by moving a finger less than one square inch. Recently, attempts have been made to improve further the effectiveness of devices such as those described in the Kley Patents. For example, Taiwan U.M. Application No. 84205829 (Publication No. 283506) (hereinafter referred to as the "Taiwan Application"), describes a mechanical optical absolute coordinate cursor control device claimed to provide advantages over the prior art. A rough translation of the specifications and claims of the Taiwan Application, along with relevant drawings, is appended to this application as Endnote 1. It will be apparent to those skilled in the art that the Taiwan Application describes mainly well-known technology, contains numerous flaws, and fails to provide technical support for advantages claimed in the application. For example, as part of the described mechanical optical control device, the Taiwan Application describes the use of optical grating plates to detect position changes, a technique which is well known in the art. In the Taiwan Application, however, the grating plates are configured in upper and lower rows with a 90 degree phase displacement between the rows. The Taiwan Application erroneously asserts that use of the grating plates as described in the Taiwan application permits the unique detection of the minimum and maximum values at the two end boundaries. In fact, this claim is false, and the Taiwan Application fails to provide a disclosure that would enable the relevant claims or advantages. Accordingly, there is a need for inventive improvements to the well known technology described in the Taiwan Application to permit the technology to function properly. In addition to the problems of the device described in the Taiwan Application, prior art pointing devices in general also exhibit many other deficiencies. For example, most pointing devices employ switches, such as the switches operated (i.e., opened or closed) when a user "clicks on" a particular point on the display to select that point for further operations. Detection of state changes in a switch by digital means, however, is often unreliable due to detection of false switching cycles. This problem, for example, can lead to difficulties in distinguishing "double-clicks" from "single clicks." The difficulty is that "on-off-on" or "off-on-off ' activity may be erroneously detected, when in reality the switch is simply bouncing as a result of changing state once, from "on" to "off or from "off to "n." All switches will, to some extent, exhibit such behavior (called switch bounce). Accordingly, there is a need for an improved cursor control device that eliminates disadvantages associated with prior art devices generally and with the device described in the Taiwan application in particular. Summary of the Invention The present invention permits improved technology for cursor control devices. Certain embodiments of devices according to the present invention offer an improved edge detection system for use in a cursor control device, utilizing improved grating plates. Certain embodiments offer more reliable switch cycle detection in a cursor control device. One object of the present invention is to provide an improved cursor control device. Another object of the present invention is to provide an improved edge detection system for use in a cursor control device. Still another object of the present invention is to provide improved grating plates for use in a cursor control device. Yet another object of the present invention is to provide more reliable switch detection in a cursor control device. Other objects, advantages and features of the present invention will be apparent to those skilled in the art based on the following detailed description and the accompanying drawings. Brief Description of the Drawings FIG. 1 shows a non- functional grating as described in the Taiwan Application. FIG. 2 shows an improved grating according to the present invention. Detailed Description of Preferred Embodiment(s) In certain preferred embodiments of the present invention, a cursor control device has an optical position detection system that, in a conventional manner, is based on the use of optical gratings. The use of an inventive type of optical grating system to improve a cursor control device will be described herein. The use of optical gratings in general is well known in the art and will not be described in detail here. In accordance with the present invention, cursor control devices utilize the improved optical grating systems to permit an improved edge detection system, as described further herein. In addition, certain preferred embodiments of the present invention also utilize an improved switch debounce system. Such embodiments have fewer problems associated with detection of false cycles, as described further herein. Improved Grating Arrangement FIG. 1 shows a grating as described in Figure 3D of the Taiwan Application. FIG. 2 shows an improved, inventive grating that eliminates certain error condition which would occur if the grating shown in FIG. 1. were used. In both FIG. 1 and FIG. 2, the gratings are configured to have upper rows (rows 102 and 202, in FIGs. 1 and 2, respectively) and lower rows (rows 104 and 204, in FIGs. 1 and 2, respectively). In discussing FIGs. 1 and 2, the gratings are represented as (a,b) where a = 0 if the upper segment (or "square") is black (squares 106 and 206 in FIGs. 1 and 2, respectively) and a = 1 if the upper square is white (squares 108 and 208 in FIGs. 1 and 2, respectively). Similarly, b = 0 if the lower square is black and b = 1 if the lower square is white. For example, reading from left to right, the gratings shown in each figure start with the sequence: (0,0), (0.0), (0.0), (1,1), (0,1) (0,0), (1,0), (1,1). In normal sequencing of such gratings, adjacent columns differ by only one entry, a or b, as typified by the third through seventh entries of the previously specified sequence. If two changes are detected, such as (0,0) -> (1,1) or (0,1) -> (1,0), one knows that an error or unusual condition exists. The black and white squares described above are optically distinguishable and, therefore, conventional technology can be used to distinguish light coming from a black square and light coming from a white square. It will be apparent to those skilled in the art, based on the present disclosure, that embodiments of the present invention exist in which the squares, rather than being white and black, have another set of optically distinguishable characteristics such that the squares can represent two distinct logical states (e.g., "1" and "0"). It will also be apparent to those skilled in the art, based on the present disclosure, that embodiments exist in which the optical segments have a shape different from a square. The Taiwan Application asserts that the use of the grating shown in FIG. 1 will permit the unique detection of the minimum (left) edge, shown at 110, or the maximum (right) edge, shown at 112, by noting the unusual sequences (1,1) -> (0,0) at the minimum edge and (0,0) -> (1,1) at the maximum edge. This, of course, is simply not true. The sequence (1,1) -> (0,0) occurs both upon entering the minimum edge and upon leaving the maximum edge, as shown at points 116 and 114 in FIG. 1. Similarly, the sequence (0,0) -> (1,1) occurs on leaving the minimum edge as well as entering the maximum edge. In gratings according to the present invention, as shown in FIG. 2, this problem is eliminated. This improved grating arrangement will permit the unique detection of the minimum and maximum edges, shown at 210 and 212, respectively. As one can see from FIG. 2, the minimum edge is uniquely detected by the sequence (1,1) -> (0.0), upon entering the minimum edge at point 216, and the sequence (0,0) > (1,1), upon leaving the minimum edge at point 216. Also, the maximum edge is uniquely detected by the sequence (0,1) -> (1,0), upon entering the maximum edge at point 214, and the sequence (1,0) -> (0,1), upon leaving the maximum edge at point 214. Since these four unusual sequences are found nowhere else in the grating shown in FIG. 2, and there are only four unusual sequences, all such sequences have been accounted for and no error condition can exist. A modification of the program presented in Figure 8 of the Taiwan Application should suffice. For example, the following transition-to-action list may be used. TABLE 1 OLD NEW ACTION (a,b) (a,b) (on position counter) 0,0 0,0 NONE 0,0 0,1 DECREMENT 0,0 1,0 INCREMENT 0,0 1,1 SET TO ONE 0,1 0,0 INCREMENT 0,1 0,1 NONE 0 0,,11 1 1,,00 SET TO MAX 0,1 1,1 DECREMENT 1,0 0,0 DECREMENT 1,0 0,1 SET TO MAX-1 1,0 1,0 NONE 1 1,,00 1 1,,11 INCREMENT 1,1 0,0 SET TO ZERO 1,1 0,1 INCREMENT 1,1 1,0 DECREMENT 1,1 1,1 NONE Using Table 1, all possible transitions are accounted for and a unique action is specified. Thus, in this case, moving the puck to any corner will correctly initialize the counters. The decoding is performed based on the four bit code indicated in the above. Improved Switch Debounce Circuitry As noted above, most pointing devices employ switches, such as the switches operated (i.e., opened or closed) when a user "clicks on" a particular point on the display to select that point for further operations. Detection of switch motion by digital means, however, is often unreliable due to detection of false switching cycles. It is therefore important to eliminate this problem, that is the problem of detecting off- on-off or on-off-on activity when in reality the switch is simply bouncing as a result of changing state from one to off or off to on. All switches, to some extent, exhibit such behavior (called switch bounce). An electronic technique of feeding two signals from the switch (normally closed (NC) and normally opened (NO)) to an RS flip-flop is widely used for debouncing switches. This technique is quite reliable if the switch is a break before make switch, but also quite expensive. The desirable arrangement is to receive a single switch contact into the digital computer and process the switch signal digitally. This not only reduces the cost of the switch (since only a NC contact is required) but eliminates the RS flip-flop at the expense of a more complicated program. A switch will bounce from when it changes state for a period of time of 4 milliseconds to perhaps 50 milliseconds depending on the type of switch. During this period of time the switch signal will appear to cycle. According to conventional sampling theory, a bandlimited signal must be sampled at a rate at least twice the maximum frequency in the signal in order to be able to reconstruct the signal. A digital signal is usually conceptualized as a square wave, and therefore has a very wide frequency content. For digital signals, according to conventional sampling theory, the sample period (2/rate) must be less than the minimum state period in order to be able to reconstruct the signal. If the sampling period is too long, some short duration states will be lost or undetected. For reconstructing switch data, therefore, one ideally desires to sample at a slow enough rate so that the more or less high frequency switch bounce data is lost while the actual switch cycle data is retained. The challenge is to make sure that the sample rate is exactly slow, and fast, enough. A NO (normally open) switch is also generally required. In the present invention, the sampling period is made longer than the maximum switch bounce time for the particular switch used. This alone, however, does not guarantee that a particular switch state is sampled at least twice which is necessary if sampling theory is to be used correctly to eliminate the high frequency switch bounce noise. In order to ensure that a switch state is sampled twice in the present invention, a switch state is considered "valid" if two successive samples are the same. A switch is considered to have changed state if two successive "valid" switch samples differ. The concept of a "valid" switch sample forms the basis for this aspect of the present invention and ensures that a switch state is sampled twice. It is worth noting that a large amount of storage may be required if each switch is treated individually. It is not necessary, however, to create valid samples for each switch. It is only necessary to create valid samples of the switch ensemble. Even then, excessive storage may be required, since storage is needed to detect valid switch states as well as switch state changes. A method of consolidation of storage for use in a conventional switch debounce routine is set forth below as part of Subroutine !0; one byte is used to store valid switch data as well as previous state data. It is worth noting that the use of the particular property of the exclusive-or function is a novel feature as applied to switch conditioning in a pointing device. Subroutine 10 SWITCH PROCESSING - MAKES USE OF FACT A.EOR.B.EOR.A=B SWITCH VALUES ARE RETAINED AS NIBS (4 BITS) CONSISTING ;OF LS,RS,CS,O. CSW HOLDS 2 NIBS OSW (MSN) THE CURRENTLY ACCEPTED VALUE OF THE SWITCHES AND LSW (LSN) THE LAST SAMPLED VALUE OF THE SWITCHES. GTSW1 BSF FLG.F5 ;PREVENT XMIT BTFSC SCT.7 ;TIME TO SAMPLE? (20MS) RETLW OH ;NO - EXIT MOVLW -.24&OFFH ;24 XMIT CYCLES MMOVWF SCT ; RESET TIMER BCF FLG,F5 ;AND ALLOW XMIT ;NOW GET SWITCHES MOVF PTC.O ;W{3,2,1 } :LS-,RS-,CS- XORLW 00EH ;W{3,2,1 } :LS,RS,CS (TRASH +NSW) XORWF CSW.O ANDLW 00EH ;W{3,2,1,0} :NSW.EOR.LSW BTFSC ST,Z ;NSW=LSW? GOTO GTSW2 ;YES - VALID SWITCHES XORWF CSW. l ;CSW:OWS:NSW (=NSW.EOR.LSW.EOR.LSW) RETLW OH :AND EXIT ;ENTER HERE WITH LSW = NSW VALID DEBOUNCED SWITCHES GTSW2 SWAPF CSW,0 ;GET NSW TO OSW POSITION XORWF CSW.O ;CHANGE IN POSITION ANDLW 0E0H ;W {7,6,5 } :OSW.EOR.NSW BTFSC ST,Z RETLW Oh ;NO XORWF CSW.1 ;0SW:NSW PRESERVE CSW {4,3,2,1,0} BSF FLG.F4 ;LNDICATE A CHANGE RETLW Oh ;AND EXIT The present invention has been described in connection with certain preferred embodiments for illustrative purposes only. The invention is not limited to the described embodiments and shall be defined solely by the claims. Endnote 1 MECHANICAL OPTICAL TYPE ABSOLUTE COORDINATE CURSOR CONTROL DEVICE Translation of Taiwanese Utility Model Patent Publication No. 283506 The present invention relates to a computer data entry device, and more particularly to a cursor positioning control device for carrying out the control of two dimensional cursor positions on a computer display. In conventional techniques for controlling a cursor of a computer display, devices including keyboards, mice, track balls, touch-control screens, light pens, etc. are commonly used, by which devices the cursor movement on the display screen is controlled and the selected function of the computer program is carried out. However, inconveniences frequently arise when conventional control devices are used to carry out the movement and the positioning of a cursor. For example, when conventional cursor control keys of a keyboard are used, the moving efficiency of the cursor is extremely low. When a conventional mouse is used, it is necessary to move the mouse back and forth and therefore extend the arm with the movement of the mouse. In addition, since the relative position of the mouse is detected by a rolling ball and an encoding wheel provided at the bottom thereof, it is unavoidable that the performance of the devices is degraded after a long lapse of time. In order to overcome the aforementioned drawbacks of conventional devices, absolute coordinate type positioning devices are proposed, such as those disclosed in U.S. Permit Nos. 4,782,327 and 4,935,728. However, the structural designs disclosed in these two prior art patents are rather complicated and require complicated circuit interfaces in order to achieve the purpose of cursor control. An object of the present invention is therefore to provide an absolute coordinate type control device for the movement of a cursor on a computer display screen and for the control of the display screen cursor by an operating manner of absolute coordinate movements. Another object of the present invention is to provide a mechanical optical type absolute coordinate cursor control device comprising constituting elements such as grating plate means, photoelectric assemblies, a movable plate and a sliding handle to achieve the purpose of cursor control, wherein the grating plate means are arranged within a box body in X axis and Y axis directions, and each of the photoelectric assemblies includes a light emitting diode, phototransistors and a support bracket, so that a series of action signals are generated by the phototransistors of the photoelectric assembly according to a relative motion between the grating plate means and the photoelectric assembly and transmitted into the computer through a data transmitting interface for controlling the two dimensional cursor movement on the display screen. Further, the present invention is characterized by using an upper and a lower rows of grating plates with a displacement of a 90-degree phase difference between two rows. Thus, during the production process, the focus alignment of the light emitting diode and the two phototransistors is very easy. Also, minimum (min) and maximum (max) values at two end boundaries can be directly determined from the arrangement of the movable grating plates, and hence the circuit is simplified. When the operation is started, an initial point can be readily found at one of the four corners. Other objects and characteristics of the present invention can be further understood from the following description of embodiments in conjunction with accompanying drawings. Brief description of drawings Figure 1 is a schematic view showing the connection of a positioning device according to the present invention to a computer system; Figure 2 is an exploded perspective view showing a first embodiment of the present invention; Figure 3 A is a view showing a grating plate structure according to the present invention; Figure 3B is a view showing an arrangement of a light emitting diode and phototransistors in associated with the grating plate of Figure 3 A; Figure 3C is a schematic view showing an arrangement between the grating plate of Figure 3 A and the light emitting diode and phototransistors of Figure 3B; Figure 3D shows a series of signals produced according to the grating plate of Figure 3A; Figure 3E shows a signal state produced from the signals of Figure 3D; Figure 4 is an exploded perspective view showing a second embodiment of the present application; Figure 5 is an exploded perspective view showing a third embodiment of the present invention; Figure 5 A is a perspective view showing a sliding handle according to the present invention; Figure 5B is a bottom perspective view of the sliding handle of the present invention; Figure 5 C is an exploded perspective view showing a second photoelectric assembly according to the present invention; Figure 5D is a rear perspective view showing a movable column according to the present invention; Figure 5E is a front view of the movable column of the present invention; Figure 5F is a rear view of the movable column of the present invention; Figure 5G is a right side view of the movable column of the present invention; Figure 5H is a left side view of the movable column of the present application; Figure 6A is an exploded perspective view showing a fourth embodiment according to the present application; Figure 6B is a perspective view showing the assembled fourth embodiment according to the present invention; Figure 7 is a diagram showing a control circuit according to the present invention; and Figure 8A-8D shows control flowcharts according to the present application. Explanation of reference materials 1 positioning device 41 first photoelectric assembly 10 concave box body 42 second photoelectric assembly 11 transverse plate 411 light emitting diode 12 transverse plate 412 phototransistor 13 recess 51 first grating plate 2 computer 52 second grating plate 20 movable plate 56 first fixed grating plate 0' movable plate 57 second fixed grating plate 1 guiding groove 6 circuit base plate 1 * guiding groove 61 AB phase detecting circuit for X axis 2 recess 62 AB phase detecting circuit for Y axis 211 direction 63 input button 23 auxiliary groove 64 main control circuit 3 sliding handle 65 stable voltage circuit 31 press switch 66 signal output circuit 32 fixed plate 71 control key 33 movable column 72 control key 311 direction First, as shown in Figure 1 , a positioning device 1 according to the present invention is connected to a computer 2 via a cable. The conventional computer comprises a display and a keyboard for data entry. The positioning device 1 is provided thereon with a sliding handle 3, and positions of a cursor on the display of the computer 2 can be controlled by means of the sliding handle 3 operated in a two dimensional moving manner. Figure 2 is an exploded perspective view showing a first embodiment according to the present invention. The embodiment mainly comprises a concave box body 10, a movable plate 20, a sliding handle 3, a first photoelectric assembly 41, a second photoelectric assembly 42, a first grating plate 51 , a second grating plate 52, a first fixed grating plate 56 and a second fixed grating plate 57. The interior of the concave box body 10 is provided as a space for accommodating respective members and for related members to slide therein. In the first photoelectric assembly 41, a light emitting diode 411 is positioned at a lower location and two phototransistors 412 facing downwards are positioned at an upper location with the first fixed grating plate 56 interposed therebetween. Similarly, in the second photoelectric assembly 42, a light emitting diode and two phototransistors are provided with the second fixed grating plate 57 interposed therebetween. A side wall of the concave box body 10 is formed with a pair of transverse plates 11, 12, and a recess 13 is formed in the middle section of the pair of transverse plates. A circuit base plate 6 is also accommodated within the concave box body 10. A conventional data transmission circuit (for example, a conventional RS232 (interface) may be laid on the circuit base plan to enable the data transmission between the positioning device according to the present invention and the computer. In addition, control keys 71, 72 may be provided on the box body to carry out a function similar to that of control keys of a computer mouse. The first photoelectric assembly 41 is inserted into the recess 13 of the pair of transverse plates of the concave box body 10 for detecting a moving condition in the X axis direction. The movable plate 20 can be caused to slide between the pair of transverse plates 11, 12 of the concave box body 10 in directions indicated by arrows 211, and a moving condition thereof during the sliding can be detected by the first photoelectric assembly 41 disposed in the recess 13 of the concave box body 10. In addition, the movable plate 20 has an elongated bar-shaped guiding groove 21 thereon and a recess 22 provided on one side of the middle section of the guiding groove 21 for the insertion of the second photoelectric assembly 42 and the second fixed grating plate. The second photoelectric assembly 42 is used for the detection of a moving condition in the Y axis direction. Two grating plates are included according to the present invention. The first grating plate 52 is provided on one side of the movable plate 20. When the movable plate 20 is caused to slide, due to a relative movement produced between the first grating plate 51 and the first photoelectric assembly 41, the moving condition thereof can be detected by the first photoelectric assembly 41, whereby a series of pulse signals are produced by the phototransistors of the first photoelectric assembly 41. The second grating plate 52 is capable of sliding within the elongated bar- shaped guiding groove 21 of the movable plate 20 in a direction indicated by arrows 311, and the moving condition thereof can be detected by the second photoelectric assembly 42 so as to produce a series of pulse signals. In order to enable a convenient operation for a user, according to the present invention, a sliding handle 3 is provided to facilitate the gripping control by the user's hand. In this embodiment, the sliding handle 3 is of a structure formed on the second grating plate 52 and suitable for the gripping control of the user, in order to control the moving operations of the second grating plate 52 and the movable plate 20 in the directions indicated by arrows 311 and 211, respectively. The sliding handle 3 has at the bottom thereof a press switch 31 fixed by a fixed plate 32 to provide the function of the "enter" key on a keyboard. The first photoelectric assembly 41 comprises a U-shaped support bracket, a light emitting diode 411, two phototransistors 412 and a first fixed grating plate 56 which can be directly attached onto the light emitting diode, in which the light emitting diode and one of the phototransistors are correspondingly inserted in two legs of the U-shaped support bracket, respectively, with the phototransistors being above the light emitting diode, and the grating plate is provided in associated with the U-shaped support bracket. Thus, when the grating plate is caused to pass through the U-shaped support bracket, the moving condition of the grating plate is detected by receiving or blocking the light between the light emitting diode and the phototransistor. In the embodiment of the present invention, the light emitting diode can be replaced by a laser diode, and in such a case, the fixed grating plate is not necessary. In this embodiment, the two grating plates are provided on a same plane and at a same level so that the thickness of the movable structure can be reduced to a minimum. Also, since the light emitting diode and the phototransistor are disposed in parallel to the bottom, the package thickness can be reduced without affecting the light receiving area of the phototransistor. In addition, the two grating plates are moved on a same plane and thus the moving space thereof can be made as thin as possible to enable the installation thereof on a notebook type computer, resulting in smaller products when compared with those obtained from the aforementioned U.S. patents. The positions of the two photoelectric assemblies are fixed, while the two grating plates are movable. The first and second grating plates have light shielding and light transmitting functions. For this purpose, a conventional structure of optically encoded light transmitting slots or obtained by a printing manner can be employed. In the present invention, the printing manner is preferred. In order to detect the moving direction, the grating plate 51 (the first grating plate is used for illustration) is provided thereon with upper and lower rows of light shielding and light transmitting sections, as shown in Figure 3A, and the upper and the lower rows of light shielding and light transmitting sections are the same in width with a 90-degree phase difference. The fixed grating plate 56 is formed by a printed thin transparent plate having a thickness which is about 1/6 of that of the phototransistor and provided with light shielding and light emitting sections which are the same in width and correspond to those of the movable grating plate 51 to facilitate the parallel traveling of light. The relative relation between the light emitting diode and the phototransistors (i.e., the first photoelectric assembly) arranged in associated with the grating plate structure is shown in Figures 3B and 3C. Thus, when the grating plate and the photoelectric assembly are moved relative to each other, corresponding series of signals XA, XB as shown in Figure 3D are produced from light transmitting and light shielding signals generated by the grating plate as shown in Figure 3 A with a light emitted from the light emitting diode and passing through an aligning grating plate, whereby whether the movement is in the left or right direction can be detected based on the binary data and boundary values can be produced. After the XA and XB signals are received by the computer, the moving directions X+, X- can be determined by referring to the state diagram shown in Figure 3E based on the binary values of the signals. Then, flag signals of Xmax and Xmin are obtained based on the X+, X- signals and stored in a register to be read by a control program. Figure 4 is an exploded perspective view showing a second embodiment of the present invention. In this embodiment, the arrangement of the major structure is the same as that of the first embodiment, and hence similar members are indicated by same reference numerals. The structure design of this embodiment is different from that of the first embodiment in that a second grating plate 52 is provided adjacent a guiding groove 21 of a movable plate 20, while a second photoelectric assembly 42 is slidably provided in the guiding grove 21. Thus, when the second photoelectric assembly 42 is caused to slide, the moving condition thereof can be detected by means of a light emitting diode and phototransistors in associated with the provision of the second grating plate 52. In addition, in order to stabilize the sliding of the second photoelectric assembly 42, an auxiliary groove 23 is additionally provided behind the guiding grove 21 of the movable plate 20, and an auxiliary guide rail structure is provided at the rear and of a support bracket of the second photoelectric assembly 42 corresponding to the auxiliary grove 23 to facilitate the sliding. Due to the sliding of the second photoelectric assembly, the moving stroke is shortened by 1/2. Figures 5 and 5 A to 5H are exploded perspective views showing a third embodiment of the present invention. In this embodiment, a first grating plate 51 is formed on an inner side wall of a concave box body 10. A movable plate 20 can be caused to slide between two side walls of the concave box body 10 in directions indicated by arrows 211. A first photoelectric assembly 41 is fixedly provided at a side end of the movable plate 20, and when the movable plate 20 is mounted onto the concave box body 10, the first photoelectric assembly 41 is located at a position corresponding to that of the first grating plate 51, so that the moving condition of the movable plate 20 can be detected by the first photoelectric assembly 41 during the sliding thereof to produce a series of pulse signals. In addition, the movable plate 20 is formed with an elongated bar-shaped guiding grove 21 and a second grating plate 52 on the surface of the movable plate 20 adjacent the guiding grove 21. When the second photoelectric assembly 42 is caused to slide relative to and on the second grating plate 52, the moving condition of the second photoelectric assembly 42 can be detected so that a series of pulse signals are generated therefrom and transmitted to a computer. In this embodiment, a sliding handle 3 is used to directly control the movement of the second photoelectric assembly 42. In this embodiment, since the two grating plates are provided on a same plane and at a same level, and the photoelectric assemblies can be moved on a same plane and at a same level, the mechanism area is 1/4 of that of the aforementioned U.S. patents, thereby achieving a maximum resolution under a minimum thickness. Figure 6A is an exploded perspective view showing a fourth embodiment of the present invention, and Figure 6B is a perspective view showing the assembled fourth embodiment of the present invention. In this embodiment, a first grating plate 51 is formed on an inner side wall of a concave box body 10, while a second grating plate 52 is formed on another side wall perpendicular to the aforementioned side wall. A first movable plate 20 can be caused to slide between two side walls of the concave box body 10 in directions indicated by arrows 211. A first photoelectric assembly 41 is fixedly provided at a side end of the first movable plate 20, and when the first movable plate 20 is mounted onto the concave box body 10, the first photoelectric assembly 41 is located at a position corresponding to that of the first grating plate 51, so that the moving condition of the first movable plate 20 can be detected by the first photoelectric assembly 41 during the sliding thereof to produce a series of pulse signals. In a direction perpendicular to the movable plate 20, a second movable plate 20' can be caused to slide between two side walls of the concave box body 10 in directions indicated by arrows 311. A second photoelectric assembly 42 is fixedly provided at a side end of the second movable plate 20*, and when the second movable plate 20' is mounted onto the concave box body 10, the second photoelectric assembly 42 is located at a position corresponding to that of the second grating plate 52, so that the moving condition of the second movable plate 20* can be detected by the second photoelectric assembly 42 during the sliding thereof to produce a series of pulse signals. Elongated bar-shaped guiding grove 21, 21' are formed on the first movable plate 20 and the second movable plate 20', respectively. In this embodiment, the movements of the first movable plate 20 and the second movable plate 20' in the X axis and Y axis directions, respectively, combined by a movable column 33 are controlled by a sliding handle 3. Hence, it is very advantageous in the arrangement of the entire space because the two grating plates are fixed and the two photoelectric assemblies are movable in this embodiment, which arrangement requires only 1/4 of the space required by the aforementioned U.S. patents. In addition, according to the technique of the present invention, positioning is possible at any one of the four corner positions, thereby eliminating the requirement of positioning at all four corner positions according to the U.S. Patent No. 4,935,728. Figure 7 is a diagram showing a control circuit of the present invention. The control circuit mainly comprises: - an AB phase detecting circuit for X axis 61 for detecting the moving state of the grating plate in the X axis by the photoelectric assembly composed of the light emitting diode and the phototransistors; - an AB phase detecting circuit for Y axis 62 for detecting the moving state of the grating plate in the Y axis by the photoelectric assembly composed of the light emitting diode and the phototransistors; - an input button 63 including three button elements; - a main control circuit 64 for performing the transformation of the control for signals; - a stable voltage circuit 65 for providing a working power supply required by this main control circuit and other components; and - a signal output circuit 66 for transmitting signals of the main control circuit in the standard RS232 signal form to RS232 interface. Figures 8 A to 8C are control flowcharts according to the present invention, and Figure 8D is a timer interrupt subroutine. The control flowcharts shown in Figures 8A to 8C are started with setting the RS232 transmitting speed, the initial bit, the ending bit and the length, zeroing the working area and clearing all the flags and registers. Then, XA, XB, YA and YB are read, and values of X+ direction, X- direction, Xmax, Xmin, Y+ direction, Y- direction, Ymax and Ymin are found from a comparison state table (simultaneously referring to the state diagram shown in the Figure 3). These values are stored for comparison, and after values of XA, XB, YA and YB are read again, a comparison is made to determine whether the present state is equal to the previous state. If the result is positive, then the process is returned to read XA, XB, YA and YB again. If it is negative, then the determination of the X axis mode (the X axis mode as indicated by the broken line) is first carried out, during which determination the previous state is compared with possible states including (0, 0), (1, 1), (1, 0) and (0, 1). After the determination of the X axis mode is completed, the determination of the Y axis mode is carried out (with a process flow similar to that for the X axis mode). In the timer interrupt subroutine shown in Figure 8D, an interrupt signal is generated 10 times per second after the Xmax or Xmin is read directly from the movable grating plate by the computer and then the Y axis mode is determined. The above description is merely made by referring to preferred embodiments of the present invention, and various modifications and changes thereof are within the scope of the spirit of the present invention and the appended claims.

Claims: CLAIMS 1. An optical grating for use in a cursor control device, comprising: a first row having two or more types of optical segments, wherein a first type of optical segment represents a first logical state and a second type of optical segment represents a second logical state; a second row of optical segments, the second row having optical segments of the first type and optical segments of the second type, wherein the first row and the second row are approximately equal in length, and wherein the second row is disposed adjacent to the first row such that a first end of the first row is adjacent to a first end of the second row and a second end of the first row is adjacent to a second end of the second row; wherein the optical segments at the first ends of the first and second rows are both of the first type, and further wherein the optical segments at the second ends of the first and second rows are, respectively, of the second and first types. 2. The optical grating of Claim 1, wherein the segments are squares. 3. The optical grating of Claim 1 , wherein the first type of segment is black and the second type of segment is white. 4. An mechanical-optical cursor control device employing an optical grating to determine the position of a cursor, wherein the optical grating comprises: a first row having two or more types of optical segments, wherein a first type of optical segment represents a first logical state and a second type of optical segment represents a second logical state; a second row of optical segments, the second row having optical segments of the first type and optical segments of the second type, wherein the first row and the second row are approximately equal in length, and wherein the second row is disposed adjacent to the first row such that a first end of the first row is adjacent to a first end of the second row and a second end of the first row is adjacent to a second end of the second row; wherein the optical segments at the first ends of the first and second rows are both of the first type, and further wherein the optical segments at the second ends of the first and second rows are, respectively, of the second and first types. 5. The cursor control device of Claim 4, wherein the segments are squares. 6. The cursor control device of Claim 4, wherein the first type of segment is black and the second type of segment is white. 7. A cursor control device, comprising: a cursor positioning system for positioning a cursor on a computer screen; and a switch for selecting the current position of the cursor for further operations, the state of the switch being sampled periodically, wherein the sampling period is longer than the maximum bounce time for the switch, and further wherein each detected switch state is sampled at least twice and a switch state is considered "valid" only if two successive samples are the same. 8. The cursor control device of Claim 7, wherein the switch is considered to have changed state if two successive "valid" switch samples differ.

Applicants: JACKSON ROBERT E, JACKSON, ROBERT, E.
Application year: 1998
Main classification: G06K11
IPC codes: G06F3