用C51实现单片机的中文输入法.docx
《用C51实现单片机的中文输入法.docx》由会员分享,可在线阅读,更多相关《用C51实现单片机的中文输入法.docx(27页珍藏版)》请在冰豆网上搜索。
用C51实现单片机的中文输入法
用C51实现单片机的中文输入法
说明:
拼音输入法杳询函数:
unsigned char code * py_ime(unsigned char input_py_val[]);
input_py_val为已输入的拼音码字符串头指针,
反回值为中文的起始地址,当为0时,杳询失败
应用举例:
{
unsigned char input_string[]={"bang"};
unsigned char chines_string[100];
sprintf(chines_string,"%s",py_ime(input_string));
}
C51程序:
//"********************CCDC01采集器测试仪软件:
拼音输入法模块********************"
//"* 软件设计:
*"
//"* 日期:
2001/3 *"
//"* 编译环境:
Franklin 3.3.4 *"
//"******************************************************************************"
#include
#include
//"********************CCDC01采集器测试仪软件:
拼音输入法码表********************"
//"* 软件设计:
张 凯 *"
//"* 日期:
2001/3 *"
//"* 编译环境:
Franklin 3.3.4 *"
//"******************************************************************************"
//"拼音输入法汉字排列表"
unsigned char code PY_mb_a []={"阿啊"};
unsigned char code PY_mb_ai []={"哎哀唉埃挨皑癌矮蔼艾爱隘碍"};
unsigned char code PY_mb_an []={"安氨鞍俺岸按案胺暗"};
unsigned char code PY_mb_ang []={"肮昂盎"};
unsigned char code PY_mb_ao []={"凹敖熬翱袄傲奥澳懊"};
unsigned char code PY_mb_ba []={"八巴叭扒吧芭疤捌笆拔跋把靶坝爸罢霸"};
unsigned char code PY_mb_bai []={"白百佰柏摆败拜稗"};
unsigned char code PY_mb_ban []={"扳班般颁斑搬板版办半伴扮拌绊瓣"};
unsigned char code PY_mb_bang []={"邦帮梆绑榜膀蚌傍棒谤磅镑"};
unsigned char code PY_mb_bao []={"包苞胞褒雹宝饱保堡报抱豹鲍暴爆剥薄瀑"};
unsigned char code PY_mb_bei []={"卑杯悲碑北贝狈备背钡倍被惫焙辈"};
unsigned char code PY_mb_ben []={"奔本苯笨夯"};
unsigned char code PY_mb_beng []={"崩绷甭泵迸蹦"};
unsigned char code PY_mb_bi []={"逼鼻比彼笔鄙币必毕闭庇毖陛毙敝痹蓖弊碧蔽壁避臂"};
unsigned char code PY_mb_bian []={"边编鞭贬扁卞便变遍辨辩辫"};
unsigned char code PY_mb_biao []={"彪标膘表"};
unsigned char code PY_mb_bie []={"憋鳖别瘪"};
unsigned char code PY_mb_bin []={"宾彬斌滨濒摈"};
unsigned char code PY_mb_bing []={"冰兵丙秉柄炳饼并病"};
unsigned char code PY_mb_bo []={"拨波玻钵脖菠播伯驳帛泊勃铂舶博渤搏箔膊卜"};
unsigned char code PY_mb_bu []={"补哺捕不布步怖部埠簿"};
unsigned char code PY_mb_ca []={"擦"};
unsigned char code PY_mb_cai []={"猜才材财裁采彩睬踩菜蔡"};
unsigned char code PY_mb_can []={"参餐残蚕惭惨灿"};
unsigned char code PY_mb_cang []={"仓沧苍舱藏"};
unsigned char code PY_mb_cao []={"操糙曹槽草"};
unsigned char code PY_mb_ce []={"册侧厕测策"};
unsigned char code PY_mb_ceng []={"层蹭曾"};
unsigned char code PY_mb_cha []={"叉插查茬茶搽察碴岔诧差刹"};
unsigned char code PY_mb_chai []={"拆柴豺"};
unsigned char code PY_mb_chan []={"掺搀谗馋缠蝉产铲阐颤"};
unsigned char code PY_mb_chang []={"昌猖肠尝偿常厂场敞畅倡唱"};
unsigned char code PY_mb_chao []={"抄钞超巢朝嘲潮吵炒绰"};
unsigned char code PY_mb_che []={"车扯彻掣撤澈"};
unsigned char code PY_mb_chen []={"郴尘臣忱沉辰陈晨衬趁"};
unsigned char code PY_mb_cheng []={"称撑成呈承诚城乘惩程澄橙逞骋秤"};
unsigned char code PY_mb_chi []={"吃痴弛池驰迟持尺侈齿耻斥赤炽翅"};
unsigned char code PY_mb_chong []={"充冲虫崇宠"};
unsigned char code PY_mb_chou []={"抽仇绸畴愁稠筹酬踌丑瞅臭"};
unsigned char code PY_mb_chu []={"出初除厨滁锄雏橱躇础储楚处搐触矗畜"};
unsigned char code PY_mb_chuai []={"揣"};
unsigned char code PY_mb_chuan []={"川穿传船椽喘串"};
unsigned char code PY_mb_chuang[]={"闯疮窗床创"};
unsigned char code PY_mb_chui []={"吹炊垂捶锤"};
unsigned char code PY_mb_chun []={"春椿纯唇淳醇蠢"};
unsigned char code PY_mb_chuo []={"戳"};
unsigned char code PY_mb_ci []={"疵词茨瓷慈辞磁雌此次刺赐"};
unsigned char code PY_mb_cong []={"囱从匆葱聪丛"};
unsigned char code PY_mb_cou []={"凑"};
unsigned char code PY_mb_cu []={"粗促醋簇"};
unsigned char code PY_mb_cuan []={"蹿窜篡"};
unsigned char code PY_mb_cui []={"崔催摧脆淬瘁粹翠"};
unsigned char code PY_mb_cun []={"村存寸"};
unsigned char code PY_mb_cuo []={"搓磋撮挫措错"};
unsigned char code PY_mb_da []={"搭达答瘩打大"};
unsigned char code PY_mb_dai []={"呆歹傣代带待怠殆贷袋逮戴"};
unsigned char code PY_mb_dan []={"丹单担耽郸胆掸旦但诞弹惮淡蛋氮"};
unsigned char code PY_mb_dang []={"当挡党荡档"};
unsigned char code PY_mb_dao []={"刀导岛倒捣祷蹈到悼盗道稻"};
unsigned char code PY_mb_de []={"得德的"};
unsigned char code PY_mb_deng []={"灯登蹬等邓凳瞪"};
unsigned char code PY_mb_di []={"低堤滴狄迪敌涤笛嫡底抵地弟帝递第缔蒂"};
unsigned char code PY_mb_dian []={"掂滇颠典点碘电佃甸店垫惦淀奠殿靛"};
unsigned char code PY_mb_diao []={"刁叼凋碉雕吊钓掉"};
unsigned char code PY_mb_die []={"爹跌迭谍叠碟蝶"};
unsigned char code PY_mb_ding []={"丁叮盯钉顶鼎订定锭"};
unsigned char code PY_mb_diu []={"丢"};
unsigned char code PY_mb_dong []={"东冬董懂动冻侗恫栋洞"};
unsigned char code PY_mb_dou []={"都兜斗抖陡豆逗痘"};
unsigned char code PY_mb_du []={"督毒读犊独堵赌睹妒杜肚度渡镀"};
unsigned char code PY_mb_duan []={"端短段断缎锻"};
unsigned char code PY_mb_dui []={"堆队对兑"};
unsigned char code PY_mb_dun []={"吨敦墩蹲盾钝顿遁"};
unsigned char code PY_mb_duo []={"多哆夺掇朵垛躲剁堕舵惰跺"};
unsigned char code PY_mb_e []={"讹俄娥峨鹅蛾额厄扼恶饿鄂遏"};
unsigned char code PY_mb_en []={"恩"};
unsigned char code PY_mb_er []={"儿而尔耳洱饵二贰"};
unsigned char code PY_mb_fa []={"发乏伐罚阀筏法珐"};
unsigned char code PY_mb_fan []={"帆番翻藩凡矾钒烦樊繁反返犯泛饭范贩"};
unsigned char code PY_mb_fang []={"方坊芳防妨房肪仿访纺放"};
unsigned char code PY_mb_fei []={"飞非啡菲肥匪诽吠废沸肺费"};
unsigned char code PY_mb_fen []={"分吩纷芬氛酚坟汾焚粉份奋忿愤粪"};
unsigned char code PY_mb_feng []={"丰风枫封疯峰烽锋蜂冯逢缝讽凤奉"};
unsigned char code PY_mb_fo []={"佛"};
unsigned char code PY_mb_fou []={"否"};
unsigned char code PY_mb_fu []={"夫肤孵敷弗伏扶拂服俘氟浮涪符袱幅福辐抚甫府斧俯釜辅腑腐父讣付妇负附咐阜复赴副傅富赋缚腹覆"};
unsigned char code PY_mb_ga []={"嘎噶"};
unsigned char code PY_mb_gai []={"该改钙盖溉概"};
unsigned char code PY_mb_gan []={"干甘杆肝柑竿秆赶敢感赣"};
unsigned char code PY_mb_gang []={"冈刚岗纲肛缸钢港杠"};
unsigned char code PY_mb_gao []={"皋羔高膏篙糕搞稿镐告"};
unsigned char code PY_mb_ge []={"戈疙哥胳鸽割搁歌阁革格葛隔个各铬咯"};
unsigned char code PY_mb_gei []={"给"};
unsigned char code PY_mb_gen []={"根跟"};
unsigned char code PY_mb_geng []={"更庚耕羹埂耿梗"};
unsigned char code PY_mb_gong []={"工弓公功攻供宫恭躬龚巩汞拱共贡"};
unsigned char code PY_mb_gou []={"勾沟钩狗苟构购垢够"};
unsigned char code PY_mb_gu []={"估咕姑孤沽菇辜箍古谷股骨蛊鼓固故顾雇"};
unsigned char code PY_mb_gua []={"瓜刮剐寡挂褂"};
unsigned char code PY_mb_guai []={"乖拐怪"};
unsigned char code PY_mb_guan []={"关观官冠棺馆管贯惯灌罐"};
unsigned char code PY_mb_guang []={"光广逛"};
unsigned char code PY_mb_gui []={"归圭龟规闺硅瑰轨诡癸鬼刽柜贵桂跪"};
unsigned char code PY_mb_gun []={"辊滚棍"};
unsigned char code PY_mb_guo []={"郭锅国果裹过"};
unsigned char code PY_mb_ha []={"蛤哈"};
unsigned char code PY_mb_hai []={"孩骸海亥骇害氦"};
unsigned char code PY_mb_han []={"酣憨含邯函涵寒韩罕喊汉汗旱悍捍焊憾撼翰"};
unsigned char code PY_mb_hang []={"杭航行"};
unsigned char code PY_mb_hao []={"毫豪嚎壕好郝号浩耗"};
unsigned char code PY_mb_he []={"呵喝禾合何和河阂核荷涸盒菏贺褐赫鹤"};
unsigned char code PY_mb_hei []={"黑嘿"};
unsigned char code PY_mb_hen []={"痕很狠恨"};
unsigned char code PY_mb_heng []={"亨哼恒横衡"};
unsigned char code PY_mb_hong []={"轰哄烘弘红宏洪虹鸿"};
unsigned char code PY_mb_hou []={"侯喉猴吼后厚候"};
unsigned char code PY_mb_hu []={"乎呼忽弧狐胡壶湖葫瑚糊蝴虎唬互户护沪"};
unsigned char code PY_mb_hua []={"花华哗滑猾化划画话"};
unsigned char code PY_mb_huai []={"怀徊淮槐坏"};
unsigned char code PY_mb_huan []={"欢还环桓缓幻宦唤换涣患焕痪豢"};
unsigned char code PY_mb_huang []={"荒慌皇凰黄惶煌蝗磺簧恍晃谎幌"};
unsigned char code PY_mb_hui []={"灰恢挥辉徽回蛔悔卉汇会讳绘诲烩贿晦秽惠毁慧"};
unsigned char code PY_mb_hun []={"昏荤婚浑魂混"};
unsigned char code PY_mb_huo []={"豁活火伙或货获祸惑霍"};
unsigned char code PY_mb_ji []={"讥击饥圾机肌鸡迹姬积基绩缉畸箕稽激及吉汲级即极急疾棘集嫉辑籍几己挤脊计记伎纪妓忌技际剂季既济继寂寄悸祭蓟冀藉"};
unsigned char code PY_mb_jia []={"加夹佳枷家嘉荚颊甲贾钾价驾架假嫁稼挟"};
unsigned char code PY_mb_jian []={"奸尖坚歼间肩艰兼监笺缄煎拣俭柬茧捡减剪检硷简碱见件建饯剑荐贱健涧舰渐溅践鉴键箭"};
unsigned char code PY_mb_jiang []={"江姜将浆僵疆讲奖桨蒋匠降酱"};
unsigned char code PY_mb_jiao []={"交郊娇浇骄胶椒焦蕉礁角狡绞饺矫脚铰搅剿缴叫轿较教窖酵觉嚼"};
unsigned char code PY_mb_jie []={"阶皆接秸揭街节劫杰洁结捷睫截竭姐解介戒芥届界疥诫借"};
unsigned char code PY_mb_jin []={"巾今斤金津筋襟仅紧谨锦尽劲近进晋浸烬禁靳"};
unsigned char code PY_mb_jing []={"京经茎荆惊晶睛粳兢精鲸井颈景警净径痉竞竟敬靖境静镜"};
unsigned char code PY_mb_jiong []={"炯窘"};
unsigned char code PY_mb_jiu []={"纠究揪九久灸玖韭酒旧臼咎疚厩救就舅"};
unsigned char code PY_mb_ju []={"居拘狙驹疽鞠局桔菊咀沮举矩句巨拒具炬俱剧惧据距锯聚踞"};
unsigned char code PY_mb_juan []={"娟捐鹃卷倦绢眷"};
unsigned char code PY_mb_jue []={"撅决诀抉绝倔掘爵攫"};
unsigned char code PY_mb_jun []={"军君均钧菌俊郡峻浚骏竣"};
unsigned char code PY_mb_ka []={"咖喀卡"};
unsigned char code PY_mb_kai []={"开揩凯慨楷"};
unsigned char code PY_mb_kan []={"槛刊勘堪坎砍看"};
unsigned char code PY_mb_kang []={"康慷糠扛亢抗炕"};
unsigned char code PY_mb_kao []={"考拷烤靠"};
unsigned char code PY_mb_ke []={"坷苛柯科棵颗磕壳咳可渴克刻客课"};
unsigned char code PY_mb_ken []={"肯垦恳啃"};
unsigned char code PY_mb_keng []={"吭坑"};
unsigned char code PY_mb_kong []={"空孔恐控"};
unsigned char code PY_mb_kou []={"抠口扣寇"};
unsigned char code PY_mb_ku []={"枯哭窟苦库裤酷"};
unsigned char code PY_mb_kua []={"夸垮挎胯跨"};
unsigned char code PY_mb_kuai []={"块快侩筷"};
unsigned char code PY_mb_kuan []={"宽款"};
unsigned char code PY_mb_kuang []={"匡筐狂况旷矿框眶"};
unsigned char code PY_mb_kui []={"亏岿盔窥奎葵魁傀愧溃馈"};
unsigned char code PY_mb_kun []={"坤昆捆困"};
unsigned char code PY_mb_kuo []={"扩括阔廓"};
unsigned char code PY_mb_la []={"垃拉啦喇腊蜡辣"};
unsigned char code PY_mb_lai []={"来莱赖"};
unsigned char code PY_mb_lan []={"兰拦栏婪阑蓝谰澜篮览揽缆懒烂滥"};
unsigned char code PY_mb_lang []={"郎狼廊琅榔朗浪"};
unsigned char code PY_mb_lao []={"捞劳牢老佬姥涝烙酪"};
unsigned char code PY_mb_le []={"乐勒了"};
unsigned char code PY_mb_lei []={"雷镭垒磊蕾儡肋泪类累擂"};
unsigned char code PY_mb_leng []={"棱楞冷"};
unsigned char code PY_mb_li []={"厘梨狸离莉犁漓璃黎篱礼李里哩理鲤力历厉立吏丽利励沥例隶俐荔栗砾粒傈痢"};
unsigned char code PY_mb_lian []={"连帘怜涟莲联廉镰敛脸练炼恋链"};
unsigned char code PY_mb_liang []={"俩良凉梁粮粱两亮谅辆晾量"};
unsigned char code PY_mb_liao []={"潦辽疗聊僚寥廖撩燎镣料撂"};
unsigned char code PY_mb_lie []={"列劣烈猎裂"};
unsigned char code PY_mb_lin []={"邻林临淋琳霖磷鳞凛吝赁拎"};
unsigned char code PY_mb_ling []={"伶灵岭玲凌铃陵羚菱零龄领令另"};
unsigned char code PY_mb_liu []={"溜刘流留琉硫馏榴瘤柳六"};
unsigned char code PY_mb_long []={"龙咙笼聋隆窿陇垄拢"};
unsigned char code PY_mb_lou []={"娄楼搂篓陋漏"};
unsigned char code PY_mb_lu []={"露卢庐芦炉颅卤虏掳鲁陆录赂鹿禄碌路戮潞麓"};
unsigned char code PY_mb_luan []={"孪峦挛滦卵乱"};
unsigned char code PY_mb_lue []={"掠略"};
unsigned char code PY_mb_lun []={"抡仑伦沦纶轮论"};
unsigned char code PY_mb_luo []={"罗萝逻锣箩骡螺裸洛络骆落"};
unsigned char code PY_mb_lv []={"滤驴吕侣旅铝屡缕履律虑率绿氯"};
unsigned char code PY_mb_ma []={"妈麻马玛码蚂骂吗嘛"};
unsigned char code PY_mb_mai []={"埋买迈麦卖脉"};
unsigned char code PY_mb_man []={"蛮馒瞒满曼谩慢漫蔓"};
unsigned char code PY_mb_mang []={"忙芒盲茫莽氓"};