CN106200999A - Keyboard - Google Patents
Keyboard Download PDFInfo
- Publication number
- CN106200999A CN106200999A CN201610531867.9A CN201610531867A CN106200999A CN 106200999 A CN106200999 A CN 106200999A CN 201610531867 A CN201610531867 A CN 201610531867A CN 106200999 A CN106200999 A CN 106200999A
- Authority
- CN
- China
- Prior art keywords
- signal lines
- row
- color
- signal line
- controller
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/0202—Constructional details or processes of manufacture of the input device
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
本发明关于一种键盘,键盘包含控制器、M个行信号线、N个列信号线及MxN个按键单元。行信号线分别电耦合于控制器的输出端口其中之一。列信号线分别电耦合于控制器的输入端口其中之一。控制器周期性地依序通过输出端口,将第i行信号线设为预设电压,并判断N个列信号在线的电压值是否均低于逻辑高位准。当至少其中之一电压值高于逻辑高位准时,控制器判断N个列信号在线的电压值是否高于临界位准,并将第i行信号线以及N个列信号线中电压值高于临界位准的列信号线所对应到的按键单元判定为被按压。因此本发明能够避免在按键单元未被按压时误判为被按压,而在按键单元被按压时误判为未被按压,进而避免发生“鬼键”的情况。
The invention relates to a keyboard, which includes a controller, M row signal lines, N column signal lines and MxN key units. The row signal lines are respectively electrically coupled to one of the output ports of the controller. The column signal lines are respectively electrically coupled to one of the input ports of the controller. The controller periodically and sequentially passes through the output port, sets the i-th row signal line to a preset voltage, and judges whether the voltage values of the N column signal lines are all lower than the logic high level. When at least one of the voltage values is higher than the logic high level, the controller judges whether the voltage values of the N column signal lines are higher than the critical level, and sets the voltage values of the i-th row signal line and the N column signal lines higher than the critical level. The key unit corresponding to the column signal line of the level is determined to be pressed. Therefore, the present invention can avoid misjudgment that the key unit is pressed when the key unit is not pressed, and misjudge that the key unit is not pressed when the key unit is pressed, thereby avoiding the occurrence of "ghost keys".
Description
技术领域technical field
本发明涉及一种键盘,尤其涉及一种具有防鬼键功能的键盘。The invention relates to a keyboard, in particular to a keyboard with an anti-ghost key function.
背景技术Background technique
为了能够便利地运用计算机来执行各种运算及应用程序,计算机除了需要具备足够的运算能力之外,还需要搭配各种周边输入装置以便于使用者操作。常见的周边输入装置包括键盘、鼠标、麦克风等等,周边输入装置可将使用者的输入操作转换为计算机所能支持的指令,并使计算机能够对应地进行运算。In order to be able to conveniently use the computer to perform various calculations and application programs, the computer not only needs to have sufficient computing power, but also needs to be equipped with various peripheral input devices to facilitate user operations. Common peripheral input devices include keyboards, mice, microphones, etc. The peripheral input devices can convert user input operations into instructions supported by the computer, and enable the computer to perform calculations accordingly.
在各种周边输入装置中,键盘因为包含了许多不同的按键,而能够根据使用者的操作迅速产生各种输入指令,例如产生对应于各种字母的输入指令,因此成为一种重要且受欢迎的输入装置。然而随着计算机的应用日趋广泛,使用者也可能通过键盘来进行各种的应用,例如文书编辑或电玩游戏等。而在不同的应用情境下,键盘可能会被要求能够在被迅速且连续按压的情况下,准确产生正确的输入指令。然而按照现今技术的键盘侦测方式,却可能出现某按键并未被按压,却因为其它邻近的按键被按压而导致误判,亦即所谓的「鬼键」,造成使用者的不便,而成为亟待解决的问题。Among various peripheral input devices, the keyboard has become an important and popular method because it contains many different keys and can quickly generate various input commands according to the user's operation, such as generating input commands corresponding to various letters. input device. However, as the computer is widely used, users may also use the keyboard to perform various applications, such as document editing or video games. In different application scenarios, the keyboard may be required to accurately generate correct input commands when pressed rapidly and continuously. However, according to the keyboard detection method of today's technology, it may appear that a certain key has not been pressed, but a misjudgment is caused because other adjacent keys are pressed, which is the so-called "ghost key", which causes inconvenience to the user and becomes a Problems to be solved.
发明内容Contents of the invention
为改善上述鬼键的问题,本发明提供一种键盘。In order to improve the above problem of ghost keys, the present invention provides a keyboard.
上述的键盘包括:The aforementioned keyboards include:
N个模拟数字转换器;N analog-to-digital converters;
N个定电压比较器;N constant voltage comparators;
控制器,该控制器具有N个输入端口与M个输出端口,该N个输入端口可选择性地电耦合至N个模拟数字转换器或该N个输入端口可选择性地电耦合至N个定电压比较器,M及N均为大于1的整数;A controller, the controller has N input ports and M output ports, the N input ports can be selectively electrically coupled to N analog-to-digital converters or the N input ports can be selectively electrically coupled to N A constant voltage comparator, M and N are both integers greater than 1;
M个行信号线,该M个行信号线分别电耦合于该M个输出端口的其中之一;M row signal lines, the M row signal lines are respectively electrically coupled to one of the M output ports;
N个列信号线,该N个列信号线分别电耦合于该N个模拟数字转换器的其中之一及该N个定电压比较器的其中之一,该N个列信号线与该M个行信号线形成MxN个开关交会处;及N column signal lines, the N column signal lines are respectively electrically coupled to one of the N analog-to-digital converters and one of the N constant voltage comparators, the N column signal lines are connected to the M Row signal lines form MxN switch intersections; and
MxN个按键单元,该MxN个按键单元分别设置于该MxN个开关交会处的其中之一,每个按键单元均包含开关,该按键单元的两端点分别电耦合于该M个行信号线中的第X行信号线与该N个列信号线中的第Y列信号线,当该按键单元被按压时,该开关会导通该第X行信号线及该第Y列信号线之间的电性耦合,其中整数X的范围为1至M,整数Y的范围为1至N;MxN button units, the MxN button units are respectively arranged at one of the intersections of the MxN switches, each button unit includes a switch, and the two ends of the button unit are electrically coupled to the M row signal lines respectively The X-th row signal line and the Y-th column signal line in the N column signal lines, when the button unit is pressed, the switch will conduct the electrical connection between the X-th row signal line and the Y-th column signal line. Sexual coupling, where integer X ranges from 1 to M and integer Y ranges from 1 to N;
其中该控制器周期性地执行扫描循环,当该控制器执行该扫描循环时,该控制器调整i以逐一扫描该M个行信号线中的第i行信号线,该i的值被设定为由1到M的各数值至少一次,该扫描循环包含以下步骤:Wherein the controller executes the scanning cycle periodically, when the controller executes the scanning cycle, the controller adjusts i to scan the i-th row signal line among the M row signal lines one by one, and the value of i is set For each value from 1 to M at least once, the scanning cycle includes the following steps:
(a)i=1,开始该扫描循环;(a) i=1, start the scanning cycle;
(b)该控制器通过该M个输出端口,将该第i行信号线设为预设电压,且该第i行信号线以外的其它行信号线可设为较低电压和浮接状态二者的其中之一,该较低电压低于该预设电压;(b) The controller sets the i-th row signal line to a preset voltage through the M output ports, and other row signal lines other than the i-th row signal line can be set to a lower voltage and a floating state. one of the two, the lower voltage is lower than the preset voltage;
(c)该控制器通过该N个输入端口电性耦合至该N个定电压比较器,并控制该N个定电压比较器分别接收该N个列信号线上的电压值以判断该N个列信号线上的电压值是否均低于逻辑高位准;(c) The controller is electrically coupled to the N constant voltage comparators through the N input ports, and controls the N constant voltage comparators to respectively receive the voltage values on the N column signal lines to judge the N Whether the voltage values on the column signal lines are all lower than the logic high level;
(d)当该N个列信号线上的电压值均低于该逻辑高位准时,判定耦合于该第i行信号线信号的N个按键单元均未被按压;(d) When the voltage values on the N column signal lines are all lower than the logic high level, it is determined that none of the N button units coupled to the i-th row signal line signal has been pressed;
(e)当i<M时,设定i=i+1,回到步骤(b),当i>=M时,跳至步骤(g);(e) when i<M, set i=i+1, get back to step (b), when i>=M, jump to step (g);
(f)当该N个列信号线上的电压值至少其中之一高于该逻辑高位准时,(f) when at least one of the voltage values on the N column signal lines is higher than the logic high level,
(f1)该控制器通过该M个输出端口,将该第i行信号线设为该预设电压,且将该M个行信号线中除该第i行信号线以外的其它信号线设为该较低电压;(f1) The controller sets the i-th row signal line to the preset voltage through the M output ports, and sets other signal lines in the M row signal lines except the i-th row signal line to the lower voltage;
(f2)该控制器通过该N个输入端口电性耦合至该N个模拟数字转换器,并控制该N个模拟数字转换器接收该N个列信号线上的电压值以判断该N个列信号线上的电压值是否高于临界位准;(f2) The controller is electrically coupled to the N analog-to-digital converters through the N input ports, and controls the N analog-to-digital converters to receive voltage values on the N column signal lines to determine the N columns Whether the voltage value on the signal line is higher than the critical level;
(f3)将该第i行信号线以及该N个列信号线中电压值高于该临界位准的列信号线所对应到的按键单元判定为被按压;及(f3) determining that the button unit corresponding to the i-th row signal line and the column signal line whose voltage value is higher than the critical level among the N column signal lines is pressed; and
(f4)于该扫描循环中,当该M个行信号线中尚有第m行信号线未曾被设定为该预设电压时,将该i设定为m,并回到步骤f1,否则进入步骤(g),其中m为1至M的整数;及(f4) In the scanning cycle, when the m-th row of signal lines among the M row signal lines has not been set to the preset voltage, set i to m, and return to step f1, otherwise Go to step (g), wherein m is an integer from 1 to M; and
(g)完成该扫描循环。(g) Complete the scan cycle.
作为可选的技术方案,该键盘还包括切换器,该切换器用以根据该控制器发出的控制信号来选择性地电性导通该N个输入端口与该N个模拟数字转换器或电性导通该N个输入端口与该N个定电压比较器。As an optional technical solution, the keyboard also includes a switcher, which is used to selectively electrically connect the N input ports with the N analog-to-digital converters or electrical switches according to the control signal sent by the controller. and turning on the N input ports and the N constant voltage comparators.
作为可选的技术方案,该逻辑高位准为该预设电压的0.7倍。As an optional technical solution, the logic high level is 0.7 times of the preset voltage.
作为可选的技术方案,该临界位准为该预设电压的M分之一。As an optional technical solution, the critical level is 1/M of the preset voltage.
作为可选的技术方案,每个按键单元还包含电阻,该电阻与该开关串联于第X行信号线与该第Y列信号线之间。As an optional technical solution, each key unit further includes a resistor, and the resistor and the switch are connected in series between the X-th row signal line and the Y-th column signal line.
作为可选的技术方案,该控制器还包含N个第一色控制端口;As an optional technical solution, the controller also includes N first-color control ports;
该键盘还包含N个第一色信号线,该N个第一色信号线分别电耦合于该N个第一色控制端口的其中之一;The keyboard also includes N first-color signal lines, and the N first-color signal lines are respectively electrically coupled to one of the N first-color control ports;
每个按键单元还包含第一色光源,其中该第一色光源的两端点分别电耦合于该M个行信号线中的该第X行信号线与该N个第一色信号线中的第Y列第一色信号线;及Each key unit also includes a first-color light source, wherein two ends of the first-color light source are respectively electrically coupled to the X-th row signal line among the M row signal lines and the N-th row signal line among the N first-color signal lines Y column first color signal line; and
当执行步骤(b)或步骤(f1)时,该控制器通过该N个第一色控制端口,把N个第一色光控制信号分别施加到该N个第一色信号线上,藉由该N个第一色光控制信号和该第i行信号线间的电压差,来调整耦合至该第i行信号线的N个第一色光源的发光强度,进而影响耦合于该第i行信号线的N个按键单元的背光色彩。When performing step (b) or step (f1), the controller applies the N first color light control signals to the N first color signal lines respectively through the N first color control ports, by The voltage difference between the N first color light control signals and the i-th row signal line is used to adjust the luminous intensity of the N first-color light sources coupled to the i-th row signal line, thereby affecting the coupling to the i-th row The backlight color of the N button units of the signal line.
作为可选的技术方案,该控制器还包含N个第二色控制端口;As an optional technical solution, the controller also includes N second-color control ports;
该键盘还包含N个第二色信号线,该N个第二色信号线分别电耦合于该N个第二色控制端口其中之一;The keyboard also includes N second-color signal lines, and the N second-color signal lines are respectively electrically coupled to one of the N second-color control ports;
每个按键单元另包含一第二色光源,其中该第二色光源两端点分别电耦合于该M个行信号线中的该第X行信号线与该N个第二色信号线中的第Y列第二色信号线;及Each key unit further includes a second-color light source, wherein both ends of the second-color light source are electrically coupled to the X-th row signal line among the M row signal lines and the N-th row signal line among the N second-color signal lines. Y column second color signal lines; and
当执行步骤(b)或步骤(f1)时,该控制器通过该N个第二色控制端口,把N个第二色光控制信号分别施加到该N个第二色信号线上,藉由该N个第二色光控制信号和该第i行信号线间的电压差,来调整耦合至该第i行信号线的N个第二色光源的发光强度,进而影响耦合于该第i行信号线的N个按键单元的背光色彩。When performing step (b) or step (f1), the controller applies N second color light control signals to the N second color signal lines respectively through the N second color control ports, and the The voltage difference between the N second color light control signals and the i-th row of signal lines is used to adjust the luminous intensity of the N second-color light sources coupled to the i-th row of signal lines, thereby affecting the coupling to the i-th row of signal lines The backlight color of the N key units.
本发明还提供一种键盘,该键盘包含:The present invention also provides a keyboard, which includes:
N个模拟数字转换器;N analog-to-digital converters;
N个定电压比较器;N constant voltage comparators;
控制器,该控制器具有N个第一色控制端口,N个输入端口与M个输出端口,该N个输入端口可选择性地电耦合至N个模拟数字转换器或该N个输入端口可选择性地电耦合至N个定电压比较器,M及N为大于1的整数;A controller, the controller has N first color control ports, N input ports and M output ports, the N input ports can be selectively electrically coupled to N analog-to-digital converters or the N input ports can be selectively electrically coupled to N constant voltage comparators, where M and N are integers greater than 1;
M个行信号线,该M个行信号线分别电耦合于该M个输出端口其中之一;M row signal lines, the M row signal lines are respectively electrically coupled to one of the M output ports;
N个列信号线,该N个列信号线分别电耦合于该N个模拟数字转换器其中之一及该N个定电压比较器其中之一,该N个列信号线与该M个行信号线形成MxN个开关交会处;N column signal lines, the N column signal lines are respectively electrically coupled to one of the N analog-to-digital converters and one of the N constant voltage comparators, the N column signal lines are connected to the M row signals Lines form MxN switch intersections;
N个第一色信号线,该N个第一色信号线分别电耦合于该N个第一色控制端口其中之一;及N first color signal lines, the N first color signal lines are respectively electrically coupled to one of the N first color control ports; and
MxN个按键单元,其中X的范围为1至M,Y的范围为1至N,该MxN个按键单元分别设置于该MxN个开关交会处其中之一,每个按键单元包含开关与第一色光源,其中该按键单元的两端点分别电耦合于该M个行信号线中的第X行信号线与该N个列信号线中的第Y列信号线,当该每个按键单元被按压时,对应的该开关会导通该第X行信号线及该第Y列信号线之间的电性耦合,该第一色光源两端点分别电耦合于该M个行信号线中的该第X行信号线与该N个第一色信号线中的第Y列第一色信号线;MxN button units, wherein X ranges from 1 to M, and Y ranges from 1 to N. The MxN button units are respectively arranged at one of the MxN switch intersections. Each button unit includes a switch and a first color A light source, wherein the two ends of the key unit are respectively electrically coupled to the X-th row signal line among the M row signal lines and the Y-th column signal line among the N column signal lines, when each key unit is pressed , the corresponding switch will conduct the electrical coupling between the X-th row signal line and the Y-th column signal line, and the two ends of the first color light source are respectively electrically coupled to the X-th column of the M row signal lines. The row signal line and the Y-th column first-color signal line among the N first-color signal lines;
其中该控制器周期性地执行扫描循环,当该控制器执行该扫描循环时,该控制器调整i以逐一扫描该M个行信号线中的第i行信号线,该i的值被设定为由1到M的各数值至少一次,该扫描循环包含以下步骤:Wherein the controller executes the scanning cycle periodically, when the controller executes the scanning cycle, the controller adjusts i to scan the i-th row signal line among the M row signal lines one by one, and the value of i is set For each value from 1 to M at least once, the scanning cycle includes the following steps:
(a)该控制器通过该M个输出端口,将该第i行信号线设为一预设电压,且将该M个行信号线中除该第i行信号线以外的其它行信号线设为较低电压和浮接状态二者其中之一,该较低电压和该浮接状态异于该预设电压,该控制器通过该N个第一色控制端口,将N个第一色光控制信号分别施加到该N个第一色信号线上,藉由该N个第一色光控制信号和该第i行信号线间的电压差,来调整耦合至该第i行信号线的N个第一色光源的发光强度,进而影响耦合于该第i行信号线的N个按键单元的背光色彩;(a) The controller sets the i-th row signal line to a preset voltage through the M output ports, and sets other row signal lines of the M row signal lines except the i-th row signal line to It is one of the lower voltage and the floating state, the lower voltage and the floating state are different from the preset voltage, the controller controls the N first color lights through the N first color control ports The control signals are respectively applied to the N first color signal lines, and the N coupled to the i-th row signal line is adjusted by the voltage difference between the N first color light control signals and the i-th row signal line. The luminous intensity of a first color light source further affects the backlight color of the N button units coupled to the i-th row of signal lines;
(b)该控制器通过该N个输入端口电性耦合至该N个模拟数字转换器,并控制该N个模拟数字转换器接收该N个列信号线上的电压值以判断该N个列信号线上的电压值是否高于临界位准;(b) The controller is electrically coupled to the N analog-to-digital converters through the N input ports, and controls the N analog-to-digital converters to receive the voltage values on the N column signal lines to determine the N columns Whether the voltage value on the signal line is higher than the critical level;
(c)将该第i行信号线以及该N个列信号线中电压值高于该临界位准的列信号线所对应的按键单元判定为被按压;(c) judging the button unit corresponding to the i-th row signal line and the column signal line whose voltage value is higher than the critical level among the N column signal lines as being pressed;
(d)于该扫描循环中,当该M个行信号线中尚有第m行信号线未曾被设定为该预设电压时,将该i设定为m,并回到步骤(a),否则进入步骤(e),其中m为1至M的整数;及(d) In the scan cycle, when the m-th row of signal lines among the M row signal lines has not been set to the preset voltage, set i to m, and return to step (a) , otherwise enter step (e), wherein m is an integer from 1 to M; and
(e)完成该扫描循环。(e) Complete the scan cycle.
作为可选的技术方案,该控制器还包含N个第二色控制端口;As an optional technical solution, the controller also includes N second-color control ports;
该键盘还包含N个第二色信号线,该N个第二色信号线分别电耦合于该N个第二色控制端口其中之一;The keyboard also includes N second-color signal lines, and the N second-color signal lines are respectively electrically coupled to one of the N second-color control ports;
每个按键单元还包含第二色光源,其中该第二色光源两端点分别电耦合于该M个行信号线中的该第X行信号线与该N个第二色信号线中的第Y列第二色信号线;及Each key unit also includes a second color light source, wherein both ends of the second color light source are respectively electrically coupled to the X-th row signal line among the M row signal lines and the Y-th row among the N second-color signal lines. a second color signal line; and
当执行步骤(a)时,该控制器通过该N个第二色控制端口,把N个第二色光控制信号分别施加到该N个第二色信号线上,藉由该N个第二色光控制信号和该第i行信号线间的电压差,来调整耦合至该第i行信号线的N个第二色光源的发光强度,进而影响耦合于该第i行信号线的N个按键单元的背光色彩。When step (a) is executed, the controller applies N second color light control signals to the N second color signal lines respectively through the N second color control ports, and through the N second color light The voltage difference between the control signal and the i-th row of signal lines is used to adjust the luminous intensity of the N second-color light sources coupled to the i-th row of signal lines, thereby affecting the N key units coupled to the i-th row of signal lines backlight color.
作为可选的技术方案,该键盘还包括切换器,该切换器用以根据该控制器发出的控制信号来选择性地电性导通该N个输入端口与该N个模拟数字转换器或电性导通该N个输入端口与该N个定电压比较器。As an optional technical solution, the keyboard also includes a switcher, which is used to selectively electrically connect the N input ports with the N analog-to-digital converters or electrical switches according to the control signal sent by the controller. and turning on the N input ports and the N constant voltage comparators.
相比于现有技术,本发明的键盘能够周期性的进行扫描循环,并在扫描循环的过程中,先通过比较器比较各列信号在线的电压及逻辑高位准以确认是否有按键被按压,接着在通过模拟数字转换器比较各列信号在线的电压及临界位准以判定出被按压的按键单元,因此能够避免在按键单元未被按压时误判为被按压,而在按键单元被按压时误判为未被按压,进而避免发生“鬼键”的情况。Compared with the prior art, the keyboard of the present invention can perform a scan cycle periodically, and in the process of the scan cycle, first compare the voltage and logic high level of each column signal line through a comparator to confirm whether a key is pressed, Then compare the voltage and critical level of each column signal line by the analog-to-digital converter to determine the pressed key unit, so it can avoid being misjudged as being pressed when the key unit is not pressed, and when the key unit is pressed It is misjudged as not being pressed, thereby avoiding the occurrence of "ghost keys".
以下结合附图和具体实施例对本发明进行详细描述,但不作为对本发明的限定。The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments, but not as a limitation of the present invention.
附图说明Description of drawings
图1为本发明一实施例的键盘的示意图;Fig. 1 is the schematic diagram of the keyboard of an embodiment of the present invention;
图2为本发明一实施例的各行信号线的电压时序图;Fig. 2 is a voltage timing diagram of each row of signal lines according to an embodiment of the present invention;
图3为本发明一实施例的控制器执行扫描循环的流程图;FIG. 3 is a flowchart of a controller executing a scan cycle according to an embodiment of the present invention;
图4为本发明另一实施例的键盘的示意图。FIG. 4 is a schematic diagram of a keyboard according to another embodiment of the present invention.
具体实施方式detailed description
图1为本发明一实施例的键盘的示意图,请参照图1。键盘100包含N个模拟数字转换器ADC(1)至ADC(N)、N个定电压比较器CMP(1)至CMP(N)、控制器110、M个行信号线C(1)至C(M)、N个列信号线R(1)至R(N)及MxN个按键单元K(1,1)至K(M,N),M及N为大于1之整数。FIG. 1 is a schematic diagram of a keyboard according to an embodiment of the present invention, please refer to FIG. 1 . The keyboard 100 includes N analog-to-digital converters ADC(1) to ADC(N), N constant voltage comparators CMP(1) to CMP(N), a controller 110, and M row signal lines C(1) to C (M), N column signal lines R(1) to R(N) and M×N key units K(1,1) to K(M,N), where M and N are integers greater than 1.
控制器110具有N个输入端口IN(1)至IN(N)与M个输出端口OUT(1)至OUT(N)。N个输入端口IN(1)至IN(N)可选择性地电耦合至N个模拟数字转换器(analog to digitalconverter,ADC)ADC(1)至ADC(N)或N个输入端口IN(1)至IN(N)可选择性地电耦合至N个定电压比较器CMP(1)至CMP(N)。The controller 110 has N input ports IN( 1 ) to IN(N) and M output ports OUT( 1 ) to OUT(N). N input ports IN(1) to IN(N) can be selectively electrically coupled to N analog to digital converters (analog to digital converter, ADC) ADC(1) to ADC(N) or N input ports IN(1 ) to IN(N) are selectively electrically coupled to N constant voltage comparators CMP(1) to CMP(N).
在本发明的部分实施例中,N个模拟数字转换器(analog to digital converter,ADC)ADC(1)至ADC(N)以及N个定电压比较器CMP(1)至CMP(N)会分别电耦合至N个列信号线R(1)至R(N)。而在图1中,N个输入端口IN(1)至IN(N)可经由切换器112电耦合至N个模拟数字转换器ADC(1)至ADC(N)及N个定电压比较器CMP(1)至CMP(N),而控制器110可进一步输出控制信号SIGctrl至切换器112,切换器112即可根据控制信号SIGctrl来选择导通N个输入端口IN(1)至IN(N)及N个模拟数字转换器ADC(1)至ADC(N)之间的电性耦合,抑或是导通N个输入端口IN(1)至IN(N)及N个定电压比较器CMP(1)至CMP(N)之间的电性耦合。In some embodiments of the present invention, N analog to digital converters (analog to digital converter, ADC) ADC(1) to ADC(N) and N constant voltage comparators CMP(1) to CMP(N) are respectively Electrically coupled to N column signal lines R(1) to R(N). In FIG. 1 , N input ports IN(1) to IN(N) can be electrically coupled to N analog-to-digital converters ADC(1) to ADC(N) and N constant voltage comparators CMP via switch 112 (1) to CMP(N), and the controller 110 can further output the control signal SIGctrl to the switcher 112, and the switcher 112 can select and conduct N input ports IN(1) to IN(N) according to the control signal SIGctrl and the electrical coupling between N analog-to-digital converters ADC(1) to ADC(N), or turn on N input ports IN(1) to IN(N) and N constant voltage comparators CMP(1 ) to the electrical coupling between CMP(N).
M个行信号线C(1)至C(M)会分别电耦合于M个输出端口OUT(1)至OUT(N)的其中一个对应的输出端口,举例来说,第1行信号线C(1)会电耦合至第1个输出端口OUT(1),而第M行信号线C(M)则会电耦合至第M个输出端口OUT(M)。N个列信号线R(1)至R(N)分别电耦合于N个模拟数字转换器ADC(1)至ADC(N)的其中一个对应的模拟数字转换器以及N个定电压比较器CMP(1)至CMP(N)的其中一个对应的定电压比较器,举例来说第1列信号线R(1)会电耦合至模拟数字转换器ADC(1)及定电压比较器CMP(1),而第N列信号线R(N)则会电耦合至模拟数字转换器ADC(N)及定电压比较器CMP(N)。The M row signal lines C(1) to C(M) are respectively electrically coupled to one of the M output ports OUT(1) to OUT(N) corresponding to one of the output ports, for example, the first row signal line C (1) is electrically coupled to the first output port OUT(1), and the Mth row signal line C(M) is electrically coupled to the Mth output port OUT(M). The N column signal lines R(1) to R(N) are respectively electrically coupled to one of the N analog-to-digital converters ADC(1) to ADC(N) corresponding to one of the analog-to-digital converters and the N constant-voltage comparators CMP (1) to one of the corresponding constant voltage comparators of CMP(N), for example, the first column signal line R(1) is electrically coupled to the analog-to-digital converter ADC(1) and the constant voltage comparator CMP(1 ), and the Nth column signal line R(N) is electrically coupled to the analog-to-digital converter ADC(N) and the constant voltage comparator CMP(N).
N个列信号线R(1)至R(N)会与M个行信号线C(1)至C(M)彼此相交并形成MxN个开关交会处,而MxN个按键单元K(1,1)至K(M,N)则会设置在MxN个开关交会处之一。N column signal lines R(1) to R(N) intersect with M row signal lines C(1) to C(M) to form MxN switch intersections, and MxN key units K(1,1 ) to K(M,N) will be set at one of the MxN switch intersections.
举例来说,按键单元K(X,Y)会设置于第X行信号线C(X)及第Y列信号线R(Y)所形成的开关交会处,其中参数X值范围为1至M,而参数Y值范围为1至N。按键单元K(X,Y)包含开关S(X,Y)。在本发明的部分实施例中,按键单元K(X,Y)还可包含电阻Z(X,Y),电阻Z(X,Y)可为具体增设的电阻组件,亦可能是按键单元K(X,Y)的线路等效电阻。For example, the button unit K(X,Y) will be set at the intersection of the switch formed by the signal line C(X) of the row X and the signal line R(Y) of the column Y, where the value of the parameter X ranges from 1 to M , while the parameter Y ranges from 1 to N. The key unit K(X,Y) includes a switch S(X,Y). In some embodiments of the present invention, the key unit K(X,Y) may also include a resistor Z(X,Y), and the resistor Z(X,Y) may be a specific additional resistance component, or may be a key unit K( X, Y) line equivalent resistance.
电阻Z(X,Y)与开关S(X,Y)可串联于第X行信号线C(X)与第Y列信号线R(Y)之间,亦即按键单元K(X,Y)的两端点会分别电耦合于第X行信号线C(X)及第Y列信号线R(Y)。当按键单元K(X,Y)被按压时,开关S(X,Y)会导通第X行信号线C(X)及第Y列信号线R(Y)之间的电性耦合,此时,第X行信号线C(X)上的电位信号即会传导至第Y列信号线R(Y)。The resistor Z(X,Y) and the switch S(X,Y) can be connected in series between the X-row signal line C(X) and the Y-th column signal line R(Y), that is, the key unit K(X,Y) The two terminals of are respectively electrically coupled to the X-th row signal line C(X) and the Y-th column signal line R(Y). When the key unit K(X,Y) is pressed, the switch S(X,Y) will conduct the electrical coupling between the X-row signal line C(X) and the Y-th column signal line R(Y). , the potential signal on the Xth row signal line C(X) is transmitted to the Yth column signal line R(Y).
控制器110可周期性地执行扫描循环,当控制器110执行扫描循环时,控制器110可藉由调整参数i以逐一扫描M个行信号线中的第i行信号线,在每次的循环中,参数i的值将被设定为由1到M的各数值至少一次。The controller 110 can periodically execute the scan cycle. When the controller 110 executes the scan cycle, the controller 110 can scan the i-th row of signal lines among the M row signal lines one by one by adjusting the parameter i. , the value of parameter i will be set to each value from 1 to M at least once.
图2为本发明一实施例的各行信号线的电压时序图,请参照图2。扫描循环可藉由将参数i的值由1递增至M以分别在对应的时段P(1)至P(M)中扫描各行信号线。举例来说,当在时段P(1)中,参数i为1,此时控制器110可调高第1行信号线C(1)的电压,同时使其它行信号线的电压设定在较低的电压,如此一来,即可通过N个定电压比较器CMP(1)至CMP(N)或模拟数字转换器ADC(1)至ADC(N)来判断各列信号线R(1)至R(N)上的电压大小,以得知第1行的各按键单元的按压状况。判断完毕之后,控制器110可将参数i递增至2,此时扫描循环即进入时段P(2),而控制器110可调高第2行信号线C(2)的电压,同时使其它行信号线的电压设定在较低的电压以判断第2行之各按键单元的按压状况。依此类推,控制器110可继续将参数递增至3、…、M-1及M,并可在对应的时段P(3)、…、P(M-1)及P(M)中判断各行按键单元的按压状况。如此一来,即可判断所有按键单元的按压状况并完成扫描循环。此外,在本发明的部分实施例中,控制器110也可以将参数i由M递减至1,抑或是按照其它的次序判断各行按键单元的按压状况。FIG. 2 is a voltage timing diagram of each row of signal lines according to an embodiment of the present invention, please refer to FIG. 2 . The scan cycle can scan each row of signal lines in corresponding time periods P(1) to P(M) by increasing the value of parameter i from 1 to M. For example, when the parameter i is 1 in the period P(1), the controller 110 can increase the voltage of the signal line C(1) in the first row, and at the same time set the voltages of the signal lines in other rows to be lower. Low voltage, so that each column signal line R(1) can be judged by N constant voltage comparators CMP(1) to CMP(N) or analog-to-digital converters ADC(1) to ADC(N) To the magnitude of the voltage on R(N), to know the pressing status of each key unit in the first row. After the judgment is completed, the controller 110 can increase the parameter i to 2, at this time, the scanning cycle enters the period P(2), and the controller 110 can increase the voltage of the signal line C(2) of the second row, and at the same time make the other rows The voltage of the signal line is set at a lower voltage to determine the pressing status of each key unit in the second row. By analogy, the controller 110 can continue to increment the parameters to 3, . The pressing status of the key unit. In this way, the pressing status of all key units can be judged and the scanning cycle can be completed. In addition, in some embodiments of the present invention, the controller 110 may also decrement the parameter i from M to 1, or judge the pressing status of each row of key units in other order.
图3为本发明一实施例的控制器执行扫描循环的流程图,请参照图3。扫描循环的流程包含步骤S210至步骤S270。FIG. 3 is a flow chart of a controller executing a scan cycle according to an embodiment of the present invention, please refer to FIG. 3 . The flow of the scanning cycle includes step S210 to step S270.
S210:将参数i的值设定成1;S210: Set the value of parameter i to 1;
S220:控制器110通过M个输出端口OUT(1)至OUT(M),将第i行信号线C(i)设为预设电压VH,并将第i行以外的其它行信号线设为较低电压VL及浮接状态二者其中之一;S220: The controller 110 sets the i-th row signal line C(i) to a preset voltage VH through the M output ports OUT(1) to OUT(M), and sets the signal lines of other rows other than the i-th row to One of the lower voltage VL and the floating state;
S230:控制器110通过N个输入端口IN(1)至IN(N)电性耦合至N个定电压比较器CMP(1)至CMP(N),并控制N个定电压比较器CMP(1)至CMP(N)分别接收N个列信号线R(1)至R(N)上的电压值以判断N个列信号线R(1)至R(N)上的电压值是否均低于逻辑高位准VIH;S230: The controller 110 is electrically coupled to N constant voltage comparators CMP(1) to CMP(N) through N input ports IN(1) to IN(N), and controls the N constant voltage comparators CMP(1 ) to CMP(N) respectively receive the voltage values on the N column signal lines R(1) to R(N) to determine whether the voltage values on the N column signal lines R(1) to R(N) are lower than Logical high level VIH;
S240:当N个列信号线R(1)至R(N)上的电压值均低于逻辑高位准VIH时,判定该N个按键单元K(i,1)至K(i,N)均未被按压,并执行步骤S250,而当N个列信号线R(1)至R(N)上的电压值至少其中之一高于逻辑高位准VIH时,则执行步骤S260;S240: When the voltage values on the N column signal lines R(1) to R(N) are all lower than the logic high level VIH, determine that the N key units K(i,1) to K(i,N) are all is not pressed, and execute step S250, and when at least one of the voltage values on the N column signal lines R(1) to R(N) is higher than the logic high level VIH, then execute step S260;
S250:当i<M时,将参数i设定为i+1,并回到步骤S220,当i>=M时,则执行步骤S270;S250: when i<M, set the parameter i to i+1, and return to step S220, and when i>=M, then execute step S270;
S260:控制器110通过M个输出端口OUT(1)至OUT(M),将第i行信号线C(i)设为预设电压VH,并将M个行信号线C(1)至C(M)中除第i行信号线C(i)以外的其它行信号线设为较低电压VL;S260: The controller 110 sets the i-th row signal line C(i) to a preset voltage VH through the M output ports OUT(1) to OUT(M), and sets the M row signal lines C(1) to C In (M), other row signal lines except the i-th row signal line C(i) are set to a lower voltage VL;
S262:控制器110通过N个输入端口IN(1)至IN(N)电性耦合至N个模拟数字转换器ADC(1)至ADC(N),并控制N个模拟数字转换器ADC(1)至ADC(N)接收N个列信号线R(1)至R(N)上的电压值以判断N个列信号线R(1)至R(N)上的电压值是否高于临界位准Vt;S262: The controller 110 is electrically coupled to N analog-to-digital converters ADC(1) to ADC(N) through N input ports IN(1) to IN(N), and controls the N analog-to-digital converters ADC(1 ) to ADC(N) to receive the voltage values on the N column signal lines R(1) to R(N) to determine whether the voltage values on the N column signal lines R(1) to R(N) are higher than the critical bit Quasi-Vt;
S264:将第i行信号线C(i)以及N个列信号线R(1)至R(N)中电压值高于临界位准Vt的列信号线所对应到的按键单元判定为被按压;S264: Determine the button unit corresponding to the column signal line whose voltage value is higher than the critical level Vt among the i-th row signal line C(i) and the N column signal lines R(1) to R(N) as being pressed ;
S266:当M个行信号线C(1)至C(M)中尚有第m行信号线未曾被设定为预设电压时,将参数i设定为m,并回到步骤S260,否则进入步骤S270,其中m为不小于1且不大于M之整数;S266: When the m-th row of signal lines among the M row signal lines C(1) to C(M) has not been set to a preset voltage, set the parameter i to m, and return to step S260, otherwise Enter step S270, wherein m is an integer not less than 1 and not greater than M;
S270:完成扫描循环。S270: Complete the scanning cycle.
在步骤S210中,控制器110可先将参数i的值设定成1,以开始扫描循环,并可在扫描循环的过程中,逐渐将参数i设定成2至M,以确保在扫描循环的过程中,每一行信号线C(1)至C(M)都会被设定至预设电压VD并进行扫描。In step S210, the controller 110 can first set the value of the parameter i to 1 to start the scan cycle, and can gradually set the parameter i to 2 to M during the scan cycle to ensure During the process, the signal lines C(1) to C(M) of each row will be set to the preset voltage VD and scanned.
在步骤S220中,控制器110可通过M个输出端口OUT(1)至OUT(M),将第i行信号线C(i)设为预设电压VH,并将第i行信号线C(i)以外的其它行信号线设为较低电压VL及浮接状态二者其中之一。当第i行信号线C(i)以外的其它行信号线被设为较低电压VL和浮接状态两者之一时,其状态皆异于被设为预设电压VH。此时,若对应至第i行信号线C(i)的按键单元K(i,1)至K(i,N)有被按压时,例如若按键单元K(i,1)被按压时,开关S(i,1)将会导通第1列信号线R(1)与第i行信号线C(i)之间的电性连接,使得第1列信号线R(1)的电位会被提升到接近预设电压VH。In step S220, the controller 110 can set the i-th row signal line C(i) to a preset voltage VH through the M output ports OUT(1) to OUT(M), and set the i-th row signal line C( Other row signal lines other than i) are set to one of a lower voltage VL and a floating state. When the other row signal lines other than the i-th row signal line C(i) are set to one of a lower voltage VL and a floating state, their states are all different from being set to a preset voltage VH. At this time, if the key units K(i,1) to K(i,N) corresponding to the i-th row of signal lines C(i) are pressed, for example, if the key unit K(i,1) is pressed, The switch S(i,1) will conduct the electrical connection between the signal line R(1) in the first column and the signal line C(i) in the i-th row, so that the potential of the signal line R(1) in the first column will be is boosted close to the preset voltage VH.
因此在步骤S230中,控制器110会通过N个输入端口IN(1)至IN(N)电性耦合至N个定电压比较器CMP(1)至CMP(N),并控制N个定电压比较器CMP(1)至CMP(N)分别接收N个列信号线R(1)至R(N)上的电压值以判断N个列信号线R(1)至R(N)上的电压值是否均低于逻辑高位准VIH。在本发明的部分实施例中,逻辑高位准VIH的电压值会接近于预设电压VH的电压值,然而为避免两者太过接近而导致误判,亦不宜将两者的电压值设定为太过接近,而以逻辑高位准VIH略低于预设电压VH为佳,例如逻辑高位准VIH可为预设电压的0.7倍。藉由判断N列信号线R(1)至R(N)的电位与逻辑高位准VIH,即可初步判断是否有按键单元被按压。Therefore, in step S230, the controller 110 is electrically coupled to N constant voltage comparators CMP(1) to CMP(N) through N input ports IN(1) to IN(N), and controls the N constant voltage comparators The comparators CMP(1) to CMP(N) respectively receive the voltage values on the N column signal lines R(1) to R(N) to determine the voltages on the N column signal lines R(1) to R(N) Whether the value is lower than the logic high level VIH. In some embodiments of the present invention, the voltage value of the logic high level VIH is close to the voltage value of the preset voltage VH. However, in order to avoid misjudgment caused by the two being too close, it is not appropriate to set the voltage value of the two In order to be too close, it is preferable that the logic high level VIH is slightly lower than the preset voltage VH, for example, the logic high level VIH may be 0.7 times the preset voltage. By judging the potentials of the N columns of signal lines R(1) to R(N) and the logic high level VIH, it can be preliminarily judged whether any key unit is pressed.
在步骤S240中,若是N个列信号线R(1)至R(N)上的电压值均低于逻辑高位准VIH时,则表示N个列信号线R(1)至R(N)的电压值皆并未电耦合至第i行信号线C(i),所以电压并未显著的提升,此时即可判定N个按键单元K(i,1)至K(i,N)均未被按压,并执行步骤S250。In step S240, if the voltage values on the N column signal lines R(1) to R(N) are all lower than the logic high level VIH, it means that the voltages of the N column signal lines R(1) to R(N) None of the voltage values is electrically coupled to the signal line C(i) of the i-th row, so the voltage does not increase significantly. At this time, it can be determined that the N key units K(i,1) to K(i,N) are not is pressed, and step S250 is executed.
在步骤S250中控制器110会检查参数i的数值,若是当i>=M时,则表示每一行信号线C(1)至C(M)都已扫描完毕,此时就会进入步骤S270并完成扫描循环,直到经过一个周期的等待时间后,再重新执行步骤S210。若是i<M,则控制器110会调整参数i,例如将参数i更新为i+1,并回到步骤S220以对下一行信号线进行扫描。In step S250, the controller 110 will check the value of the parameter i, if i>=M, it means that each row of signal lines C(1) to C(M) has been scanned, and at this time, it will enter step S270 and The scanning cycle is completed, and step S210 is re-executed until a period of waiting time elapses. If i<M, the controller 110 adjusts the parameter i, for example, updates the parameter i to i+1, and returns to step S220 to scan the next row of signal lines.
此外,在步骤S240中,若是N个列信号线R(1)至R(N)上的电压值至少其中之一高于逻辑高位准VIH时,例如第1列信号线R(1)的电压值高于逻辑高位准VIH时,即表示有部分的按键单元被按压,导致第i行信号线C(i)在线的预设电压VH能够传导到第1列信号线R(1)。In addition, in step S240, if at least one of the voltage values on the N column signal lines R(1) to R(N) is higher than the logic high level VIH, for example, the voltage of the first column signal line R(1) When the value is higher than the logic high level VIH, it means that some of the key units are pressed, so that the preset voltage VH on the i-th row signal line C(i) can be transmitted to the first column signal line R(1).
举例来说,若按键单元K(i,1)被按压,则开关S(i,1)会导通第1列信号线R(1)与第i行信号线C(i)之间的电性连接,使得第1列信号线R(1)的电位会被提升到接近预设电压VH。然而,在本发明的部分实施例中,在按键单元K(i,1)未被按压的情况下,第1列信号线R(1)仍然可能因为其它按键单元被按压而导致电位上升。For example, if the key unit K(i,1) is pressed, the switch S(i,1) will conduct the electric current between the signal line R(1) in the first column and the signal line C(i) in the ith row. Sexual connection, so that the potential of the signal line R(1) in the first column will be raised to be close to the preset voltage VH. However, in some embodiments of the present invention, when the key unit K(i, 1) is not pressed, the potential of the signal line R(1) in the first column may still rise due to other key units being pressed.
举例来说,若按键单元K(i,2)、K(i+1,2)及K(i+1,1)同时都被按压,此时开关S(i,2)、S(i+1,2)及S(i+1,1)都会被导通,因此第i行信号线C(i)上的高电位可通过开关S(i,2)耦合至第2列信号线R(2),并通过开关S(i+1,2)耦合至第i+1行信号线C(i+1),接着再通过开关S(i+1,1)耦合至第1列信号线R(1)。For example, if the key units K(i,2), K(i+1,2) and K(i+1,1) are all pressed at the same time, the switches S(i,2), S(i+ 1,2) and S(i+1,1) will be turned on, so the high potential on the signal line C(i) in the i-th row can be coupled to the signal line R( 2), and coupled to the i+1th row signal line C(i+1) through the switch S(i+1,2), and then coupled to the first column signal line R through the switch S(i+1,1) (1).
换言之,只要被按压的按键单元能够提供回路将第i行信号线C(i)电耦合至第1列信号线R(1),就可能发生按键单元K(i,1)本身未被按压,第1列信号线R(1)的电位却被拉升的情况。在此情况下,若贸然判定按键单元K(i,1)被按压,或未将实际上被按压的按键单元K(i,2)、K(i+1,2)及K(i+1,1)判定为已按压,即会导致「鬼键」的情况,而造成使用上的困扰。In other words, as long as the pressed key unit can provide a circuit to electrically couple the i-th row signal line C(i) to the first column signal line R(1), it may happen that the key unit K(i, 1) itself is not pressed, The case where the potential of the signal line R(1) in the first column is pulled up. In this case, if it is rashly determined that the key unit K(i,1) is pressed, or the actually pressed key units K(i,2), K(i+1,2) and K(i+1) are not ,1) If it is determined that it has been pressed, it will cause a "ghost key" and cause trouble in use.
为了避免误判,控制器110在步骤S260中仍会通过M个输出端口OUT(1)至OUT(M),将第i行信号线C(i)设为预设电压VH,并将M个行信号线C(1)至C(M)中除第i行信号线C(i)以外的其它行信号线设为较低电压VL。接着在步骤S262中,控制器110可通过N个输入端口IN(1)至IN(N)电性耦合至N个模拟数字转换器ADC(1)至ADC(N),并控制N个模拟数字转换器ADC(1)至ADC(N)接收N个列信号线R(1)至R(N)上的电压值以判断N个列信号线R(1)至R(N)上的电压值是否高于临界位准Vt。In order to avoid misjudgment, in step S260, the controller 110 still sets the i-th row signal line C(i) to a preset voltage VH through the M output ports OUT(1) to OUT(M), and sets the M output ports OUT(1) to OUT(M) to a preset voltage VH The row signal lines other than the i-th row signal line C(i) among the row signal lines C(1) to C(M) are set to a lower voltage VL. Then in step S262, the controller 110 can be electrically coupled to N analog-to-digital converters ADC(1) to ADC(N) through N input ports IN(1) to IN(N), and control the N analog-digital converters The converters ADC(1) to ADC(N) receive the voltage values on the N column signal lines R(1) to R(N) to determine the voltage values on the N column signal lines R(1) to R(N) Is it higher than the critical level Vt.
在本发明的部分实施例中,当同一列的按键单元,例如按键单元K(1,1)至K(M,1)中,有部分按键单元被同时被按压时,则自第i行信号线C(i)输入的预设电压可能会由被同时按压之按键单元中的电阻分压,导致第一列信号线R(1)的电位可能会甚低于预设电压VH。而在较极端的情况下,若位于第一列的M个按键单元K(1,1)至K(M,1)同时都被按压,则位于第i行的按键单元将与其它M-1个按键单元的并联电阻共同分压,此时第一列信号线R(1)的电位可能只有In some embodiments of the present invention, when some of the key units in the same column, such as key units K(1,1) to K(M,1), are pressed at the same time, the signal from the i-th row The preset voltage input by the line C(i) may be divided by the resistors in the simultaneously pressed key units, so that the potential of the first column signal line R(1) may be much lower than the preset voltage VH. In a more extreme case, if the M key units K(1,1) to K(M,1) in the first column are all pressed at the same time, the key units in the i-th row will be connected with other M-1 The parallel resistors of the two button units divide the voltage together, and at this time the potential of the first column signal line R(1) may only be
(VH-VL)/M,而甚低于预设电压VH。(VH-VL)/M, even lower than the preset voltage VH.
为了避免误判,可将临界位准Vt设定为小于逻辑高位准VIH,根据上述的情况,亦可将临界位准Vt设定为预设电压VH的M分之一。由于临界位准Vt的电压位准较低,因此通过模拟数字转换器来信号在线的电压与临界位准Vt进行比对,以使判断结果更为精确。In order to avoid misjudgment, the threshold level Vt can be set to be smaller than the logic high level VIH. According to the above situation, the threshold level Vt can also be set to one M of the preset voltage VH. Since the voltage level of the critical level Vt is relatively low, the voltage of the signal line is compared with the critical level Vt through the analog-to-digital converter to make the judgment result more accurate.
在步骤S264中,控制器110可将第i行信号线C(i)以及N个列信号线R(1)至R(N)中电压值高于临界位准Vt的列信号线所对应到的按键单元判定为被按压。举例来说,若N个列信号线R(1)至R(N)中,第1列信号线R(1)及第2列信号线R(2)的电压值高于临界位准Vt,则控制器110可将对应于第i行信号线C(i)以及第1列信号线R(1)及第2列信号线R(2)的按键单元K(i,1)及K(i,2)判定为已按压。如此一来,即可侦测出对应至第i行信号线C(i)的按键单元中有被按压的按键单元,而能够避免出现「鬼键」的情况。In step S264, the controller 110 may map the i-th row signal line C(i) and the column signal lines whose voltage value is higher than the critical level Vt among the N column signal lines R(1) to R(N) to the corresponding The button unit is judged to be pressed. For example, if among the N column signal lines R(1) to R(N), the voltage values of the first column signal line R(1) and the second column signal line R(2) are higher than the critical level Vt, Then the controller 110 can connect the key units K(i,1) and K(i) corresponding to the i-th row signal line C(i), the first column signal line R(1) and the second column signal line R(2) ,2) It is judged as pressed. In this way, it can be detected that there is a pressed key unit among the key units corresponding to the signal line C(i) in the i-th row, so as to avoid the occurrence of “ghost keys”.
在完成步骤S264之后,控制器110会在步骤S266中进一步检查M个行信号线C(1)至C(M)中,是否尚有哪行信号线尚未被设定为预设电压VH,亦即检查是否还有未进行扫描的行信号线。举例来说,若控制器110判断第m行信号线未曾被设定为预设电压VH时,则控制器110可将参数i设定为m,并回到步骤S260继续通过模拟数字转换器来比对各列信号在线的电压与临界位准Vt之间的关系,以侦测是否尚有按键被按压。m为不小于1且不大于M的整数。After step S264 is completed, the controller 110 will further check in step S266 whether any row signal lines among the M row signal lines C(1) to C(M) have not been set to the preset voltage VH, or not. That is, it is checked whether there are any row signal lines that have not been scanned. For example, if the controller 110 judges that the signal line of the mth row has not been set to the preset voltage VH, the controller 110 can set the parameter i as m, and return to step S260 to continue to use the analog-to-digital converter to Comparing the relationship between the voltages of the signal lines of each column and the critical level Vt to detect whether any key is pressed. m is an integer not smaller than 1 and not larger than M.
而若所有的行信号线C(1)至C(M)都已经被设定至预设电压VH过一次以后,控制器110即可进入步骤S270并完成这次的扫描循环。And if all the row signal lines C(1) to C(M) have been set to the preset voltage VH once, the controller 110 can enter step S270 and complete the scan cycle.
由于键盘100可以周期性的进行扫描循环,并在扫描循环的过程中,先通过比较器CMP(1)至CMP(N)比较各列信号线R(1)至R(N)上的电压及逻辑高位准VIH以确认是否有按键被按压,接着在通过模拟数字转换器ADC(1)至ADC(N)比较各列信号线R(1)至R(N)上的电压及临界位准Vt以判定出被按压的按键单元,因此能够避免在按键单元未被按压时误判为被按压,或在按键单元被按压时误判为未被按压,进而避免发生“鬼键”的情况。Since the keyboard 100 can perform a scan cycle periodically, and in the process of the scan cycle, the voltages on the column signal lines R(1) to R(N) and The logic high level VIH is used to confirm whether a button is pressed, and then compare the voltage on the signal lines R(1) to R(N) of each column and the critical level Vt through the analog-to-digital converter ADC(1) to ADC(N) In order to determine the pressed key unit, it is possible to avoid misjudging that the key unit is pressed when it is not pressed, or misjudging that it is not pressed when the key unit is pressed, thereby avoiding the occurrence of "ghost keys".
图4为本发明另一实施例的键盘的示意图,请参照图4。键盘200与键盘100的结构及操作原理相似。键盘200包含N个模拟数字转换器ADC(1)至ADC(N)、N个定电压比较器CMP(1)至CMP(N)、控制器210、M个行信号线C(1)至C(M)、N个列信号线R(1)至R(N)、N个第一色信号线T1(1)至T1(N)及MxN个按键单元K’(1,1)至K’(M,N)。控制器210除了具备控制器110的组件及功能外,还包含N个第一色控制端口CL1(1)至CL1(N)。N个第一色信号线T1(1)至T1(N)分别电耦合于N个第一色控制端口CL1(1)至CL1(N)中对应的第一色控制端口。举例来说,第一色信号线T1(1)可电耦合至第一色控制端口CL1(1),而第一色信号线T1(N)可电耦合至第一色控制端口CL1(N)。FIG. 4 is a schematic diagram of a keyboard according to another embodiment of the present invention, please refer to FIG. 4 . The keyboard 200 is similar in structure and operation principle to the keyboard 100 . The keyboard 200 includes N analog-to-digital converters ADC(1) to ADC(N), N constant voltage comparators CMP(1) to CMP(N), a controller 210, and M row signal lines C(1) to C (M), N column signal lines R(1) to R(N), N first color signal lines T1(1) to T1(N), and MxN key units K'(1,1) to K' (M,N). In addition to the components and functions of the controller 110, the controller 210 also includes N first color control ports CL1(1) to CL1(N). The N first color signal lines T1(1) to T1(N) are respectively electrically coupled to corresponding first color control ports among the N first color control ports CL1(1) to CL1(N). For example, the first color signal line T1(1) can be electrically coupled to the first color control port CL1(1), and the first color signal line T1(N) can be electrically coupled to the first color control port CL1(N) .
此外,每个按键单元K’(X,Y)除了包含开关S(X,Y)之外,还可包含第一色光源L1(X,Y)。第一色光源L1(X,Y)的两端点会分别电耦合于M个行信号线C(1)至C(M)中的第X行信号线C(X)与N个第一色信号线T1(1)至T1(N)中的第Y列第一色信号线T1(Y)。通过输入适当的电压至第X行信号线C(X)及第Y列第一色信号线T1(Y),即能够控制第一色光源L1(X,Y)发光。举例来说,当第X行信号线C(X)为较高电位VH,而第Y列第一色信号线T1(Y)为较低电位VL时,第一色光源L1(X,Y)两端的电压差即可导通第一色光源L1(X,Y),并使第一色光源L1(X,Y)发出第一色光。而通过调整第一色光源L1(X,Y)两端的电压差大小还能够进一步调整第一色光源L1(X,Y)的发光亮度。In addition, each key unit K'(X,Y) may also include the first color light source L1(X,Y) in addition to the switch S(X,Y). The two ends of the first color light source L1(X, Y) are respectively electrically coupled to the Xth row signal line C(X) among the M row signal lines C(1) to C(M) and the N first color signals The Y-th column first color signal line T1(Y) among the lines T1(1) to T1(N). By inputting an appropriate voltage to the Xth row signal line C(X) and the Yth column first color signal line T1(Y), the first color light source L1(X,Y) can be controlled to emit light. For example, when the signal line C(X) in row X is at a higher potential VH, and the first color signal line T1(Y) in column Y is at a lower potential VL, the first color light source L1(X,Y) The voltage difference between the two ends can turn on the first color light source L1 (X, Y), and make the first color light source L1 (X, Y) emit the first color light. The luminance of the first color light source L1 (X, Y) can be further adjusted by adjusting the voltage difference between the two ends of the first color light source L1 (X, Y).
由于在图2所示的扫描循环流程中,控制器210可在步骤S220及步骤S260中,轮流将N行信号线C(1)至C(N)设为预设电压VH,因此在本发明的部分实施例中,控制器210亦可在执行步骤S220及/或步骤S260的同时,通过N个第一色控制端口CL1(1)至CL1(N),把N个第一色光控制信号SIG1(1)至SIG1(N)分别施加到N个第一色信号线T1(1)至T1(N)上,藉由N个第一色光控制信号SIG1(1)至SIG(N)和第i行信号线C(i)间的电压差,来调整耦合至第i行信号线C(i)之N个第一色光源L1(i,1)至L1(i,N)的发光强度,进而影响耦合于第i行信号线C(i)之N个按键单元K’(i,1)至K’(i,N)的背光色彩。Since in the scanning cycle process shown in FIG. 2 , the controller 210 can alternately set the signal lines C(1) to C(N) of N rows to the preset voltage VH in step S220 and step S260, so in the present invention In some embodiments, the controller 210 can also transmit the N first color light control signals through the N first color control ports CL1(1) to CL1(N) SIG1(1) to SIG1(N) are applied to the N first color signal lines T1(1) to T1(N) respectively, through the N first color light control signals SIG1(1) to SIG(N) and The voltage difference between the i-th row of signal lines C(i) is used to adjust the luminous intensity of the N first color light sources L1(i,1) to L1(i,N) coupled to the i-th row of signal lines C(i). , thereby affecting the backlight color of the N key units K'(i,1) to K'(i,N) coupled to the i-th row of signal lines C(i).
也就是说,键盘200可以在控制器210执行扫描循环时,同时控制第一色光源L1(X,Y)的发光强度,因此能够简化键盘200的操作过程,进一步减少控制器210的硬件复杂度。此外,由于执行扫描循环的周期较短,因此在利用扫描循环的期间导通第一色光源L1(X,Y)时,第一色光源L1(X,Y)所发出的光不至于会让使用者感受到闪烁,而仍能够让使用者感受到稳定发光的效果。That is to say, the keyboard 200 can simultaneously control the luminous intensity of the first color light source L1 (X, Y) when the controller 210 executes the scanning cycle, so the operation process of the keyboard 200 can be simplified, and the hardware complexity of the controller 210 can be further reduced. . In addition, since the period of executing the scanning cycle is relatively short, when the first color light source L1 (X, Y) is turned on during the scanning cycle, the light emitted by the first color light source L1 (X, Y) will not make the The user feels flickering, but the user can still feel the effect of steady light.
在图4中,控制器210还可包含N个第二色控制端口CL2(1)至CL2(N),而键盘200还可包含N个第二色信号线T2(1)至T2(N),而N个第二色信号线T2(1)至T2(N)会分别电耦合于N个第二色控制端口CL2(1)至CL(N)中对应的一个第二色控制端口。In FIG. 4, the controller 210 can also include N second color control ports CL2(1) to CL2(N), and the keyboard 200 can also include N second color signal lines T2(1) to T2(N). , and the N second color signal lines T2(1) to T2(N) are respectively electrically coupled to a corresponding one of the N second color control ports CL2(1) to CL(N).
按键单元K’(X,Y)可另包含第二色光源L2(X,Y)。第二色光源L2(X,Y)的两端点可分别电耦合于M个行信号线C(1)至C(M)中的第X行信号线C(X)与N个第二色信号线T2(1)至T2(N)中的第Y列第二色信号线T2(Y)。The key unit K'(X,Y) may further include a second color light source L2(X,Y). The two ends of the second color light source L2(X, Y) can be electrically coupled to the X-th row signal line C(X) among the M row signal lines C(1) to C(M) and the N second color signals respectively. The second color signal line T2(Y) of the Yth column among the lines T2(1) to T2(N).
而控制器210也可根据上述控制N个第一色控制端口CL1(1)至CL1(N)的方式来控制N个第二色控制端口CL2(1)至CL2(N)。换言之,控制器210可在执行步骤S220及/或步骤S260的同时,通过N个第二色控制端口CL2(1)至CL2(N),把N个第二色光控制信号SIG2(1)至SIG2(N)分别施加到N个第二色信号线T2(1)至T2(N)上,藉由N个第二色光控制信号SIG2(1)至SIG2(N)和第i行信号线C(i)间的电压差,来调整耦合至第i行信号线C(i)之N个第二色光源L2(i,1)至L2(i,N)的发光强度,进而影响耦合于第i行信号线C(i)的N个按键单元K(i,1)至K(i,N)的背光色彩。The controller 210 can also control the N second color control ports CL2( 1 ) to CL2(N) according to the above method of controlling the N first color control ports CL1( 1 ) to CL1(N). In other words, the controller 210 can transmit the N second color light control signals SIG2(1) to SIG2 through the N second color control ports CL2(1) to CL2(N) while executing step S220 and/or step S260 (N) are respectively applied to the N second color signal lines T2(1) to T2(N), through the N second color light control signals SIG2(1) to SIG2(N) and the i-th row signal line C( i) to adjust the luminous intensity of the N second color light sources L2(i,1) to L2(i,N) coupled to the i-th row of signal lines C(i), thereby affecting the coupling to the i-th row of signal lines C(i) Backlight colors of the N key units K(i,1) to K(i,N) of the row signal line C(i).
在本发明的部分实施例中,第一色光源L1(X,Y)及第二色光源L2(X,Y)可发出不同颜色的光,因此控制器210可以通过第一色光控制信号及第二色光控制信号分别使第一色光源L1(X,Y)及第二色光源L2(X,Y)发出不同强度的光,进而能够将两者所发出的光混合出不同的颜色及变换效果。在本发明的部分实施例中,键盘200还可包含第三色光源,并利用类似于上述控制第一色光源L1(X,Y)及第二色光源L2(X,Y)的架构及方式来控制第三色光源,以使键盘200的背光效果能够更加丰富。In some embodiments of the present invention, the first color light source L1 (X, Y) and the second color light source L2 (X, Y) can emit light of different colors, so the controller 210 can control the signal through the first color light and The second color light control signal makes the first color light source L1 (X, Y) and the second color light source L2 (X, Y) emit light of different intensities, and then the light emitted by the two can be mixed into different colors and transformed. Effect. In some embodiments of the present invention, the keyboard 200 may also include a third color light source, and use a structure and method similar to the above-mentioned control of the first color light source L1 (X, Y) and the second color light source L2 (X, Y) to control the third color light source, so that the backlight effect of the keyboard 200 can be richer.
举例来说,第一色光源、第二色光源及第三色光源可分别为红色光源、蓝色光源及绿色光源,如此一来,通过调整三色光源的强度比例,就能够混合出各种不同的色光,让键盘的使用者体验更加丰富多元。For example, the first color light source, the second color light source and the third color light source can be respectively red light source, blue light source and green light source. In this way, by adjusting the intensity ratio of the three color light sources, various colors can be mixed. Different color lights make the keyboard user experience richer and more diverse.
综上所述,本发明的键盘能够周期性的进行扫描循环,并在扫描循环的过程中,先通过比较器比较各列信号在线的电压及逻辑高位准以确认是否有按键被按压,接着在通过模拟数字转换器比较各列信号在线的电压及临界位准以判定出被按压的按键单元,因此能够避免在按键单元未被按压时误判为被按压,而在按键单元被按压时误判为未被按压,进而避免发生“鬼键”的情况。同时,通过各行信号线及各色信号线,还可以进一步在进行扫描循环的过程中,使键盘的背光光源发光,并调整背光色彩,达到简化控制流程及简化硬设备的效果。To sum up, the keyboard of the present invention can perform a scan cycle periodically, and in the process of the scan cycle, first compare the voltage and logic high level of each column signal line through a comparator to confirm whether a key is pressed, and then Compare the voltage and critical level of each column signal line through the analog-to-digital converter to determine the pressed key unit, so it can avoid misjudgment that the key unit is pressed when the key unit is not pressed, and misjudgment when the key unit is pressed. In order to avoid the occurrence of "ghost keys" because they are not pressed. At the same time, through the signal lines of each row and the signal lines of each color, the backlight light source of the keyboard can be further illuminated during the scanning cycle, and the color of the backlight can be adjusted to achieve the effect of simplifying the control process and simplifying the hardware equipment.
当然,本发明还可有其它多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。Certainly, the present invention also can have other various embodiments, without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and deformations according to the present invention, but these corresponding changes All changes and modifications should belong to the scope of protection of the appended claims of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610531867.9A CN106200999B (en) | 2016-07-07 | 2016-07-07 | keyboard |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610531867.9A CN106200999B (en) | 2016-07-07 | 2016-07-07 | keyboard |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106200999A true CN106200999A (en) | 2016-12-07 |
| CN106200999B CN106200999B (en) | 2019-02-26 |
Family
ID=57473550
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610531867.9A Active CN106200999B (en) | 2016-07-07 | 2016-07-07 | keyboard |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106200999B (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106876203A (en) * | 2017-03-09 | 2017-06-20 | 联想(北京)有限公司 | A kind of method of keyboard, electronic equipment and manufacture keyboard |
| CN112650396A (en) * | 2020-12-16 | 2021-04-13 | 上海闻泰信息技术有限公司 | Projection keyboard system |
| TWI901523B (en) * | 2025-02-18 | 2025-10-11 | 精元電腦股份有限公司 | Keyboard circuit with both anti-ghosting and luminous functions |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070247339A1 (en) * | 2006-04-04 | 2007-10-25 | Zippy Technology Corp. | Keyboard without ghost keys |
| CN101854176A (en) * | 2009-04-03 | 2010-10-06 | 旭丽电子(广州)有限公司 | Ghost key detection circuit and related method thereof |
| CN203894703U (en) * | 2014-05-12 | 2014-10-22 | 张文嵛 | Computer keyboard |
| CN104919400A (en) * | 2012-12-21 | 2015-09-16 | 苹果公司 | Computer keyboard key scan sharing matrix with independent LED for each key |
| CN204884969U (en) * | 2015-07-20 | 2015-12-16 | 华硕电脑股份有限公司 | Luminous keyboard device |
| CN105306070A (en) * | 2015-10-26 | 2016-02-03 | 潘国新 | Scanning driving method for computer keyboard |
-
2016
- 2016-07-07 CN CN201610531867.9A patent/CN106200999B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070247339A1 (en) * | 2006-04-04 | 2007-10-25 | Zippy Technology Corp. | Keyboard without ghost keys |
| CN101854176A (en) * | 2009-04-03 | 2010-10-06 | 旭丽电子(广州)有限公司 | Ghost key detection circuit and related method thereof |
| CN104919400A (en) * | 2012-12-21 | 2015-09-16 | 苹果公司 | Computer keyboard key scan sharing matrix with independent LED for each key |
| CN203894703U (en) * | 2014-05-12 | 2014-10-22 | 张文嵛 | Computer keyboard |
| CN204884969U (en) * | 2015-07-20 | 2015-12-16 | 华硕电脑股份有限公司 | Luminous keyboard device |
| CN105306070A (en) * | 2015-10-26 | 2016-02-03 | 潘国新 | Scanning driving method for computer keyboard |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106876203A (en) * | 2017-03-09 | 2017-06-20 | 联想(北京)有限公司 | A kind of method of keyboard, electronic equipment and manufacture keyboard |
| CN112650396A (en) * | 2020-12-16 | 2021-04-13 | 上海闻泰信息技术有限公司 | Projection keyboard system |
| TWI901523B (en) * | 2025-02-18 | 2025-10-11 | 精元電腦股份有限公司 | Keyboard circuit with both anti-ghosting and luminous functions |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106200999B (en) | 2019-02-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109817155B (en) | Driving device for driving display panel | |
| US20100321214A1 (en) | Touch sensing method for resistive type touch apparatus | |
| US10984693B2 (en) | Display device and shutdown control method thereof | |
| US20110316725A1 (en) | Scanning circuit and method for keyboard | |
| CN106200999A (en) | Keyboard | |
| TW202046284A (en) | Driving circuit for gamma voltage generator and gamma voltage generator using the same | |
| TW201715357A (en) | Touch display panel and associated driving circuit and driving method | |
| US20120056544A1 (en) | Apparatus for driving light emitting device | |
| TWI510969B (en) | Input device and control unit | |
| TWI567590B (en) | keyboard | |
| US20110025644A1 (en) | Touch Control Apparatus, Associated Sensing Control Apparatus and Method Thereof | |
| US10269299B2 (en) | Display device and method for obtaining a data voltage to be output to rows of pixel circuits | |
| US9612682B2 (en) | Touch panel and method for detecting the same | |
| TW201500751A (en) | Keyboard circuit | |
| US11164507B2 (en) | Electronic device for driving display panel and operation method thereof | |
| US20130050083A1 (en) | Human interface device | |
| TWI637300B (en) | In-cell touch and display apparatus, common voltage provider, and providing method thereof | |
| CN105306070A (en) | Scanning driving method for computer keyboard | |
| TWI612443B (en) | Keyboard apparatus | |
| US20130257633A1 (en) | Method for keyboard scanning and a keyboard applying the same | |
| GB2265239A (en) | Analogue switch circuit | |
| TW201503677A (en) | Video output system with load detection device and detection method of the same | |
| US10817075B2 (en) | Keyboard control system and computer input system allowing a single pin to correspond to a single key when pressed on the keyboard key | |
| CN106027067B (en) | Key-press matrix | |
| TWI898890B (en) | Safety detection method for use in display device and related touch control circuit and touch and display driver integration |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |