Summary of the invention
The invention provides a kind of implementation method that has portable terminal and the button and the lamp of roller type press key, just can input control signal by swing roller formula button.
A kind of portable terminal that has roller type press key, comprise mainboard, microprocessor controller, it is characterized in that also comprising: with described mainboard be rotationally connected the annular or circular roller, the induction installation that is connected with described roller, described induction installation comprises: be fixed on the magnet group on the described roller, described magnet group is that the N utmost point and the S utmost point are staggered; Be in the interior magnetic induction module of magnetic field range of described magnet group, described magnetic induction module is fixed on the described mainboard and with described microprocessor controller and is connected.
Described magnetic induction module comprises first Hall element and second Hall element, and described microprocessor controller comprises interrupt interface and GPIO interface; The output of described first Hall element is connected with described interrupt interface circuit, and the output of described second Hall element is connected with described GPIO interface circuit.
A kind of implementation method of roller type press key, described roller type press key is the roller type press key of above-mentioned portable terminal, comprises the steps:
1) rotates described roller, drive described magnet group and rotate, make the residing magnetic direction alternate of described magnetic induction module;
2) described magnetic induction module produces pulse signal under the magnetic field of direction alternate, and sends to described microprocessor controller;
3) described microprocessor controller receives and handles described pulse signal;
4) described microprocessor controller is controlled described portable terminal.
The implementation method of LED lamp on a kind of portable terminal, as the implementation method of above-mentioned roller type press key, described microprocessor controller is controlled described portable terminal, comprises the steps:
Described microprocessor controller transmits control signal to described control circuit;
Described control circuit is controlled described LED lamp according to described control signal.
The implementation method that has portable terminal and the button and the lamp of roller type press key provided by the present invention, the user can operate input control signal to described mobile phone by the button of rotation roller formula, not only can produce well interactive with in progress audio frequency and video file, and in the process of recreation, avoided because the tired even damage of the finger that continuous repeated presses button brings.Outer ring at described roller type press key, also be provided with the LED lamp, increase mobile phone recreational and ornamental, in the use of mobile phone roller type press key, this LED lamp not only can play the effect of illumination to environment on every side, can also alleviate the asthenopia even the eyesight that produce because of the LCDs of watching mobile phone for a long time and descend.
Embodiment
Embodiment one
As shown in Figure 1, a kind of portable terminal that has roller type press key, comprise mainboard, microprocessor controller, with described mainboard be rotationally connected the annular or circular roller 1, with the induction installation that described roller 1 is connected, described induction installation comprises: be fixed on the magnet group 4 on the described roller 1, described magnet group 4 is staggered for the N utmost point and the S utmost point; Be in the interior magnetic induction module of magnetic field range of described magnet group 4, described magnetic induction module is fixed on the described mainboard and with described microprocessor controller and is connected.Described magnet group is made up of a plurality of magnets and each magnet includes a N utmost point and a S utmost point, and the N utmost point and the S utmost point of described magnet group 4 are staggered, like this, when described magnet group 4 is rotated with described roller 1, the variation that the direction in described magnetic induction module magnetic field of living in is staggered.Described magnetic induction module produces pulse signal and this pulse signal is sent to described microprocessor controller according to the magnetic field of this variation, after described microprocessor controller is handled described pulse signal, according to the result who handles described portable terminal is controlled, for example mouse moves, page turning, selection, operation such as determine.The quantity of described magnet can be set the requirement of the sensitivity level of described roller type press key according to this mobile phone terminal.The sensitivity of described roller type press key is higher if desired, can set the magnet of a greater number; The sensitivity of described roller type press key is lower if desired, then can set the magnet of lesser amt.
Described magnetic induction module comprises first Hall element and second Hall element, and described microprocessor controller comprises interrupt interface and GPIO interface; The output of described first Hall element is connected with described interrupt interface circuit, and the output of described second Hall element is connected with described GPIO interface circuit.Described GPIO interface is configured to input pattern.The pulse signal that described first Hall element produces and sends is first signal; The pulse signal that described second Hall element produces and sends is a secondary signal.
Described first Hall element and described second Hall element are positioned at the position of asynchronous generation pulse signal.
Further, described first Hall element and described second Hall element be positioned at the input of one of them Hall element and magnetic pole over against and the input of another Hall element not with magnetic pole over against the position.Position magnetic field intensity over against magnetic pole is bigger, when two Hall elements lay respectively at the input of a Hall element and magnetic pole over against and the input of another Hall element not with magnetic pole over against the position time, two Hall elements are in the residing magnetic field intensity difference of synchronization.It will be understood by those skilled in the art that and can set when Hall element is positioned at certain magnetic flux density value just output pulse signal, the pulse signal that described first Hall element and described second Hall element are exported is asynchronous.Like this, can make the interrupt interface of described microprocessor controller at first receive a pulse of described first signal that first Hall element sends and produce and interrupt, described microprocessor controller enters after the interrupt status pulse that receives the secondary signal that described second Hall element sends by described GPIO interface again.
As shown in Figure 3, further, described magnet group 4 is a loop configuration and coaxial with described roller 1.
Described magnet group is made up of 12 magnets.
As shown in Figure 3, further, also comprise the rolling wheel support (not shown) that is fixed on the described mainboard and be arranged on roller slide rail 5 on the described roller that described rolling wheel support and roller slide rail 5 are with the coaxial annular of described roller and are slidingly connected mutually.Like this, can realize being rotationally connected of described roller 1 and described mainboard by the slip of described roller slide rail on described rolling wheel support.
Further, also comprise the first control circuit that is used to produce and send the button control signal, the input of described first control circuit is provided with push switch and output is connected with described microprocessor controller, and described switch is arranged on the mainboard and is positioned at the below of described roller 1.The user can depress described switch by pressing described roller 1, thereby make first control circuit produce described button control signal and also this button control signal is sent to described microprocessor controller, described microprocessor controller is controlled described portable terminal according to this button control signal.Like this, the user both can control by rotating 1 pair of described portable terminal of described roller, also can control by pushing 1 pair of described portable terminal of described roller.
As shown in Figure 2, further, also comprise a plurality of LED lamps 3, second control circuit and keyboard holder, described keyboard holder is located in the shell of described mobile phone, described a plurality of LED lamp 3 all is fixed on the described keyboard holder and with the output of described second control circuit and is connected, and described second control circuit is located on the described mainboard and input is connected with described microprocessor controller.After described microprocessor controller is handled described first pulse signal and second pulse signal, send LED lamp control signal according to result to described second control circuit, described second control circuit is controlled described a plurality of LED lamp 3 according to described LED lamp control signal and is lighted or extinguish.
Further, also comprise the Flexible Printed Circuit (FPC that is fixed on the described keyboard holder, Flexible Printed Circuit), described LED lamp 3 all is fixed on the described Flexible Printed Circuit and with this Flexible Printed Circuit circuit and is connected, this Flexible Printed Circuit is connected with described second control circuit by a zero-force connector 2 (ZIF, Zero Insertion Force).
The quantity of described LED lamp 3 is 12.Described LED lamp 3 can also be covered with transparent or translucent annular cover body along the annular arrangement coaxial with described roller 1 on described all or part of LED lamp 3, described annular cover body adopts Merlon, and (PC, Polycarbonate) material is made.Described cover body and described roller 1 can be separate structure, and described cover body is a cast, are fixed on described roller 1 outside radially, and like this, when described roller 1 rotated, described cover body maintained static.Described cover body and described roller 1 also can be made the circular disk of integrative-structure.The inner round portion of described disk is a roller 1, and the outer ring part of described disk is a cover body, and like this, when described roller 1 rotated, described cover body rotated together.
Embodiment two
As shown in Figure 4, a kind of implementation method of roller type press key is characterized in that the roller type press key of described roller type press key for the portable terminal described in the embodiment one; Comprise the steps:
1) rotates described roller, drive described magnet group and rotate, make the residing magnetic direction alternate of described magnetic induction module;
2) described magnetic magnetic induction module produces pulse signal under the magnetic field of direction alternate, and sends to described microprocessor controller;
3) described microprocessor controller receives and handles described pulse signal;
4) described microprocessor controller is controlled described portable terminal.Described microprocessor controller is controlled the operating system that comprises described portable terminal to described portable terminal and is controlled, and also comprises the LED lamp on the described portable terminal is controlled.
As shown in Figure 5, further, described step 3) comprises:
31), described microprocessor controller is provided with the interrupt mode of described interrupt interface;
32), described microprocessor controller utilizes interrupt interface to receive the pulse signal that described first Hall element sends;
33), described microprocessor controller enters interrupt status;
34), described microprocessor controller utilizes the GPIO interface to receive the pulse signal that described second Hall element sends; The pulse signal that described first Hall element produces and sends is first signal; The pulse signal that described second Hall element produces and sends is a secondary signal.It will be understood by those skilled in the art that described step 31) to be arranged alternately described interrupt interface be that high level trigger to interrupt or the low level triggering terminal;
35), the pulse signal that sends of microprocessor controller the pulse signal that above-mentioned first Hall element of receiving is sent and second Hall element carries out logical operation;
36), described microprocessor controller is preserved the result of described logical operation;
37), described microprocessor controller is analyzed the result of described logical operation;
38), described microprocessor controller withdraws from interrupt status and returns step 31).
Described logical operation is an XOR.
Described step 37) whether the end value that comprises the steps: to judge described logical operation a N continuous value occurs and is consistent, if carry out step 4); If not, then be left intact.Described N is the continuous quantity of the logic operation result value that is consistent.The value of described N according to described roller type press key needed sensitivity determine that when the sensitivity of the described roller type press key of needs was higher, it was less to set the N value; When the sensitivity of the described roller type press key of needs hour, it is bigger to set the N value; The value of described logical operation keeps continuously the quantity of unanimity many more, represents that described roller is big more along the angle of same direction rotation; Otherwise the quantity that is consistent is few more, represents that described roller is more little along the angle of same direction rotation.The those skilled in the art is appreciated that the maximum of described N is 2 times of described number of magnets; The minimum value of described N is 1.
Described N value is 4.
Described step 37) comprises the steps: end value, judge the rotation direction of described roller according to described logical operation.When the end value of logical operation is 1, judge that described roller is for turning clockwise; When the end value of logical operation is 0, judge that described roller is for being rotated counterclockwise.It will be understood by those skilled in the art that when the end value that also can work as logical operation is 1, judge that described roller is for being rotated counterclockwise; When the end value of logical operation is 0, judge that described roller is for turning clockwise.
Embodiment three
The implementation method of LED lamp on a kind of portable terminal is characterized in that: the microprocessor controller described in embodiment two to as described in portable terminal control, comprise the steps:
Microprocessor controller sends LED lamp control signal to described second control circuit;
Described second control circuit is controlled described LED lamp according to described LED lamp control signal.
Described LED lamp control signal is according to the difference of described roller rotation direction and difference, when described roller clockwise rotates, described second control circuit according to described LED lamp control signal control described 4 LED lamps be illuminating state and 8 LED lamps for extinguishing state, described LED lamp is lighted successively along clockwise direction and is extinguished successively along clockwise direction; When described roller when being rotated counterclockwise, described second control circuit according to described LED lamp control signal control described 4 LED lamps be illuminating state and 8 LED lamps for extinguishing state, described LED lamp is lighted successively in the counterclockwise direction and is extinguished successively in the counterclockwise direction.