cnkiw 2008-6-12 14:16
基于单片机的汉字输入法的实现
摘要:在需要实时大量输入汉字的显示控制处理应用中,利用传统单片机实现显示控制的设计方
法是较难实现的。带汉字字库的液晶模块的使用使得小容量ROM单片机的大量汉字信息输入与
显示成为可能。提出了针对汉字字库编码的二级索引拼音输入检索方法,介绍了以ST7920作为控
制器的带汉字字库的液晶显示模块的接口方法及汉字显示和控制原理,给出了通用计算机健盘在
单片机中的串行接口,采用该技术可大大增强单片机的汉字输入功能。为小容量ROM单片机的大
批量汉字信息处理提供了一种汉字输入解决方案。
关键词:ST7920; PS/2接口;单片机;汉字输入
Realization of Chinese characters input method based on
embedded system
LIU Jin勺un, GAO Mei-zhen
(Department of Computer Science,Hubei Normal University, Huangshi 435002, China)
Abstract:It is difficult to realize Chinese characters input method based on the embedded system by
using the traditional design method of display control. It is possible to input and display Chinese char-
acters based on the embedded system with the ROM of small content by using the LCD module with
Chinese characters.Chinese characters input method of the quadric index recall in allusion to Chinese
characters code is brought forward.The interface and the principle of Chinese characters display control
based on the LCD module controlled with the ST7920 is introduced too.The serial interface of the com-
puter keyboard in common use and the embedded system is given at the same time. It can enhance the
embedded system function of Chinese characters input by using this technology, and provide a kind of
Chinese characters input scheme for the embedded system with small capacity ROM.
Key words: ST7920; PS/2 interface;embedded system; Chinese characters input
1引言
随着单片机与嵌人式系统在我国使用的日益
普及,单片机上使用汉字的要求也更加突出,这就涉
及到单片机上汉字的显示与输人问题。由于单片机
的输人输出端口非常有限,所以单片机系统所用键
盘电路中的按键数目是非常有限的,一般为16个,
这就限制了单片机系统中大量信息的输人。通过PC
机键盘与单片机的接口,很好地解决了上面的问
题,可以做到像在PC机一样,任意输人大批量的汉
字数据。
采用PS/2协议的PC机键盘与51单片机连接,
使得通过键盘可以实现多种符号、数字的输人,还
可以输人中文汉字,本系统采用拼音输人法,将与
拼音对应的汉字在LCD上显示输出。由于每个汉字
机内的点阵码要占32字节,8912个常用汉字的点
阵码要占约256 KB的空间,所以将点阵信息直接
存储在小容量ROM单片机(如51单片机)中不太
现实,如果使用汉字字模的片外存储器件,又会使
电路变得较为复杂,这里采用带汉字库的内置