Embodiment
Please refer to " Fig. 2 ", the coding of single frequency wireless peripherals host-host protocol of the present invention and the system of identification.Single-frequency formula of the present invention system has comprised first data transfer unit 40, second data transfer unit 50 and Data Receiving unit 60.First data transfer unit 40 and second data transfer unit 50 have a wireless transmitter module 401 and 501 respectively, these two modules are identical module on framework, can be radio frequency (RF) or infrared ray (IR) transmitter module, 60 of the carrier frequency F30 Data Receiving unit that its employed together is identical have a wireless receiving module 601, and it needs to receive single carrier frequency F3 and gets final product.So system of the present invention can realize simplicity of design, no matter only need use single-frequency can reach the purpose of wireless transmission at transmitting terminal or receiving end.
Then, below will introduce the present invention and in fact how reach single-frequency and can allow two kinds of different radio peripheral apparatus utilization same frequencys, that is, the coding of host-host protocol of the present invention and recognition methods.
At first, because the utilization single-frequency, so, modulation technique adopts amplitude shift keying modulation (Amplitude, Shift keying Modulation is hereinafter to be referred as the ASK modulation), the characteristic of ASK modulation is, with the single-frequency running, and can comply with the length modulated pulsewidth of required bit 1.Shown in " Fig. 3 ", digital signal x originally (t) becomes signal SASK (t) after making through ASK week, it is the part of Tb that the part of bit 1 becomes the middle pulsewidth of SASK (t), the part of bit 11 then becomes the part of twice Tb, and bit is 0 part, then not output, thereby the present invention can reach the effect of province's power in the part of wireless module.
Secondly, do the clock division of peripherals (as first data transfer unit 40 in " Fig. 2 " and second data transfer unit 50) again according to the mode of TDM, details are as follows:
Please refer to " Fig. 4 ", the time length of now setting the packet of first data transmission unit is the B time, wherein, T1 is each required consumed time of a secondary data that transmits, in order not allow the transmission data make mistakes and to guarantee complete being received of bag (packet) energy, therefore, every transmission one secondary data all repeats to transmit packet one time, and each interval of asking that repeats is T2; The time of the packet of second data transmission unit is long to be the A time, and transmitting a spent time of packet is T3, transmits twice equally, and be T4 its interval time.
But,, then must transmit bag in regular turn if will meet two demands that different bags can transmit simultaneously that allow, that is, need with the TDM time division.From first data transfer unit, repeat to transmit the interval T 2 of bag and must can hold the A time, that is T2 〉=A (formula 1) is shown in " Fig. 5 ".Simultaneously, first data transfer unit is the time T 1 of transfer data packets each time, and it transmits remaining time of bag, the A time that must be able to hold the packet of double transmission second data transfer unit continuously twice, that is, T1-(T2+2B) 〉=T4+2A (formula 2).
From second data transfer unit, the T4 constantly that at every turn repeats transfer data packets then arranges to hold the size of the whole first data transfer unit packet, that is T4 〉=T2+2B (formula 3) is shown in " Fig. 6 ".Simultaneously, the time T 3 of transfer data packets each time, it transmits the remaining time of bag continuously twice, the packet that must be able to hold continuously whole first data transfer unit, that is, bag time of twice transmission, first data transfer unit repeated, that is, T3-(T4+2A) 〉=T2+2B (formula 4).
Comprehensive above result can get T1 〉=4 (A+B) (formula 5), and T3 〉=4 (A+B) (formula 6) from formula 1-4.So indivedual required delivery times of first data transfer unit and second data transfer unit, four times that are more than or equal to packet time long institute addition separately get final product.So,, can draw that to transmit the required time of a secondary data long as long as set the time span of different pieces of information bag.
So design, its effect can be seen at receiving end, please refer to " Fig. 7 ".If first data transfer unit and second data transfer unit transmit data simultaneously, then situation will be shown in " Fig. 7 ", the bag data that the Data Receiving unit is received, because the bag data generation data collision that transmitted by first data transfer unit and second data transfer unit first time, so these data will be beyond recognition in the Data Receiving unit.But, wrap owing to the present invention transmits once in first data transfer unit T2 interval time (T2 〉=A), similarly, transmit once bag (T4 〉=B) in second data cell T4 interval time, so after first bag (as B) and another bag (as A) were overlapping, the bag (B ') and the bag (A ') of another repetition that second repetition can not take place were overlapping again, so the Data Receiving unit still can intactly receive second bag that repeats to transmit (B ' with A ').
In fact, because the design that twice duplicate packages of this kind transmits, allow two kinds of different data that data transfer unit transmitted, no matter transmission data at any time, no matter have or not the overlapping situation of data takes place, the Data Receiving unit can intactly receive two kinds of different bag data.So by the time division of this kind TDM, the present invention only need design with 7 cover receiving equipments at receiving end and get final product, that is, as long as the content of bag can be recognized in the Data Receiving unit.
The invention solves the time allocation problem that bag transmits, then, below will introduce the technology that in fact the present invention handles two kinds of different peripherals, that is, the design of bag content, the present invention will be a specific embodiment with wireless mouse and Wireless Keyboard.Because mouse is different with the data content that keyboard is transmitted, so the bag size of design is also different, aforesaid A and B, its time size is possible different, below will state it respectively.
From the bag data structure of mouse, please refer to " Figure 12 " earlier, the data of mouse account for five bytes (Byte), and each byte has 8 bits (bit) data, and the field data detailed description of each byte is as follows:
Byte 1 is bag order (packet command), and it has comprised:
Component type (device type): in order to the type of identification data transfer unit, for example mouse is 10;
Sequence number (Sequence number): receive the sequence number of bag in order to recognize each, for example, the packet number of repetition is the same, as 0 and 0, or 1 and 1; And contiguous two different bags, sequence number is then different, is 0 as the sequence number of a bag, its two contiguous different Bao Zewei 1 then, and vice versa.
Low electric weight (Battery Low): the battery status of data transfer unit, be normal condition as establishing 0,1 is low state of charge.
Set (Set): the indication of identification code transmission state, can establish 0 and be general transmission state, 1 is the state of identification code assignment procedure.
M: be middle mouse button (Middle Button) state, establish 1 and push for middle key.
R: be right mouse button (Right Button) state, establish 1 and push for right button.
L: be left mouse button (Left Button) state, establish 1 and push for left button.
Byte 2 is the exercise data of mouse directions X, as then representing with 2 complement (complement) form for negative direction.As " setting " (Set) bit be 1, then be that (Identity, ID), the part of this identification code will be introduced after a while for the identification code of element.
Byte 3 is the exercise data of mouse Y direction, as is the rabbit direction, then represents with 2 complement (complement) form.
Byte 4 is a mouse command, has comprised the part of other related commands of mouse:
Sign (signed) bit of YS:X direction motion.
Sign (signed) bit of XS:Y direction motion.
Z0-Z3: be the motion of the direction of mouse.
B5: be mouse the 5th key (5th Button) state, 1 is that the 5th key is pushed.
B4: be mouse quadruple linkage (4th Button) state, 1 is that quadruple linkage is pushed.
Whether byte 5 is check code (Checksum), wrong in order to check (detect) bag.
Then, see the bag data structure of keyboard again, please refer to " Figure 13 ", the data of keyboard account for three bytes (Byte), and each byte has 8 bits (bit) data, and the field data detailed description of each byte is as follows:
Byte 1 is bag order (packet command), and it has comprised:
Component type (device type):, be 01 as keyboard in order to the type of identification data transfer unit;
Sequence number (Sequence number): receive the sequence number of bag in order to recognize each, for example, the packet number of repetition is the same, as 0 and 0, or 1 and 1; And contiguous two different bags, sequence number is then different, is 0 as the sequence number of a bag, its two contiguous different Bao Zewei 1 then, and vice versa.
Low electric weight (Battery Low): the battery status of data transfer unit, be normal condition as establishing 0,1 is low state of charge.
Set (Set): the indication of channel transfer state, can establish 0 and be general transmission state, 1 is the state of identification code assignment procedure.
M/B: represent the index that this key is knocked or removes, the M table is set up sign indicating number, and B shows interruption code.
End: the indication of the index of keyboard state, can establish 0 for still having at least one key to be operated, 1 all decontrols for all buttons, that is, be not operated.
Byte 2 is keypad code (Key Number), the keyboard-coding on the output keyboard.If " setting " bit is 1, then this byte be element identification code (Identity, ID).
Whether byte 3 is check code (Checksum), wrong in order to check (detect) bag.
Then, promptly must define the beginning of each bag and the coding of end code and each bit, please refer to " Fig. 8 A-8E ".Emphasize that once more in the above-mentioned specific embodiment, mouse has accounted for the data volume of 40 bits, and keyboard has accounted for the data volume of 24 bits.In real the work, the transfer rate (report rate) of mouse (as the PS/2 of standard) and keyboard is approximately more than or equal to per second 40 times, that is per second can transmit the data of 40 bags, so each bag transmissible time of data is in 25 milliseconds (ms).Except that this restriction, also must add T1 〉=4 (A+B) (formula 5), with the restriction of T3 〉=4 (A+B) (formula 6), that is wrap the delivery time at every turn must be more than or equal to mouse and the time addition of keyboard bag four times.Under this restriction, can do following time set, the whole bag delivery time is located at 24 milliseconds:
Bit " 0 " is the noble potential of 30 microseconds (μ s) and the zero potential of 30 microseconds (μ s), shown in " Fig. 8 A ".
Bit " 1 " is the noble potential of 40 microseconds (μ s) and the zero potential of 40 microseconds (μ s), shown in " Fig. 8 B ".
Unwrapping the beginning is the noble potential of 55 microseconds (μ s) and the zero potential of 55 microseconds (μ s), shown in " Fig. 8 C ".
End-of-packet is the noble potential of 70 microseconds (μ s) and the zero potential of 70 microseconds (μ s), shown in " Fig. 8 D ".
So, to distinguish by such bit, whole pack arrangement is shown in " Fig. 8 E ", data and end from beginning to wrapping, these can the ASK modulation system be reached, and do not have the wrong problem of bit identification; In addition, wireless module can adopt radio frequency (RF) or infrared ray (IR) module.So mouse and the keyboard bag time span under the design can be limited within 6 milliseconds, can meet above-mentioned transmission restriction.
Oneself roughly defines above-mentioned bag content and finishes, and next, will introduce bag data structure of the present invention in more detail, please refer to " Fig. 9 ", the bag schematic diagram data that mouse transmits.Each byte has comprised 8 bits since the present invention to set bit " 0 " different with the time span of bit " 1 ", so the data content of each byte is between 480-320 microsecond (μ s).And the bag data structure length of mouse is about 3.5 milliseconds (ms), and the packet length that mouse is sent is about 24ms.
Please refer to " Figure 10 ", the bag schematic diagram data of keyboard receive.Each byte has comprised 8 bits since the present invention to set bit " 0 " different with the time span of bit " 1 ", so, the data content of each byte about the 480-320 microsecond (μ s〉between.And the bag data structure length of keyboard is about 2.5 milliseconds (ms), and the packet length that keyboard is sent is about 24ms.
After the definition of bag is finished, still have a part to wait to define, that is the present invention is a wireless transmission protocol, so, when vicinity has identical product, the function that can discern mutually must be arranged.The present invention promptly reaches this purpose by the setting of identification code.
Please refer to " Figure 11 ", the present invention increases the coding of single frequency wireless peripherals host-host protocol of ID identification and the system of identification, please refer to comparison " Fig. 2 ".On first data transfer unit 40, second data transfer unit 50 and Data Receiving unit 60, increased an identification key (ID Key) 402,502 and 602 respectively, these identification keys are in order to set each self-corresponding data transfer unit and Data Receiving unit, and its content will give record in the middle of packet.
The button program of identification key can be set at the identification key 402 and 502 of pressing first data transfer unit 40 and second data transfer unit 50 earlier, presses the identification key 602 of Data Receiving unit 60 again, can set new identification code.
Please turn one's head with reference to " Figure 12 " and " Figure 13 ", during setting, in the packet of mouse and keyboard (that is, first data transfer unit 40 and second data transfer unit 50), " setting " bit of first byte is " 1 ", at this moment, the data content that mouse is sent is shown in " Figure 14 ", and is identical with " Figure 12 ", and the data of mouse account for five bytes (Byte), each byte has 8 bits (bit) data, and details are as follows for the data content of each byte:
Byte 1 is bag order (packet command), it has comprised: component type (device type), sequence number (Sequence number), low electric weight (Battery Low) are identical with " Figure 12 " with the data content of setting bits such as (Set), repeat no more.
(count down) reciprocal: comprised three bits, since 7 inverses, bag of every transmission promptly subtracts 1, is 0 up to reciprocal value, represents that then later bag all transmits information with new identification code.
Byte 2 changes to the identification code of element this moment, and (Identity ID), and produces in mode at random.
Byte 3 is check code (Checksum).
Byte 4 is 2 a complement of check code, can not make mistakes in order to guarantee this bag content.
Byte 5 is similarly check code (Checksum).
The data content that keyboard is sent is shown in " Figure 15 ", and is identical with " Fig. 2 ", and the data of keyboard account for three bytes (Byte), and each byte has 8 bits (bit) data, and details are as follows for the data content of each byte:
Byte 1 is bag order (packet command), it has comprised: component type (device type), sequence number (Sequence number), low electric weight (Battery Low) are identical with " Figure 13 " with the data content of setting bits such as (Set), repeat no more.
(count down) reciprocal: comprised three bits, since 7 inverses, bag of every transmission promptly subtracts 1, is 0 up to reciprocal value, represents that then later bag is all by new channel transfer information.
Byte 2 change to the new identification code of element (Identity, ID).
Byte 3 is check code (Checksum).