CN102522976A - Key expansion circuit, expansion method and mobile terminal - Google Patents

Key expansion circuit, expansion method and mobile terminal Download PDF

Info

Publication number
CN102522976A
CN102522976A CN2011103886487A CN201110388648A CN102522976A CN 102522976 A CN102522976 A CN 102522976A CN 2011103886487 A CN2011103886487 A CN 2011103886487A CN 201110388648 A CN201110388648 A CN 201110388648A CN 102522976 A CN102522976 A CN 102522976A
Authority
CN
China
Prior art keywords
button
key
expansion
primary processor
standard key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011103886487A
Other languages
Chinese (zh)
Inventor
陈雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN2011103886487A priority Critical patent/CN102522976A/en
Publication of CN102522976A publication Critical patent/CN102522976A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a key expansion circuit, a key expansion method and a mobile terminal. The key expansion circuit comprises a main processor and a standard key connected with the main processor by a key scanning circuit, wherein the standard key is also connected with a plurality of gating circuit units and is further connected with a plurality of expansion keys by the gating circuit units, and each expansion key is also connected to a general purpose input/output (GPIO) port of the main processor respectively. According to the key expansion circuit, the key expansion method and the mobile terminal, the operation of key expansion is carried out by utilizing the GPIO of the main processor, and the problems of complicated structure, larger occupation space, long development time, high cost and the like existing in a special expansion chip adopted by the prior art can be solved.

Description

Button expanded circuit, extended method and portable terminal
Technical field
The invention belongs to the electronic circuit technology field, specifically, relate to button expanded circuit, extended method and have the portable terminal of said button expanded circuit.
Background technology
Portable terminal is as consumer electronics product, and user's ease for use is a key factor that influences its development, and concerning portable terminal, the more direct easy-to-use impression of user concentrates on the input of user instruction.High-end portable terminal product has adopted touch, mode such as hand-written as input one after another, realizes the ease for use of user instruction input with this.But for low side portable terminal product, because the cost of touch-screen is higher, be not suitable for being applied on the low-end product, therefore, full keyboard has just become the optimal selection of low side portable terminal instruction input.
At present; All buttons that portable terminal had on the market form the matrix form button; Primary processor on the mainboard of terminal can scan detection to the matrix form button, and when having detected button and press, primary processor interrupts current operation then carries out key-press event.But, can not satisfy the quantity demand of full keyboard button because existing mobile terminal key commonly used is less.Adopt the full keyboard scheme to improve input efficiency like need, improve user's impression, the expansion that must adopt external button extended chip to come the realization matrix button.When adopting external extended chip, the button that increases newly is connected on the extended chip, and extended chip is connected with primary processor on the mainboard of terminal through bus.After pressing the button that increases newly the user, extended chip sends interrupt signal through bus to primary processor, and primary processor reads the state of the relevant register of extended chip through bus, and then judges that which button presses, and carries out corresponding key-press event.
Prior art is when adopting said method to realize the button expansion of portable terminal; Owing to need to increase extra extended chip, not only circuit structure is complicated, the confined space that takies mainboard, also the debugging that software carries out this chip need be set; Increased the human cost of hardware cost and exploitation; Prolong the development time, thereby caused whole mobile terminal cost to increase, reduced competitiveness of product.
Summary of the invention
One of the object of the invention is to provide a kind of button expanded circuit; Utilize the GPIO of primary processor to carry out the button expansion, with solve complex structure that prior art adopts special extended chip to exist, take up room big, the development time is long and the high deficiency of cost.
For realizing the foregoing invention purpose, the present invention adopts following technical proposals to be achieved:
A kind of button expanded circuit comprises primary processor, and the standard key that is connected through key scanning circuit with primary processor; Said standard key also is connected with several gating circuit unit, and then is connected with several expansion buttons through several gating circuit unit, and each expansion button also is connected to a GPIO mouth of said primary processor respectively.
Aforesaid button expanded circuit, said gating circuit unit can include diode, and the anode of diode connects said standard key, and the negative electrode of diode connects said expansion button.
Aforesaid button expanded circuit, for ease of realizing the multiplexing of GPIO mouth, said expansion button is connected to the GPIO mouth of said primary processor through zero resistance.
Aforesaid button expanded circuit, said standard key is connected with the IO mouth of said primary processor through key scanning circuit, so that primary processor reads the level state signal of standard key.
Two of the object of the invention is to provide a kind of button extended method; This button extended method is based on above-mentioned described button expanded circuit; The main processing through reading the level signal of its GPIO mouth can be discerned the button that does not have the button measuring ability, thereby realizes the expansion of button.
For realizing above-mentioned technical purpose, the present invention adopts following technical proposals to be achieved:
A kind of button extended method; Include the standard key that connects primary processor through key scanning circuit; Standard key also is connected with several gating circuit unit; And then being connected with several expansion buttons through several gating circuit unit, each expansion button also is connected to a GPIO mouth of said primary processor respectively;
Primary processor reads the level signal of standard key through key scanning circuit; And be that standard key is when being pressed level signal corresponding in the level signal that reads standard key; Read the level signal of the corresponding GPIO mouth of the expansion button that is connected with standard key again, and judge that according to the level signal of the GPIO mouth that reads which expansion button is pressed.
Aforesaid button extended method, said gating circuit unit can include diode, and the anode of diode connects said standard key, and the negative electrode of diode connects said expansion button;
When said primary processor is low level in the level signal that reads said standard key; Read the level signal of the GPIO mouth of the said expansion button that is connected with standard key; If GPIO mouth level signal is a high level; The criterion button is pressed, if GPIO mouth level signal is a low level, judges that then the expansion button that this GPIO mouth connects is pressed.
Aforesaid button extended method is a high level if said primary processor reads the level signal of said standard key, then judges not have the button that is pressed.
Aforesaid button extended method, for ease of realizing the multiplexing of GPIO mouth, described button extended method is characterized in that, said expansion button is connected to the GPIO mouth of said primary processor through zero resistance.
Aforesaid button extended method, said standard key is connected with the IO mouth of said primary processor through key scanning circuit, so that primary processor reads the level state signal of standard key.
The present invention also provides a kind of portable terminal, and said portable terminal has above-mentioned described button expanded circuit, thereby passes through the expansion that simple circuit configuration realizes mobile terminal key, has simplified exploitation and design process, has reduced the terminal cost.
Compared with prior art; Advantage of the present invention and good effect are: button expanded circuit of the present invention utilization has the standard key of button measuring ability and the GPIO mouth of primary processor carries out the expansion of button; Read the level signal of standard key level signal and GPIO mouth thereof through primary processor; Can the criterion button and the expansion button whether be pressed, thereby realize expansion to button.Expanded circuit and extended method are simple, have simplified soft, hardware development flow process, have shortened the construction cycle, have reduced the cost of button expansion.
After advantages embodiment of the present invention, other characteristics of the present invention and advantage will become clearer.
Description of drawings
Fig. 1 is the circuit theory diagrams of an embodiment of button expanded circuit of the present invention;
Fig. 2 is based on the flow chart of an embodiment of button extended method of the present invention of Fig. 1 circuit theory diagrams.
Embodiment
Below in conjunction with accompanying drawing and embodiment technical scheme of the present invention is done further detailed explanation.
At first; Concise and to the point set forth basic thought of the present invention: have the problem that button in the product of button is less, can not satisfy the user's request of many buttons to existing portable terminal etc.; Consider that the primary processor in the product has a plurality of GPIO (universal input/output interface) mouthfuls mostly; So, consider to carry out the expansion of button with original standard key in the GPIO mouth bonded products with button measuring ability, utilize primary processor to read the level signal of GPIO mouth; According to level signal and the standard key that combines to have termination function judge whether the expansion button is pressed, and carry out corresponding key-press event when having the button of pressing detecting.
Please refer to Fig. 1, this Fig. 1 shows the circuit theory diagrams of an embodiment of button expanded circuit of the present invention.
As shown in Figure 1, the button expanded circuit of this embodiment includes standard key KEY3, and this standard key KEY3 is connected with the primary processor (not shown) through the key scanning circuit (not shown).As preferred embodiment, standard key KEY3 is connected with the IO interface of primary processor, so that primary processor reads the level state signal of KEY3.
Because standard key KEY3 is connected with primary processor through scanning circuit, therefore, KEY3 has the button interrupt function; Also promptly when KEY3 is pressed; Primary processor can detect, and presses the back primary processor and interrupt current operation detecting KEY3, then carries out the key-press event of KEY3.Standard key KEY3 is generally button place product; Like the matrix form button in the portable terminal; Circuit that it is connected with primary processor through scanning circuit and primary processor carry out the technology that the process of matrix form scanning can be known for those skilled in the art to button, do not do concrete elaboration at this.
This embodiment utilizes standard key KEY3 and gating circuit unit to expand two buttons.
Specifically, wherein one tunnel structure is following: KEY3 is connected with expansion button KEY1 through diode D1001, and the anode of D1001 connects KEY3, and the negative electrode of D1001 connects KEY1.In addition, expansion button KEY1 also connects the GPIO1 mouth of primary processor through resistance R 1.Diode D1001 is as the gating circuit unit, do not press at KEY1, also is KEY1 when being high level that D1001 ends; Be pressed at KEY1, also be KEY1 when being low level, D1001 is with conducting.After the D1001 conducting, the voltage at KEY3 place is clamped following D1001's, for about 0.3V, is low level.
In this embodiment, the resistance of resistance R 1 can be selected according to actual needs, and as a preferred embodiment, the resistance of resistance R 1 is zero, also is that resistance R 1 is zero resistance.Adopt the advantage of zero resistance to be, the existence of zero resistance can not influence electric current and the voltage signal in the circuit, and in the time need not expanding button KEY1, can this zero resistance position be broken off, and the GPIO1 mouth can wait other purposes as test, realizes the multiplexing of GPIO1 mouth.
The structure of another button of KEY3 expansion is following: KEY3 is connected with expansion button KEY2 through diode D1002, and the anode of D1002 connects KEY3, and the negative electrode of D1002 connects KEY2.In addition, expansion button KEY2 also connects the GPIO2 mouth of primary processor through resistance R 2.Diode D1002 is as the gating circuit unit, do not press at KEY2, also is KEY2 when being high level that D1002 ends; Be pressed at KEY2, also be KEY2 when being low level, D1002 is with conducting.After the D1002 conducting, the voltage at KEY3 place is clamped following D1002's, for about 0.3V, is low level.
With the selection of above-mentioned resistance R 1, the resistance of resistance R 2 can be selected according to actual needs, and as a preferred embodiment, the resistance of resistance R 2 is zero, also is that resistance R 2 is zero resistance.Adopt the advantage of zero resistance to be, the existence of zero resistance can not influence electric current and the voltage signal in the circuit, and in the time need not expanding button KEY2, can this zero resistance position be broken off, and the GPIO2 mouth can wait other purposes as test, realizes the multiplexing of GPIO2 mouth.
Standard key KEY3 is connected with two diode D1001 and D1002 in the circuit of this embodiment; Two expansion button KEY1 and KEY2 have been expanded through these two diodes; But be not limited to two,, can also expand more a plurality of as long as the GPIO mouth number of primary processor allows in the circuit.Also be not limited to and adopt diode to realize and be connected gating circuit unit between standard key KEY3 and expansion button KEY1 and the KEY2, also can adopt other components and parts that can realize the same strobe function or circuit structure to realize.As, suitable triode and correspondent peripheral circuit can be set realize etc.
The operation principle of this embodiment button expanded circuit and the course of work can be with reference to figure 2 and following descriptions to Fig. 2.
In the applicable portable terminal of button expanded circuit of this embodiment.In the time of in being applied to portable terminal; Primary processor is the primary processor on the mainboard of terminal; Standard key is one of them button in the matrix form button that carries of portable terminal, utilize standard key to carry out the expansion of button after, can form the full keyboard input button at terminal.
Shown in Figure 2ly be the flow chart of an embodiment of button extended method of the present invention, this embodiment is based on button expanded circuit shown in Figure 1.
In conjunction with button expanded circuit and the above-mentioned narration to Fig. 1 of Fig. 1, the flow process of this embodiment button extended method is following:
Step S21:CPU response KEY3 interrupts.The CPU here promptly refers to primary processor.
At this moment, KEY3 is a low level signal.As stated, standard key KEY3 is generally the matrix press-key of scan-type, and it has the key-press event interrupt function, also promptly when KEY3 is pressed, can send interruption to CPU, and it is KEY3 that CPU can detect the button that is pressed through key scanning circuit.
In the button expanded circuit as shown in Figure 1, level signal corresponding when KEY3 is pressed is a low level.In addition, even KEY3 does not press, if expansion button KEY1 or KEY2 are pressed, diode D1001 or D1002 are with forward conduction, and under the clamped effect of diode, the level signal of KEY3 is about 0.3V, also is low level signal.So, need combine the GPIO mouth specifically to judge again.
Step S22:CPU reads the level signal of GPIO1 mouth, and judges whether this level signal is low level.If low level judges that KEY1 is pressed; Otherwise, execution in step S23.
At the corresponding IO mouth level of KEY3 is low level and GPIO1 mouth during also for low level, explain that this moment, KEY1 was pressed, and CPU will carry out and expand button KEY1 corresponding key function.And the low level of KEY3 is not because KEY3 is pressed, but the back diode D1001 conducting because KEY1 is pressed, and the level of the IO mouth that KEY3 is corresponding clamped be low level.If at the corresponding IO mouth level of KEY3 is low level and GPIO1 mouth when being high level, explain that this moment, KEY1 was not pressed, the IO mouth of KEY3 correspondence is that low level reason also need further be confirmed.
When step S23:CPU is high level signal at the GPIO1 mouth level that reads, read the level signal of GPIO2 mouth again, and judge whether this level signal is low level.
If the level of GPIO2 mouth is a low level, because the corresponding IO mouth level of KEY3 this moment also is a low level, explain that then KEY2 is pressed, CPU carries out expansion button KEY2 corresponding key function.Equally, this moment, the low level of KEY3 was not because KEY3 is pressed, but the back diode D1002 conducting because KEY2 is pressed, and the level of the IO mouth that KEY3 is corresponding clamped be low level.
If the level of GPIO2 mouth is a high level also, explain that this moment, KEY2 was not pressed yet, and the corresponding IO mouth of KEY3 is that low level reason is that KEY3 has been pressed.Also promptly be high level and the corresponding IO mouth of KEY3 is under the low level situation, judge that KEY3 is pressed CPU operative norm button KEY3 corresponding key function at the level of GPIO1 mouth and GPIO2 mouth.
In this embodiment, be high level if CPU reads the level signal of the corresponding IO mouth of KEY3, then judge this moment KEY3 and expansion the expansion button KEY1 and the KEY2 that come out all be not pressed.
Need to prove that the order of above-mentioned steps S22 and step S23 also can be put upside down, promptly CPU also can read and judge the level signal of GPIO2 mouth earlier, and then carries out level signal that reads the GPIO1 mouth and the step of judging according to judged result.When if standard key KEY3 is connected with plural expansion button, can reads and judge the level signal of each GPIO mouth with reference to the method order of above-mentioned two expansion buttons and get final product.
Above embodiment is only in order to explaining technical scheme of the present invention, but not limits it; Although the present invention has been carried out detailed explanation with reference to previous embodiment, for the person of ordinary skill of the art, still can make amendment to the technical scheme that previous embodiment is put down in writing, perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of relevant art scheme break away from the spirit and the scope of the present invention's technical scheme required for protection.

Claims (10)

1. button expanded circuit; Comprise primary processor; And with primary processor through the standard key that key scanning circuit is connected, it is characterized in that said standard key also is connected with several gating circuit unit; And then being connected with several expansion buttons through several gating circuit unit, each expansion button also is connected to a GPIO mouth of said primary processor respectively.
2. button expanded circuit according to claim 1 is characterized in that, said gating circuit unit includes diode, and the anode of diode connects said standard key, and the negative electrode of diode connects said expansion button.
3. button expanded circuit according to claim 1 and 2 is characterized in that, said expansion button is connected to the GPIO mouth of said primary processor through zero resistance.
4. button expanded circuit according to claim 1 is characterized in that, said standard key is connected with the IO mouth of said primary processor through key scanning circuit.
5. button extended method; It is characterized in that; Include the standard key that connects primary processor through key scanning circuit; Standard key also is connected with several gating circuit unit, and then is connected with several expansion buttons through several gating circuit unit, and each expansion button also is connected to a GPIO mouth of said primary processor respectively;
Primary processor reads the level signal of standard key through key scanning circuit; And be that standard key is when being pressed level signal corresponding in the level signal that reads standard key; Read the level signal of the corresponding GPIO mouth of the expansion button that is connected with standard key again, and judge that according to the level signal of the GPIO mouth that reads which expansion button is pressed.
6. button extended method according to claim 5 is characterized in that, said gating circuit unit includes diode, and the anode of diode connects said standard key, and the negative electrode of diode connects said expansion button;
When said primary processor is low level in the level signal that reads said standard key; Read the level signal of the GPIO mouth of the said expansion button that is connected with standard key; If GPIO mouth level signal is a high level; The criterion button is pressed, if GPIO mouth level signal is a low level, judges that then the expansion button that this GPIO mouth connects is pressed.
7. button extended method according to claim 6 is characterized in that, is high level if said primary processor reads the level signal of said standard key, then judges not have the button that is pressed.
8. according to each described button extended method in the claim 5 to 7, it is characterized in that said expansion button is connected to the GPIO mouth of said primary processor through zero resistance.
9. button extended method according to claim 1 is characterized in that, said standard key is connected with the IO mouth of said primary processor through key scanning circuit.
10. a portable terminal is characterized in that, said portable terminal has each described button expanded circuit in the aforesaid right requirement 1 to 4.
CN2011103886487A 2011-11-30 2011-11-30 Key expansion circuit, expansion method and mobile terminal Pending CN102522976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103886487A CN102522976A (en) 2011-11-30 2011-11-30 Key expansion circuit, expansion method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103886487A CN102522976A (en) 2011-11-30 2011-11-30 Key expansion circuit, expansion method and mobile terminal

Publications (1)

Publication Number Publication Date
CN102522976A true CN102522976A (en) 2012-06-27

Family

ID=46293792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103886487A Pending CN102522976A (en) 2011-11-30 2011-11-30 Key expansion circuit, expansion method and mobile terminal

Country Status (1)

Country Link
CN (1) CN102522976A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103633983A (en) * 2013-12-09 2014-03-12 宁波翼动通讯科技有限公司 Key extension circuit
CN106681519A (en) * 2017-02-15 2017-05-17 深圳市科美集成电路有限公司 Keyboard circuit and keyboard control system
WO2017121056A1 (en) * 2016-01-12 2017-07-20 Boe Technology Group Co., Ltd. Selection circuit and electronic device
CN109922194A (en) * 2018-12-21 2019-06-21 贵州财富之舟科技有限公司 Key expansion method, system and terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394185A (en) * 2008-10-30 2009-03-25 四川长虹电器股份有限公司 Press-key detection circuit and method thereof
CN101645947A (en) * 2009-05-15 2010-02-10 上海闻泰电子科技有限公司 Method for realizing full keyboard of mobile phone
CN201444667U (en) * 2009-04-29 2010-04-28 青岛海信电器股份有限公司 USB power supply protective circuit and television applying same
CN201590076U (en) * 2010-02-10 2010-09-22 青岛海信移动通信技术股份有限公司 Interface extending circuit and mobile terminal with the circuit
CN201812029U (en) * 2010-07-23 2011-04-27 美的集团有限公司 Key detection and display driving integrated circuit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394185A (en) * 2008-10-30 2009-03-25 四川长虹电器股份有限公司 Press-key detection circuit and method thereof
CN201444667U (en) * 2009-04-29 2010-04-28 青岛海信电器股份有限公司 USB power supply protective circuit and television applying same
CN101645947A (en) * 2009-05-15 2010-02-10 上海闻泰电子科技有限公司 Method for realizing full keyboard of mobile phone
CN201590076U (en) * 2010-02-10 2010-09-22 青岛海信移动通信技术股份有限公司 Interface extending circuit and mobile terminal with the circuit
CN201812029U (en) * 2010-07-23 2011-04-27 美的集团有限公司 Key detection and display driving integrated circuit

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103633983A (en) * 2013-12-09 2014-03-12 宁波翼动通讯科技有限公司 Key extension circuit
WO2017121056A1 (en) * 2016-01-12 2017-07-20 Boe Technology Group Co., Ltd. Selection circuit and electronic device
CN106681519A (en) * 2017-02-15 2017-05-17 深圳市科美集成电路有限公司 Keyboard circuit and keyboard control system
CN109922194A (en) * 2018-12-21 2019-06-21 贵州财富之舟科技有限公司 Key expansion method, system and terminal
CN109922194B (en) * 2018-12-21 2021-06-29 贵州财富之舟科技有限公司 Key expansion method, system and terminal

Similar Documents

Publication Publication Date Title
JP3148020U (en) Electronic device and input interface thereof
CN102262465B (en) There is electronic installation and the touch inputting method thereof of touch input unit
CN108733250B (en) Handheld electronic device and touch detection method thereof
CN102522976A (en) Key expansion circuit, expansion method and mobile terminal
US8751708B2 (en) Method for transmitting touch panel data
CN106302808A (en) Data transmission method and mobile terminal
CN104765524A (en) Application switching method and device
TW200834384A (en) Computer and keyboard input operation method thereof.
CN102214026A (en) Touch control sensing system, electronic touch control device and touch control sensing method
CN105353928A (en) Large-sized touch screen based scanning method and system
CN103076920A (en) Touch panel equipment and mobile terminal
US20130217338A1 (en) Method of multi-target switch transmission through an externally connected bluetooth selection device
CN104270740A (en) Slot-sharing T card and SIM card detection method
CN106844277B (en) Server and information transmission method thereof
CN103440108A (en) Back control input device, and processing method and mobile equipment for realizing input of back control input device
CN202364197U (en) Button detection and LED control circuit
CN102455817B (en) Method for transmitting information of touch panel
CN110192170B (en) Touch controller, device, terminal and touch method
CN202696574U (en) Automatic identification circuit for touch key pins
CN110688339B (en) Data transmission method and device, mobile terminal and storage medium
CN104539804A (en) Electronic device and control method thereof
CN105511639A (en) Input control method and device for input method as well as terminal equipment
CN102999382A (en) Electronic device and switching method thereof
CN105005382A (en) Human body communication based wireless input system and implementation method thereof
CN112835821B (en) Method for simulating PS2 interface through GPIO port of singlechip, singlechip and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Applicant after: Qingdao Hisense Mobile Communication Technology Co., Ltd.

Address before: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No.

Applicant before: Qingdao Hisense Mobile Communication Technology Co., Ltd.

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120627