Summary of the invention
Embodiment of the invention technical matters to be solved is to provide a kind of portable terminal, can reduce the cost of portable terminal rotation identification.
For solving the problems of the technologies described above, the embodiment of the invention adopts following technical scheme:
A kind of portable terminal comprises:
The light control module is used for when the rotation portable terminal, making irradiate light or leaving photodiode, and said photodiode is located in the mobile terminal circuit, is used for converting light signal into level signal;
Level detection unit, whether the level that is used to detect on the said photodiode changes;
Output unit, when being used for level on photodiode and changing, the output trigger pip, said trigger pip representes that rotation has taken place portable terminal.
The portable terminal that the embodiment of the invention provides; Because said light control module can make irradiate light or leave photodiode when the rotation portable terminal; And photodiode can convert light signal into level signal; When detecting level on the said photodiode and change through said level detection unit; Just show irradiate light or left said photodiode that therefore just can confirm that rotation has taken place portable terminal through the trigger pip of said output unit output, this has replaced the identification of using traditional expensive accelerometer to realize the portable terminal rotation; Reduced the cost of portable terminal rotation identification, helped in the low and middle-end portable terminal of cost requirement strictness, using.
The embodiment of the invention another technical matters to be solved is to provide a kind of method of portable terminal rotation identification, can reduce the cost of portable terminal rotation identification.
For solving the problems of the technologies described above, the embodiment of the invention adopts following technical scheme:
A kind of method of portable terminal rotation identification comprises:
The rotation portable terminal makes irradiate light or leaves photodiode through the light control module, and said photodiode is located in the mobile terminal circuit, is used for converting light signal into level signal;
Whether the level that level detection unit detects on the said photodiode changes;
When the level of output unit on photodiode changes, the output trigger pip, said trigger pip representes that rotation has taken place portable terminal.
The method of the portable terminal rotation identification that the embodiment of the invention provides; Because said light control module can make irradiate light or leave photodiode when the rotation portable terminal; And photodiode can convert light signal into level signal; When detecting level on the said photodiode and change through said level detection unit; Just show irradiate light or left said photodiode that therefore just can confirm that rotation has taken place portable terminal through the trigger pip of said output unit output, this has replaced the identification of using traditional expensive accelerometer to realize the portable terminal rotation; Reduced the cost of portable terminal rotation identification, helped in the low and middle-end portable terminal of cost requirement strictness, using.
Embodiment
The purpose of the embodiment of the invention is to provide the method for a kind of portable terminal and portable terminal rotation identification, can reduce the cost of portable terminal rotation identification.Below in conjunction with accompanying drawing the embodiment of the invention is described in detail.
Should be clear and definite, described embodiment only is a part of embodiment of the present invention, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, the scope that all belongs to the present invention and protected.
As shown in Figure 6, the portable terminal in the embodiment of the invention comprises:
Light control module 61 is used for when the rotation portable terminal, making irradiate light or leaving photodiode, and said photodiode is located in the mobile terminal circuit, is used for converting light signal into level signal;
Level detection unit 62, whether the level that is used to detect on the said photodiode changes;
Output unit 63, when being used for level on photodiode and changing, the output trigger pip, said trigger pip representes that rotation has taken place portable terminal.
Portable terminal in the embodiment of the invention; Owing to can make irradiate light or leave photodiode in rotation portable terminal time line traffic control unit 61; And photodiode can convert light signal into level signal; When detecting level on the said photodiode and change through level detection unit 62; Just show irradiate light or left said photodiode that therefore just can confirm that rotation has taken place portable terminal through the trigger pip of output unit 63 outputs, this has replaced the identification of using traditional expensive accelerometer to realize the portable terminal rotation; Reduced the cost of portable terminal rotation identification, helped in the low and middle-end portable terminal of cost requirement strictness, using.
Wherein, as shown in Figure 7, said portable terminal also comprises processing unit 65, and this processing unit 65 is used for carrying out handled according to the trigger pip of output unit 63 outputs.Particularly, after output unit 63 confirms that rotation has taken place portable terminal, can be through some application programs in the processing unit 65 startup portable terminals.For example through being stored in the software program in the processing unit 65; The picture of after rotation has taken place portable terminal, having controlled in the portable terminal overturns; And the reverses direction of picture and the sense of rotation and the angle of angle and portable terminal are adapted, watch to make things convenient for the user.Perhaps, in car race game, control turning to and angle of racing car, so that racing car can be passed through the wherein bend of setting smoothly.
In addition; Can know from Fig. 7; Portable terminal described in the present embodiment can also comprise timing unit 64, and timing unit 64 is used to write down the duration of the level after changing on the said photodiode, to obtain the duration of portable terminal rotation back state; Thereby this duration is transferred to processing unit 65, so that processing unit 65 further starts the application program in the portable terminal according to this duration.For example; In the car race game, when vertical state rotated to heeling condition shown in Figure 4, racing car at first can be along the predetermined angle of rotation counterclockwise at portable terminal; As 5 °; And when the time that portable terminal is kept heeling condition shown in Figure 4 reached setting value, during such as 5 seconds, racing car can also be along counterclockwise rotating 5 ° again.
Through concrete embodiment the portable terminal in the embodiment of the invention is described below.
As shown in Figure 8, particularly, above-mentioned light control module comprises mobile terminal shell 71, is formed with cavity 72 in a side of mobile terminal shell, is provided with active block stop 73 in the cavity 72, and on the sidewall of cavity 72, is provided with hole 74; Wherein, in mobile terminal shell, also be provided with circuit board 75, be provided with photodiode 76 with hole 74 corresponding positions on the circuit board 75, active block stop 73 blocks or leave hole 74 so that irradiate light or leave photodiode 76;
As shown in Figure 9; Particularly; Whether above-mentioned level detection unit comprises the power supply 81 that is connected photodiode 76 input ends and is connected the current detecting device 82 of photodiode 76 output terminals whether flow through electric current through detecting on the current detecting device 82, change with the level on the sense photodiode 76;
And; From Fig. 9, can know; Above-mentioned output unit comprises the processor 83 that is connected with current detecting device 82, and processor 83 produces interrupt trigger signal when being used for level on photodiode 76 and changing, and this interrupt trigger signal representes that rotation has taken place portable terminal.
Wherein, need to prove that in the embodiment of present embodiment portable terminal, two photodiodes 76 about being provided with on the circuit board 75 are respectively applied for and confirm that portable terminal is to anticlockwise (counterclockwise) or to right rotation (CW).
How to come to confirm according to Fig. 8 and mobile terminal structure explanation shown in Figure 9 whether portable terminal rotation has taken place below.Under state shown in Figure 8; Active block stop 73 is positioned at the centre position of cavity 72; Be that light can either be radiated at through the hole 74 in left side on the photodiode 76 in left side; Therefore also can be radiated at through the hole 74 on right side on the photodiode 76 on right side, the photodiode 76 on the photodiode 76 in left side and right side all has electric current to pass through under the effect of power supply 81, thereby can all export high level through the photodiode 76 that current detecting device 82 detects both sides.Wherein shown in figure 10; For the photodiode 76 in left side, when portable terminal occurred tilting to anticlockwise (counterclockwise), active block stop 73 is skew left in cavity 72; And finally overlap with the hole 74 in cavity 72 left sides; Thereby make light leave the photodiode 76 in left side, the photodiode 76 in left side is not having the irradiate light after-current sharply to reduce, and can detect photodiode 76 output low levels in left side through current detecting device 82.Like this; The photodiode 76 in left side has taken place to change to low level saltus step by high level; This saltus step triggers processor 83 and produces interrupt trigger signal; This interrupt trigger signal representes that rotation has taken place portable terminal, therefore just can confirm that through this interrupt trigger signal rotation has taken place portable terminal.
In the present embodiment, above-mentioned processing unit specifically also can be processor 83.Like this after the saltus step of level on the photodiode 76 triggers processor 83 generation interrupt trigger signals; Processor 83 can start corresponding application under the effect of this interrupt trigger signal; Thereby the realization function corresponding is like the upset of picture, the control of game direction etc.
And, can carry out timing to holding time of portable terminal heeling condition shown in Figure 10 through timer (not shown) so that this hold time reach setting value after, trigger further application program.And this timer both can be timer independently, also can be an ingredient of processor 83.
Need to prove; In the present embodiment; Processor 83 has universal input/output interface (GPIO interface) 84, and current detecting device 82 is connected with processor 83 through this universal input/output interface 84, and does not require that processor 83 must have SPI interface or I2C interface.Therefore contrasting accelerometer of the prior art need use SPI interface or I2C interface; Present embodiment only need take a spot of GPIO interface; So just reduced the taking of mobile terminal interface resource, reduced the mobile terminal interface resource and produced the risk of conflict.
Need to prove that in addition shown in figure 11, the current detecting device 82 in the present embodiment can be resistance, wherein an end of this resistance is connected with the output terminal of photodiode 76, the other end is connected with processor 83.Like this, when photodiode 76 output high level, have electric current to pass through on the resistance, this moment, ohmically voltage was high level; And when the photodiode output low level, not having electric current to pass through on the resistance, this moment, ohmically voltage was low level.Therefore this resistance can be exported to processor 83 with the level variation of photodiode 76, produces interrupt trigger signals to trigger processor 83.
Perhaps, shown in figure 12, the current detecting device 82 in the present embodiment can also be triode, and wherein the grid of this triode is connected with the output terminal of photodiode 76, source electrode is the high level signal end, drain electrode is connected with processor 83.Like this, when photodiode 76 output high level, the triode conducting, thus the high level signal that the source terminal of this triode connects is exported to processor 83; When photodiode 76 output low levels, triode ends, thereby low level signal is exported to processor 83.Therefore this triode can be exported to processor 83 with the level variation of photodiode 76, produces interrupt trigger signals to trigger processor 83.
Wherein, can know that the bottom of the carrying active block stop 73 of cavity 72 is smooth curved bottom from Fig. 8 and Figure 10.When not run-off the straight of portable terminal, the position of active block stop 73 in cavity 72 trended towards between two parties, like this to avoid erroneous detection.In addition, can also with active block stop 73 be used for also be arranged to smooth curved bottom with cavity 72 contacted bottoms so that active block stop 73 slides in cavity 72.
And active block stop 73 can be processed by flexible material, thereby sends sound when avoiding active block stop 73 in cavity 72, to slide.
In sum; Portable terminal in the embodiment of the invention; Because said light control module can make irradiate light or leave photodiode when the rotation portable terminal; And photodiode can convert light signal into level signal, when detecting level on the said photodiode and change through said level detection unit, just shows irradiate light or has left said photodiode; Therefore just can confirm that rotation has taken place portable terminal through the trigger pip of said output unit output; This has replaced the identification of using traditional expensive accelerometer to realize the portable terminal rotation, has reduced the cost of portable terminal rotation identification, helps in the low and middle-end portable terminal of cost requirement strictness, using.
Shown in figure 13, the embodiment of the invention also provides a kind of method of portable terminal rotation identification, comprising:
S1201, the rotation portable terminal makes irradiate light or leaves photodiode through the light control module, and said photodiode is located in the mobile terminal circuit, is used for converting light signal into level signal;
Wherein, when irradiate light is on said photodiode, this photodiode output high level; And when light leaves said photodiode, this photodiode output low level.
S1202, whether the level that level detection unit detects on the said photodiode changes;
Level detection unit can be resistance or triode; This resistance can change the level that detects on the said photodiode through the electric current on it and change, and this triode then can change through the level that its conducting or cut-off state detect on the said photodiode.
When S1203, the output unit level on photodiode changes, the output trigger pip, said trigger pip representes that rotation has taken place portable terminal.
This output unit specifically can be processor, when the level on the said photodiode changes, can trigger this processor and produce interrupt trigger signal, can confirm that through this interrupt trigger signal rotation has taken place portable terminal.
Wherein, after rotation has taken place definite portable terminal, can start some application programs in the portable terminal.For example, after rotation has taken place portable terminal, the picture in the portable terminal is overturn, the reverses direction of picture and the sense of rotation and the angle of angle and portable terminal are adapted, watch to make things convenient for the user through software control.Perhaps, in car race game, control turning to and angle of racing car, so that racing car can be passed through the wherein bend of setting smoothly.
The method of the portable terminal rotation identification in the present embodiment; Because said light control module can make irradiate light or leave photodiode when the rotation portable terminal; And photodiode can convert light signal into level signal; When detecting level on the said photodiode and change through said level detection unit; Just show irradiate light or left said photodiode that therefore just can confirm that rotation has taken place portable terminal through the trigger pip of said output unit output, this has replaced the identification of using traditional expensive accelerometer to realize the portable terminal rotation; Reduced the cost of portable terminal rotation identification, helped in the low and middle-end portable terminal of cost requirement strictness, using.
Can find out from Figure 14 that further at S1203, when the level of output unit on photodiode changed, output trigger pip, said trigger pip represented that portable terminal has taken place after the rotation, said method also comprises:
S1204, the duration of writing down the level after changing on the said photodiode is to obtain the duration of portable terminal rotation back state.Wherein, further start the application program in the portable terminal according to this duration.For example; In the car race game, when vertical state rotated to heeling condition shown in Figure 4, racing car at first can be along counterclockwise rotating predetermined angular at portable terminal; As 5 °; And when the time that portable terminal is kept heeling condition shown in Figure 4 reached setting value, during such as 5 seconds, racing car can also be along counterclockwise rotating 5 ° again.
Understandable; The portable terminal that the embodiment of the invention is described includes but not limited to electronic equipments such as mobile phone, MP3, MP4, robot calculator, notebook computer, wireless Internet access basis, personal digital assistant (Personal DigitalAssistant is called for short PDA), smart mobile phone.
The above; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technician who is familiar with the present technique field is in the technical scope that the present invention discloses; Can expect easily changing or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.