资 源 简 介
Verilog HDL编写的键盘扫描程序,考虑了判断按键弹起的问题。程序按一定的频率用低电平循环扫描行线,同时检测列线的状态,一旦判断有一列为低则表示有键被按下,停止扫描并保持当前行线的状态,再读取列线的状态从而得到当前按键的键码;等待按键弹起:检测到各列线都变成高点平后,重新开始扫描过程,等待下一次按键。-Written in Verilog HDL keyboard scanner, taking into account to determine key bounce problem. Program according to a certain frequency of scan lines with low-level circulation lines, while testing out the state line, once the judge has said there is a classified as low-key is pressed, stop the scan and to maintain the current line-line state, and then read out line state to get the current keys key codes to wait for key pop-up: To detect the lines at all out into a high level after the re-start the scanning process, waiting for the next key.