CN108509062A - A kind of key board unit and knowledge key method based on priority encoder - Google Patents
A kind of key board unit and knowledge key method based on priority encoder Download PDFInfo
- Publication number
- CN108509062A CN108509062A CN201810316264.6A CN201810316264A CN108509062A CN 108509062 A CN108509062 A CN 108509062A CN 201810316264 A CN201810316264 A CN 201810316264A CN 108509062 A CN108509062 A CN 108509062A
- Authority
- CN
- China
- Prior art keywords
- key
- keys
- a0a1a2
- priority encoder
- pressing
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
- G06F3/0238—Programmable keyboards
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Input From Keyboards Or The Like (AREA)
Abstract
The present invention provides a kind of key board unit and know key method, including priority encoder and Independent keys, Independent keys are connected with the input pin of priority encoder, and the output pin of priority encoder is connected with keyboard interface, and keyboard interface is for connecting peripheral control unit;Using priority encoder as keyboard coding device, Independent keys carry out independent button output or two key combination output as input equipment to priority encoder;Priority encoder generates key code and exports key code to keyboard interface, and the key code encodes for binary number.The key board of traditional 7 keys realizes that the key-press input of 28 kinds of situations at least needs 7 I/O mouthfuls, and the key board unit of the present invention only needs 3 I/O mouthfuls using peripheral control unit, so that it may realize the key-press input of up to 28 kinds situations;The present invention is very suitable for demand of the embedded system to expanded keyboard, cost-effective.
Description
Technical field
The invention belongs to computer input technology field, it is related to a kind of key board unit based on priority encoder and knows key side
Method.
Background technology
Keyboard is common input equipment in computer system.But for small-sized embedded computer system, because of volume
The factors such as weight limitation, often using the keyboard of miniaturization as input equipment.Common keyboard has 5 keyed, 7 keyed and 16 keys
Formula etc., principle are to be designed to the circuit form of Independent keys or the electricity of matrix keyboard using the I/O mouths of embedded computer
Road form often to sacrifice excessive I/O mouths for cost, while being pressed although such keyboard circuit is simple without combination
The function of key can carry out the disadvantage of the wasting of resources and number of keys deficiency to embedded system expansion bands.
Invention content
In order to avoid embedded system I/O mouthfuls of resource of waste and has the function of combination button, problems solved by the invention exists
In offer a kind of key board unit and knowledge key method based on priority encoder, key combination is carried out based on priority encoder, is realized
The keyboards of up to 28 key code functions.
The present invention is to be achieved through the following technical solutions:
A kind of key board unit based on priority encoder, including priority encoder and Independent keys, Independent keys with it is preferential
The input pin of encoder is connected, and the output pin of priority encoder is connected with keyboard interface, and keyboard interface is for connecting
Peripheral control unit;
Using priority encoder as keyboard coding device, Independent keys carry out as input equipment to priority encoder independent
Button exports or two key combination output;Priority encoder generates key code and exports key code to keyboard interface, and the key code is two
System number encoder.
The priority encoder is 74148 priority encoders, carries out the priority encoding output of -3 line of 8 line.
The Independent keys be 7 Independent keys S1-S7, a combination thereof key include S1-S2, S1-S3, S1-S4, S1-S5,
S1-S6、S1-S7、S2-S3、S2-S4、S2-S5、S2-S6、S2-S7、S3-S4、S3-S5、S3-S6、S3-S7、S4-S5、S4-
S6, S4-S7, S5-S6, S5-S7, S6-S7, others combination key input go out in vain.
A kind of knowledge key method of the key board unit based on priority encoder, including following operation:
When Independent keys carry out singly-bound input as input equipment to priority encoder, one of Independent keys S1-S7 is pressed,
Priority encoder exports corresponding keys according to 8-3 line priority encoding methods unique binary after receiving encodes A0A1A2:Press S1
When key, A0A1A2=011;When pressing S2 keys, A0A1A2=101;When pressing S3 keys, A0A1A2=001;When pressing S4 keys,
A0A1A2=110;When pressing S5 keys, A0A1A2=010;When pressing S6 keys, A0A1A2=100;When pressing S7 keys, A0A1A2=
000;When not pressing any key, A0A1A2=111;
Binary coding A0A1A2 is exported by keyboard interface, and peripheral control unit reads the key that output valve identifies S1-S7
Code;
When Independent keys carry out two key combination key input as input equipment to priority encoder, according to the combination order of key
Successively press two keys, not discharged for the time being after pressing first key, after press second key again, key code is arbitrarily released again after generating
It puts;The identification of Macintosh is identified by peripheral control unit according to sampling sequencing, binary coding A0A1A2-A0A1A2
It is combined by button sequencing for the corresponding key code A0A1A2 of each independent keys.
Compared with prior art, the beneficial effects of the invention are as follows:
Key board unit and knowledge key method provided by the invention based on priority encoder, it is independent to provide a kind of replacement tradition
A kind of Practical Solution of key circuit and matrix keyboard.The key board of traditional 7 keys realizes the key-press input of 28 kinds of situations
At least need 7 I/O mouthfuls, and the key board unit of the present invention is to 3 I/O mouthful needed using peripheral control unit, so that it may realization is more
Up to the key-press input of 28 kinds of situations;And to realizing classical matrix keyboard as much, at least it is also required to 12 I/O mouthfuls.So this
Invention is very suitable for demand of the embedded system to expanded keyboard, cost-effective.
Description of the drawings
Fig. 1 is the structure composition schematic block diagram of the present invention.
Specific implementation mode
The present invention will be described in detail below in conjunction with the accompanying drawings.
Referring to Fig. 1, a kind of key board unit based on priority encoder, which is characterized in that including priority encoder U1 and solely
Vertical button S1-S7, Independent keys are connected with the input pin of priority encoder, and output pin and the keyboard of priority encoder connect
Mouth J1 is connected, and keyboard interface is for connecting peripheral control unit;
Using priority encoder as keyboard coding device, Independent keys carry out as input equipment to priority encoder independent
Button exports or two key combination output;Priority encoder generates key code and exports key code to keyboard interface, and the key code is two
System number encoder.
The priority encoder is 74148 priority encoders, carries out the priority encoding output of -3 line of 8 line.According to
The 74148 priority encoder principles of work and power can be the CPLD or FPGA device of the same function of realizing.
The Independent keys be 7 Independent keys S1-S7, a combination thereof key include S1-S2, S1-S3, S1-S4, S1-S5,
S1-S6、S1-S7、S2-S3、S2-S4、S2-S5、S2-S6、S2-S7、S3-S4、S3-S5、S3-S6、S3-S7、S4-S5、S4-
S6, S4-S7, S5-S6, S5-S7, S6-S7, others combination key input go out in vain.
The knowledge key method of the key board unit based on priority encoder, including following operation:
When Independent keys carry out singly-bound input as input equipment to priority encoder, one of Independent keys S1-S7 is pressed,
Priority encoder exports corresponding keys according to 8-3 line priority encoding methods unique binary after receiving encodes A0A1A2:Press S1
When key, A0A1A2=011;When pressing S2 keys, A0A1A2=101;When pressing S3 keys, A0A1A2=001;When pressing S4 keys,
A0A1A2=110;When pressing S5 keys, A0A1A2=010;When pressing S6 keys, A0A1A2=100;When pressing S7 keys, A0A1A2=
000;When not pressing any key, A0A1A2=111;
Binary coding A0A1A2 is exported by keyboard interface, and peripheral control unit reads the key that output valve identifies S1-S7
Code;
When Independent keys carry out two key combination key input as input equipment to priority encoder, according to the combination order of key
Successively press two keys, not discharged for the time being after pressing first key, after press second key again, key code is arbitrarily released again after generating
It puts;The identification of Macintosh is identified by peripheral control unit according to sampling sequencing, binary coding A0A1A2-A0A1A2
It is combined by button sequencing for the corresponding key code A0A1A2 of each independent keys.
Specific embodiment is given below.
Referring to Fig.1, a kind of key board unit based on priority encoder, including:Priority encoder U1, Independent keys S1-S7,
Indicator light D1, D2 and keyboard interface J1 compositions.Specific priority encoder uses 74148 chips, realizes the preferential volume of -3 line of 8 line
Code output.Independent keys S1-S7 is input equipment, for providing artificial input.Indicator light D1, D2 are for indicating keyboard work shape
State.Keyboard interface J1 is the delivery outlet of key code.Peripheral control unit connects keyboard interface J1, and reads user by keyboard interface J1
Key code.
Further, it disclosure satisfy that the chip of priority encoder all can be used as the chip of encoded keyboard.
Described indicator light D1, the D2 is keyboard work light.D2 is to power on indicator light.D1 is keystroke indicator light.
It is powered after stablizing, present apparatus work is ready.When pushing button S1-S7 for the moment, according to 74148 functions, encoder
The unique binary coding A0A1A2 of corresponding keys will be exported immediately.When pressing combination button, encoder is according to keystroke sequence
Corresponding coding is exported, and composite key is identified according to coding priority time relationship by peripheral control unit.
According to the function of priority encoder 74148, when pushing button S1-S7 for the moment, encoder will export corresponding keys
Unique binary coding, indicated with A0A1A2.Such as:When pressing S1 keys, A0A1A2=011;When pressing S2 keys, A0A1A2=
101;When pressing S3 keys, A0A1A2=001;When pressing S4 keys, A0A1A2=110;When pressing S5 keys, A0A1A2=010;It presses
When S6 keys, A0A1A2=100;When pressing S7 keys, A0A1A2=000.When not pressing any key, A0A1A2=111.When having
When two key pressings, the big key code of run-out key number.When such as pressing S2 and S3 keys, A0A1A2=001.A0A1A2 passes through keyboard interface
J1 is exported, and is passed through and is read output valve, so that it may to identify the key code of (S1, S2, S3, S4, S5, S6, S7) totally 7 keys.
For two key combination key, including S1-S2, S1-S3, S1-S4, S1-S5, S1-S6, S1-S7, S2-S3, S2-S4,
S2-S5、S2-S6、S2-S7、S3-S4、S3-S5、S3-S6、S3-S7、S4-S5、S4-S6、S4-S7、S5-S6、S5-S7、S6-
S7, totally 21 Macintosh situations.
When Independent keys carry out two key combination key input as input equipment to priority encoder, according to the combination order of key
Successively press two keys, not discharged for the time being after pressing first key, after press second key again, key code is arbitrarily released again after generating
It puts;The identification of Macintosh is identified by peripheral control unit according to sampling sequencing, binary coding A0A1A2-A0A1A2
It is combined by button sequencing for the corresponding key code A0A1A2 of each independent keys.
To each Macintosh, when being inputted:The key of front is pressed and not discharged in advance, is then pressed again below
Key.Such as S1-S2 Macintosh, S1 keys are first pressed, and under conditions of S1 keys do not discharge, are pressed after S2 keys.The identification of Macintosh
Peripheral control unit is needed to be identified according to sampling sequencing.Such as S1-S2 Macintosh, S1 keys are first pressed, and export A0A1A2=
011, in the case where S1 keys do not discharge, S2 keys are pressed, according to priority encoding fuction output A0A1A2=101.Then think S1-
S2 composite keys are:011101.Same method can identify other Macintosh.
It is as follows in such as Macintosh S1-S3, operating process:S1 keys are first pressed, keyboard interface exports A0A1A2=011, protects
S1 down states are held, then press S3 keys, keyboard interface exports A0A1A2=001.After stablizing exports coding, arbitrarily release has been pressed
Under key, at this time keyboard interface export A0A1A2=111.It has pressed successively, has discharged without successively.Entire combination key operation mistake
Cheng Zhong, the key code sequence exported from keyboard interface are followed successively by 111-011-001-111.And when for single key stroke, it is defeated such as S1 keys
The key code sequence 111-011-111 gone out has difference completely.
The key board of traditional 7 keys realizes that the key-press input of 28 kinds of situations at least needs 7 I/O mouthful, and key of the invention
Disk device only needs 3 I/O mouthfuls (such as A0, A1, A2 shown in FIG. 1) using peripheral control unit, so that it may realize up to 28 kinds
The key-press input of situation, so the present invention is very suitable for demand of the embedded system to expanded keyboard, it is cost-effective.
Claims (6)
1. a kind of key board unit based on priority encoder, which is characterized in that including priority encoder (U1) and Independent keys
(S1-S7), Independent keys are connected with the input pin of priority encoder, the output pin and keyboard interface of priority encoder
(J1) it is connected, keyboard interface is for connecting peripheral control unit;
Using priority encoder as keyboard coding device, Independent keys carry out independent button as input equipment to priority encoder
Output or two key combination output;Priority encoder generates key code and exports key code to keyboard interface, and the key code is binary system
Number encoder.
2. the key board unit according to claim 1 based on priority encoder, it is characterised in that:The priority encoder
For 74148 priority encoders, the priority encoding output of -3 line of 8 line is carried out.
3. the key board unit according to claim 1 based on priority encoder, it is characterised in that:The Independent keys are
7 Independent keys S1-S7,21, a combination thereof key, including S1-S2, S1-S3, S1-S4, S1-S5, S1-S6, S1-S7, S2-S3,
S2-S4、S2-S5、S2-S6、S2-S7、S3-S4、S3-S5、S3-S6、S3-S7、S4-S5、S4-S6、S4-S7、S5-S6、S5-
S7, S6-S7, others combination key input go out in vain.
4. the key board unit according to claim 3 based on priority encoder, it is characterised in that:The Independent keys
Input, output are:
When singly-bound inputs, one of Independent keys S1-S7 is pressed, the unique binary of output corresponding keys is compiled after priority encoder receives
Code A0A1A2:When pressing S1 keys, A0A1A2=011;When pressing S2 keys, A0A1A2=101;When pressing S3 keys, A0A1A2=
001;When pressing S4 keys, A0A1A2=110;When pressing S5 keys, A0A1A2=010;When pressing S6 keys, A0A1A2=100;It presses
When S7 keys, A0A1A2=000;When not pressing any key, A0A1A2=111;
Binary coding A0A1A2 is exported by keyboard interface, and peripheral control unit reads the key code that output valve identifies S1-S7;
For two key combination key:Two keys successively are pressed according to the combination order of key, not discharged for the time being after pressing first key,
Press second key, arbitrarily release again after key code generates again afterwards;The identification of Macintosh is successively suitable according to sampling by peripheral control unit
Sequence is identified, and binary coding A0A1A2-A0A1A2 is that the corresponding key code A0A1A2 buttons of each independent keys are successively suitable
Sequence is combined.
5. a kind of knowledge key method of the key board unit based on priority encoder described in claim 1, which is characterized in that including following
Operation:
When Independent keys carry out singly-bound input as input equipment to priority encoder, one of Independent keys S1-S7 is pressed, preferentially
Encoder exports corresponding keys according to 8-3 line priority encoding methods unique binary after receiving encodes A0A1A2:When pressing S1 keys,
A0A1A2=011;When pressing S2 keys, A0A1A2=101;When pressing S3 keys, A0A1A2=001;When pressing S4 keys, A0A1A2=
110;When pressing S5 keys, A0A1A2=010;When pressing S6 keys, A0A1A2=100;When pressing S7 keys, A0A1A2=000;When not having
When pressing any key, A0A1A2=111;
Binary coding A0A1A2 is exported by keyboard interface, and peripheral control unit reads the key code that output valve identifies S1-S7;
When Independent keys carry out two key combination key input as input equipment to priority encoder, according to the combination order priority of key
Press two keys, not discharged for the time being after pressing first key, after press second key again, arbitrarily release again after key code generates;
The identification of Macintosh is identified by peripheral control unit according to sampling sequencing, and binary coding A0A1A2-A0A1A2 is
The corresponding key code A0A1A2 of each independent keys is combined by button sequencing.
6. as claimed in claim 5 know key method, which is characterized in that the Macintosh include S1-S2, S1-S3, S1-S4,
S1-S5、S1-S6、S1-S7、S2-S3、S2-S4、S2-S5、S2-S6、S2-S7、S3-S4、S3-S5、S3-S6、S3-S7、S4-
S5, S4-S6, S4-S7, S5-S6, S5-S7, S6-S7, others combination key input go out in vain.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810316264.6A CN108509062A (en) | 2018-04-10 | 2018-04-10 | A kind of key board unit and knowledge key method based on priority encoder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810316264.6A CN108509062A (en) | 2018-04-10 | 2018-04-10 | A kind of key board unit and knowledge key method based on priority encoder |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108509062A true CN108509062A (en) | 2018-09-07 |
Family
ID=63381386
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810316264.6A Pending CN108509062A (en) | 2018-04-10 | 2018-04-10 | A kind of key board unit and knowledge key method based on priority encoder |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108509062A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113687723A (en) * | 2021-07-27 | 2021-11-23 | 中电科思仪科技股份有限公司 | Expanded keyboard board of arbitrary waveform generator of I2C communication |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US3928789A (en) * | 1973-09-13 | 1975-12-23 | Honeywell Inc | Switch interlock circuit |
CN1474511A (en) * | 2003-08-06 | 2004-02-11 | 华侨大学 | Arbitrarily extensible binary keyboard coding circuit |
CN103605428A (en) * | 2013-11-26 | 2014-02-26 | 河南师范大学 | Computer keyboard with reorganizable keys |
CN104391586A (en) * | 2014-10-27 | 2015-03-04 | 惠州Tcl移动通信有限公司 | Detection method and detection system for keyboard input based on mobile terminal |
CN104424781A (en) * | 2013-08-30 | 2015-03-18 | 上海民通文化传媒有限公司 | Remote control device for terminal display device |
CN204288389U (en) * | 2014-12-16 | 2015-04-22 | 遵义师范学院 | A kind of dining room calling system |
CN105374138A (en) * | 2015-09-30 | 2016-03-02 | 河南科技大学 | A responder |
CN105677054A (en) * | 2016-01-05 | 2016-06-15 | 湖南工业大学 | Stand-alone keyboard scanning positioning circuit |
CN107239155A (en) * | 2017-07-14 | 2017-10-10 | 合肥图哇科技有限公司 | A kind of input equipment based on controller, input method, application system |
-
2018
- 2018-04-10 CN CN201810316264.6A patent/CN108509062A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US3928789A (en) * | 1973-09-13 | 1975-12-23 | Honeywell Inc | Switch interlock circuit |
CN1474511A (en) * | 2003-08-06 | 2004-02-11 | 华侨大学 | Arbitrarily extensible binary keyboard coding circuit |
CN104424781A (en) * | 2013-08-30 | 2015-03-18 | 上海民通文化传媒有限公司 | Remote control device for terminal display device |
CN103605428A (en) * | 2013-11-26 | 2014-02-26 | 河南师范大学 | Computer keyboard with reorganizable keys |
CN104391586A (en) * | 2014-10-27 | 2015-03-04 | 惠州Tcl移动通信有限公司 | Detection method and detection system for keyboard input based on mobile terminal |
CN204288389U (en) * | 2014-12-16 | 2015-04-22 | 遵义师范学院 | A kind of dining room calling system |
CN105374138A (en) * | 2015-09-30 | 2016-03-02 | 河南科技大学 | A responder |
CN105677054A (en) * | 2016-01-05 | 2016-06-15 | 湖南工业大学 | Stand-alone keyboard scanning positioning circuit |
CN107239155A (en) * | 2017-07-14 | 2017-10-10 | 合肥图哇科技有限公司 | A kind of input equipment based on controller, input method, application system |
Non-Patent Citations (2)
Title |
---|
单嵛琼 等: "8-3线优先编码器74LS148的级联分析及研究", 《大学物理实验》 * |
曹新亮 等: "一种优先编码键盘的设计", 《延安大学学报(自然科学版)》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113687723A (en) * | 2021-07-27 | 2021-11-23 | 中电科思仪科技股份有限公司 | Expanded keyboard board of arbitrary waveform generator of I2C communication |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108509062A (en) | A kind of key board unit and knowledge key method based on priority encoder | |
CN1746824B (en) | Method, apparatus and system for key press determination | |
CN104391586A (en) | Detection method and detection system for keyboard input based on mobile terminal | |
CN101241461A (en) | Keyboard automatic test system and its method | |
CN101547533A (en) | Simple control device for 86-type scene switch | |
CN101290563A (en) | Computer management system and method | |
CN101246393B (en) | Computer device and keyboard input operation method | |
CN101264838B (en) | Building floor choosing device in elevator compartment | |
CN201741107U (en) | Keyboard | |
CN211015131U (en) | Handheld operation device for numerical control system and numerical control equipment | |
CN2898933Y (en) | Multifunctional three in one mouse | |
CN1357835A (en) | Test and processing method and device for accident stop of computer system | |
CN205595590U (en) | Line ball pincers device | |
CN104965601B (en) | A kind of keyboard | |
CN201007818Y (en) | Keyboard with self-defining key | |
TWI442433B (en) | Keypad structure for a handheld device | |
CN206411621U (en) | A kind of area of computer aided input equipment | |
CN207752451U (en) | A kind of SCM Based instrument keyboard | |
CN100514261C (en) | Method for quickly inputting digit | |
CN201477580U (en) | Heterogeneous medium communication converter | |
CN204104023U (en) | Based on the quick supervisory keyboard of DVR | |
CN101738952A (en) | Method for realizing keys of single chip microcomputer | |
CN200986678Y (en) | KVM converter | |
CN1318946C (en) | Process for providing analog type press key input equipment with composite keys input function | |
CN101859185A (en) | Keyboard device and method for identify different key functions of keyboard device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB03 | Change of inventor or designer information | ||
CB03 | Change of inventor or designer information |
Inventor after: Li Hongbo Inventor after: Wang Yang Inventor after: Wang Siyuan Inventor after: Xu Hao Inventor before: Li Hongbo Inventor before: Wang Yang Inventor before: Wang Siyuan Inventor before: Xu Hao |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180907 |