嵌入式课程设计电子词典硬件设计————————————————————————————————作者:————————————————————————————————日期:上海电力学院嵌入式系统课程设计报告题目:电子词典的设计姓名:学号:院系:专业年级:同组成员:年月日一、实验内容及要求在LCD屏幕左侧绘制出单词输入框和释义显示框以及一个搜索键,右侧绘制4*4键盘按钮,模拟出简易电子词典的功能,按钮操作用触摸屏或键盘实现均可。
实现功能:(1)LCD屏幕上显示4*4键盘,显示单词及其翻译、例句。
(2)一个键可完成2个英文字母的输入,如左上角第一个键可实现输入a,b两个字母,第一次按下时为输入a,如果需输入b,只需连续快速按键两次即可。
(3)在输入完单词后,点击搜索键,即可在释义显示框中显示该单词的词性、中文解释、示例词组和句子等。
(4)当发现输入的单词在库中不存在时,可实现将该单词添加入库的操作。
二、设计思路(1)通过LCD显示模块画出电子词典操作界面。
(2)对应界面中各键的位置设置键盘对应键值。
(3)设定功能键,实现以下3个功能:①退格键:删除最后一位字母;②搜索∕保存键:对输入框的单词进行判断,若单词存在于词库中,则显示单词词性、词义、例句;若单词不存在则自动进行保存;③转换键:按下后,字母键输出对应的第二个字母。
(4)按键后赋值并显示。
三、软件构架开LCD模块键盘结四、模块分析(1)键盘模块流程图:源代码:/********************************************************************************************** File : keyboard.c* Author: embest* Desc : keyboard source code* History:*********************************************************************************************//*--- include files ---*/ 开键盘初始键盘是Y 读取是否是功Y N 执行赋显结束 N#include "44b.h"#include "44blib.h"#include "def.h"#include "keyboard.h"#include "lcd.h"#include "dict.h"#ifndef KEY_INT#define KEY_INT#endif#ifndef BUT_INT#define BUT_INT#endif/*--- global variables ---*/int input_char,n=0;char word[20];int wordIndex=0;int x = 15;int num=0;int counter=0;/* keyboard control address */volatile UCHAR *keyboard_base = (UCHAR *)0x06000000;/*--- function declare ---*/void init_keyboard();void close_keyboard();void KeyboardInt(void);// __attribute__ ((interrupt ("IRQ")));void Eint4567Isr(void);// __attribute__ ((interrupt ("IRQ")));/*--- function code ---*//****************************************************************************** **************** name: Test_Keyboard* func: test keyboard* para: none* ret: none* modify:* comment:******************************************************************************* *************/void Test_Keyboard(){Uart_Printf("\n Keyboard Test Example\n");Uart_Printf("\n Please press one key on keyboard and look at LED ...\n");// init keyboardinit_keyboard();while(1);// close keyboard// close_keyboard();}/****************************************************************************** **************** name: init_keyboard* func: init keyboard interrupt* para: none* ret: none* modify:* comment:******************************************************************************* *************/extern void isrEINT1(void);extern void isrEint4567(void);void init_keyboard(){/* enable interrupt */rINTMOD = 0x0;rINTCON = 0x1;/* set EINT1 interrupt handler */rINTMSK =~(BIT_GLOBAL|BIT_EINT1|BIT_EINT4567);pISR_EINT1 = (int)isrEINT1;pISR_EINT4567 = (int)isrEint4567;/* PORT G */rPCONG = 0xffff; // EINT7~0rPUPG = 0x0; // pull up enablerEXTINT = rEXTINT|0x20; // EINT1 falling edge moderI_ISPC = BIT_EINT1|BIT_EINT4567; // clear pending bitrEXTINTPND = 0xf; // clear EXTINTPND reg}/****************************************************************************** **************** name: close_keyboard* func: close keyboard interrupt* para: none* ret: none* modify:* comment:******************************************************************************* *************/void close_keyboard(){pISR_EINT1 = NULL;pISR_EINT4567 = NULL;/* Mask interrupt */rINTMSK = rINTMSK | BIT_EINT1 | BIT_EINT4567;}/****************************************************************************** **************** name: KeyboardInt* func: keyboard interrupt handler function* para: none* ret: none* modify:* comment:******************************************************************************* *************/void KeyboardInt(void){int nTemp,i,j,k,m=0;char bbyte;rI_ISPC = BIT_EINT1; // clear pending bitchar pbyte[10];nTemp = key_read();if(nTemp > -1){// Lcd_Draw_HLine(10, 310, 80, WHITE, 50);input_char = nTemp;Lcd_DspAscII8x16(15,45,WHITE,word);switch(input_char){case 0:num=1;break;case 1:num=2;break;case 2:num=3;break;case 3:num=4;break;case 4:num=5;break;case 5:num=6;break;case 6:num=7;break;case 7:num=8;break;case 8:num=9;break;case 9:counter=1;break;case 10:counter=2;break;case 11:counter=3;break;case 12:m=1;Lcd_Draw_HLine(15+n-10, 15+n, 45, WHITE, 16); n-=10;word[wordIndex]='\0';wordIndex--;break;/*if(n==0){word[20]=0;wordIndex=0;Lcd_Draw_HLine(10, 310,85, WHITE, 160);}break;*/case 13:word[wordIndex]='\0';wordIndex=0;for(i=0;i<20;i++){if(strcmp(word,vocab[i].c)==0){j=0;k=i;break;}elsej=1;}if(j==0){//#ifdef Eng_vLcd_DspAscII8x16(15,40,BLUE,vocab[k].c);Lcd_DspAscII8x16(15,60,BLUE,vocab[k].d);Lcd_DspAscII8x16(15,80,BLUE,vocab[k].f);//#elseLcd_DspHz16(15,100,BLUE,vocab[k].e);//#endif}else{Lcd_DspHz16(15,120,BLUE,"未找到相应的单词");DelayMs(600);Lcd_DspHz16(15,120,WHITE,"未找到相应的单词"); }break;case 14:word[wordIndex]='\0';wordIndex=0;for(i=0;i<20;i++){if(strcmp(word,vocab[i].c)==0){j=0;k=i;break;}elsej=1;}if(j==0){//#ifdef Eng_vLcd_DspAscII8x16(15,40,BLUE,vocab[k].c);Lcd_DspAscII8x16(15,60,BLUE,vocab[k].d);Lcd_DspAscII8x16(15,80,BLUE,vocab[k].f);//#elseLcd_DspHz16(15,100,BLUE,vocab[k].e);//#endif}else{if(20>x>0){for(i = 0; i < 20; i++)vocab[x].c[i]=word[i];word[i]='\0';Lcd_DspAscII8x16(15,40,BLUE,vocab[x].c);x++;}elsex=15;//Lcd_DspAscII8x16(15,45,BLUE,word);for(i = 0; i < 20; i++)word[i]='\0';}break;case 15://Lcd_Draw_Box(10,40,310,80,GREEN);break;}if(num!=0&&counter!=0){switch(3*(num-1)+counter-1){case 0:bbyte='a';break;case 1:bbyte='b';break;case 2:bbyte='c';break;case 3:bbyte='d';break;case 4:bbyte='e';break;case 5:bbyte='f';break;case 6:bbyte='g';break;case 7:bbyte='h';break;case 8:bbyte='i';break;case 9:bbyte='j';break;case 10:bbyte='k';break;case 11:bbyte='l';break;case 12:bbyte='m';break;case 13:bbyte='n';break;case 14:bbyte='o';break;case 15:bbyte='p';break;case 16:bbyte='q';break;case 17:bbyte='r';break;case 18:bbyte='s';break;case 19:bbyte='t';break;case 20:bbyte='u';break;case 21:bbyte='v';break;case 22:bbyte='w';break;case 23:bbyte='x';break;case 24:bbyte='y';break;case 25:bbyte='z';break;case 26:bbyte='y';break;}num=0;counter=0;if(m==0){word[wordIndex]=bbyte; wordIndex++;//n+=10;}Lcd_DspAscII8x16(15,210,BLUE,word);// Uart_Printf("Key is:%x \r",input_char);}}/****************************************************************************** **************** name: key_read* func: read key value* para: none* ret: key value, -1 -- error* modify:* comment:******************************************************************************* *************/inline int key_read(){int value;char temp;/* read line 1 */temp = *(keyboard_base+0xfd);/* not 0xF mean key down */if(( temp & KEY_V ALUE_MASK) != KEY_V ALUE_MASK){if( (temp&0x1) == 0 )value = 3;else if( (temp&0x2) == 0 )value = 2;else if( (temp&0x4) == 0 )value = 1;else if( (temp&0x8) == 0 )value = 0;while(( temp & KEY_V ALUE_MASK) != KEY_V ALUE_MASK) // releasetemp = *(keyboard_base+0xfd);return value;}/* read line 2 */temp = *(keyboard_base+0xfb);/* not 0xF mean key down */if(( temp & KEY_V ALUE_MASK) != KEY_V ALUE_MASK){if( (temp&0x1) == 0 )value = 7;else if( (temp&0x2) == 0 )value = 6;else if( (temp&0x4) == 0 )value = 5;else if( (temp&0x8) == 0 )value = 4;while(( temp & KEY_V ALUE_MASK) != KEY_V ALUE_MASK) // release temp = *(keyboard_base+0xfb);return value;}/* read line 3 */temp = *(keyboard_base+0xf7);/* not 0xF mean key down */if(( temp & KEY_V ALUE_MASK) != KEY_V ALUE_MASK){if( (temp&0x1) == 0 )value = 0xb;else if( (temp&0x2) == 0 )value = 0xa;else if( (temp&0x4) == 0 )value = 9;else if( (temp&0x8) == 0 )value = 8;while(( temp & KEY_V ALUE_MASK) != KEY_V ALUE_MASK) // release temp = *(keyboard_base+0xf7);return value;}/* read line 4 */temp = *(keyboard_base+0xef);/* not 0xF mean key down */if(( temp & KEY_V ALUE_MASK) != KEY_V ALUE_MASK){if( (temp&0x1) == 0 )value = 0xf;else if( (temp&0x2) == 0 )value = 0xe;else if( (temp&0x4) == 0 )value = 0xd;else if( (temp&0x8) == 0 )value = 0xc;while(( temp & KEY_V ALUE_MASK) != KEY_V ALUE_MASK) // releasetemp = *(keyboard_base+0xef);return value;}return -1;}/****************************************************************************** **************** name: Eint4567Isr* func:* para: none* ret: none* modify:* comment:******************************************************************************* **************/void Eint4567Isr(void){unsigned char which_int;Uart_Printf("\n SB2 or SB3 had pressed and light LED.");which_int=rEXTINTPND;rEXTINTPND=0xf; //clear EXTINTPND reg.rI_ISPC=BIT_EINT4567; //clear pending_bitif(which_int == 4) // SB2{Led_Display(0x0);Led_Display(0x1);}else if(which_int == 8) // SB3{Led_Display(0x0);Led_Display(0x2);}}(2)LCD模块流程图:开LCD初显示开机显示操作结束源代码:/****************************************************************************** **************** File:lcd.c* Author: embest* Desc: LCD control and display functions* History:******************************************************************************* **************//*--- include files ---*/#include "lcd.h"//#include "bmp.h"#include "44b.h"/*--- global variables ---*/INT32U aLcdActiveBuffer[LCD_YSIZE][LCD_XSIZE/4];/*--- extern variables ---*/extern const INT8U aucTempBitmap[][76800];/*--- function code ---*//****************************************************************************** **************** name: Lcd_Init()* func: Initialize LCD Controller* para: none* ret: none* modify:* comment:******************************************************************************* **************/void Lcd_Init (void){rDITHMODE=0x12210;rDP1_2 =0xa5a5;rDP4_7 =0xba5da65;rDP3_5 =0xa5a5f;rDP2_3 =0xd6b;rDP5_7 =0xeb7b5ed;rDP3_4 =0x7dbe;rDP4_5 =0x7ebdf;rDP6_7 =0x7fdfbfe;// disable,8B_SNGL_SCAN,WDL Y=16clk,WLH=16clk,rLCDCON1=(0x0)|(2<<5)|(MV AL_USED<<7)|(0x3<<8)|(0x3<<10)|(CLKVAL_COLOR<< 12);// LINEBLANK=10 (without any calculation)rLCDCON2=(LINEV AL)|(HOZV AL_COLOR<<10)|(10<<21);rLCDCON3=0;// 256-color, LCDBANK, LCDBASEUrLCDSADDR1= (0x3<<27) | ( ((unsigned int)aLcdActiveBuffer>>22)<<21 ) | M5D((unsigned int)aLcdActiveBuffer>>1);rLCDSADDR2= M5D((((unsigned int)aLcdActiveBuffer+(SCR_XSIZE*LCD_YSIZE))>>1)) | (MV AL<<21);rLCDSADDR3= (LCD_XSIZE/2) | ( ((SCR_XSIZE-LCD_XSIZE)/2)<<9 );//The following value has to be changed for better display.rREDLUT =0xfdb96420; // 1111 1101 1011 1001 0110 0100 0010 0000rGREENLUT=0xfdb96420; // 1111 1101 1011 1001 0110 0100 0010 0000rBLUELUT =0xfb40; // 1111 1011 0100 0000rLCDCON1=(0x1)|(2<<5)|(MV AL_USED<<7)|(0x3<<8)|(0x3<<10)|(CLKVAL_COLOR<< 12);// rPDATE=rPDATE&0x0e;rPDATE=0xfe;Lcd_Clr();}/****************************************************************************** **************** name: Lcd_Clr()* func: clear LCD screen* para: none* ret: none* modify:* comment:******************************************************************************* **************/void Lcd_Clr(void){INT32U i;INT32U *pDisp = (INT32U*)aLcdActiveBuffer;for (i = 0; i < (SCR_XSIZE * SCR_YSIZE / 4); i++){*pDisp++ = ALLWHITE;}}/****************************************************************************** **************** name: LcdClrRect()* func: fill appointed area with appointed color* para: usLeft,usTop,usRight,usBottom -- area's rectangle acme coordinate* ucColor -- appointed color value* ret: none* modify:* comment: also as clear screen function******************************************************************************* **************/void LcdClrRect(INT16 usLeft, INT16 usTop, INT16 usRight, INT16 usBottom, INT8U ucColor) {INT32U i, j;INT8U *pDisp = (INT8U*)aLcdActiveBuffer;for(i=usTop;i<=usBottom;i++){for(j=usLeft;j<=usRight;j++){LCD_PutPixel(j, i, ucColor);}}}#ifdef MON_LCD/****************************************************************************** **************** name: LcdClrRect()* func: fill appointed area with appointed color* para: usLeft,usTop,usRight,usBottom -- area's rectangle acme coordinate* ucColor -- appointed color value* ret: none* modify:* comment: also as clear screen function******************************************************************************* **************/void LcdClrRect(INT16 usLeft, INT16 usTop, INT16 usRight, INT16 usBottom, INT8U ucColor) {INT16 i=0;INT16 k,l;INT16 m;INT32U ulColor = (ucColor << 28) | (ucColor << 24) | (ucColor << 20) | (ucColor << 16) |(ucColor << 12) | (ucColor << 8) | (ucColor << 4) | ucColor;if((usRight-usLeft)<=8){for(i=usTop;i<=usBottom;i++){for(m=usLeft;m<=usRight;m++){LCD_PutPixel(m, i, ucColor);}}return;}if((usLeft%8)==0)k=usLeft;else{k=(usLeft/8)*8+8;}if(( usRight%8)==0)l= usRight;else{l=( usRight/8)*8;}for(i=usTop;i<=usBottom;i++){for(m=usLeft;m<=(k-1);m++){LCD_PutPixel(m, i, ucColor);}for(m=k;m<l;m+=8){(*(INT32U*)(aLcdActiveBuffer + i * SCR_XSIZE / 2 + m / 2)) = ulColor;}for(m=l;m<=usRight;m++){LCD_PutPixel(m, i, ucColor);}}}#endif/****************************************************************************** **************** name: Lcd_Draw_Box()* func: Draw rectangle with appointed color* para: usLeft,usTop,usRight,usBottom -- rectangle's acme coordinate* ucColor -- appointed color value* ret: none* modify:* comment:******************************************************************************* **************/void Lcd_Draw_Box(INT16 usLeft, INT16 usTop, INT16 usRight, INT16 usBottom, INT8UucColor){Lcd_Draw_HLine(usLeft, usRight, usTop, ucColor, 1);Lcd_Draw_HLine(usLeft, usRight, usBottom, ucColor, 1);Lcd_Draw_VLine(usTop, usBottom, usLeft, ucColor, 1);Lcd_Draw_VLine(usTop, usBottom, usRight, ucColor, 1);}/****************************************************************************** **************** name: Lcd_Draw_Line()* func: Draw line with appointed color* para: usX0,usY0 -- line's start point coordinate* usX1,usY1 -- line's end point coordinate* ucColor -- appointed color value* usWidth -- line's width* ret: none* modify:* comment:******************************************************************************* **************/void Lcd_Draw_Line(INT16 usX0, INT16 usY0, INT16 usX1, INT16 usY1, INT8U ucColor, INT16U usWidth){INT16 usDx;INT16 usDy;INT16 y_sign;INT16 x_sign;INT16 decision;INT16 wCurx, wCury, wNextx, wNexty, wpy, wpx;if( usY0 == usY1 ){Lcd_Draw_HLine (usX0, usX1, usY0, ucColor, usWidth);return;}if( usX0 == usX1 ){Lcd_Draw_VLine (usY0, usY1, usX0, ucColor, usWidth);return;}usDx = abs(usX0 - usX1);usDy = abs(usY0 - usY1);if( ((usDx >= usDy && (usX0 > usX1)) ||((usDy > usDx) && (usY0 > usY1))) ){GUISWAP(usX1, usX0);GUISWAP(usY1, usY0);}y_sign = (usY1 - usY0) / usDy;x_sign = (usX1 - usX0) / usDx;if( usDx >= usDy ){for( wCurx = usX0, wCury = usY0, wNextx = usX1,wNexty = usY1, decision = (usDx >> 1);wCurx <= wNextx; wCurx++, wNextx--, decision += usDy ) {if( decision >= usDx ){decision -= usDx;wCury += y_sign;wNexty -= y_sign;}for( wpy = wCury - usWidth / 2;wpy <= wCury + usWidth / 2; wpy++ ){LCD_PutPixel(wCurx, wpy, ucColor);}for( wpy = wNexty - usWidth / 2;wpy <= wNexty + usWidth / 2; wpy++ ){LCD_PutPixel(wNextx, wpy, ucColor);}}}else{for( wCurx = usX0, wCury = usY0, wNextx = usX1,wNexty = usY1, decision = (usDy >> 1);wCury <= wNexty; wCury++, wNexty--, decision += usDx ) {if( decision >= usDy ){decision -= usDy;wCurx += x_sign;wNextx -= x_sign;}for( wpx = wCurx - usWidth / 2;wpx <= wCurx + usWidth / 2; wpx++ ){LCD_PutPixel(wpx, wCury, ucColor);}for( wpx = wNextx - usWidth / 2;wpx <= wNextx + usWidth / 2; wpx++ ){LCD_PutPixel(wpx, wNexty, ucColor);}}}}/****************************************************************************** **************** name: Lcd_Draw_HLine()* func: Draw horizontal line with appointed color* para: usX0,usY0 -- line's start point coordinate* usX1 -- line's end point X-coordinate* ucColor -- appointed color value* usWidth -- line's width* ret: none* modify:* comment:******************************************************************************* **************/void Lcd_Draw_HLine(INT16 usX0, INT16 usX1, INT16 usY0, INT8U ucColor, INT16U usWidth){INT16 usLen;if( usX1 < usX0 ){GUISWAP (usX1, usX0);}while( (usWidth--) > 0 ){usLen = usX1 - usX0 + 1;while( (usLen--) > 0 ){LCD_PutPixel(usX0 + usLen, usY0, ucColor);}usY0++;}}/****************************************************************************** **************** name: Lcd_Draw_VLine()* func: Draw vertical line with appointed color* para: usX0,usY0 -- line's start point coordinate* usY1 -- line's end point Y-coordinate* ucColor -- appointed color value* usWidth -- line's width* ret: none* modify:* comment:******************************************************************************* **************/void Lcd_Draw_VLine (INT16 usY0, INT16 usY1, INT16 usX0, INT8U ucColor, INT16U usWidth){INT16 usLen;if( usY1 < usY0 ){GUISWAP (usY1, usY0);}while( (usWidth--) > 0 ){usLen = usY1 - usY0 + 1;while( (usLen--) > 0 ){LCD_PutPixel(usX0, usY0 + usLen, ucColor);}usX0++;}}/*--- extern variables ---*/extern INT8U g_auc_Ascii8x16[];/****************************************************************************** **************** name: Lcd_DspAscII8x16()* func: display 8x16 ASCII character string* para: usX0,usY0 -- ASCII character string's start point coordinate* ForeColor -- appointed color value* pucChar -- ASCII character string* ret: none* modify:* comment:******************************************************************************* **************/void Lcd_DspAscII8x16(INT16U x0, INT16U y0, INT8U ForeColor, INT8U * s){INT16 i,j,k,x,y,xx;INT8U qm;INT32U ulOffset;INT8 ywbuf[16],temp[2];for( i = 0; i < strlen((const char*)s); i++ ){if( (INT8U)*(s+i) >= 161 ){temp[0] = *(s + i);temp[1] = '\0';return;}else{qm = *(s+i);ulOffset = (INT32U)(qm) * 16; //Here to be changed tomorrowfor( j = 0; j < 16; j ++ ){ywbuf[j] = g_auc_Ascii8x16[ulOffset + j];}for( y = 0; y < 16; y++ ){for( x = 0; x < 8; x++ ){k = x % 8;if( ywbuf[y] & (0x80 >> k) ){xx = x0 + x + i*8;LCD_PutPixel(xx, y + y0, (INT8U)ForeColor);}}}}}}/*--- extern variables ---*/extern INT8U g_auc_Ascii6x8[];#define XWIDTH 6/****************************************************************************** **************** name: Lcd_DspAscII6x8()* func: display 6x8 ASCII character string* para: usX0,usY0 -- ASCII character string's start point coordinate* ForeColor -- appointed color value* pucChar -- ASCII character string* ret: none* modify:* comment:******************************************************************************* **************/void Lcd_DspAscII6x8(INT16U usX0, INT16U usY0,INT8U ForeColor, INT8U* pucChar) {INT32U i,j;INT8U ucTemp;while( *pucChar != 0 ){for( i=0; i < 8; i++ ){ucTemp = g_auc_Ascii6x8[(*pucChar) * 8 + i];for( j = 0; j < 8; j++ ){if( (ucTemp & (0x80 >> j)) != 0 ){LCD_PutPixel(usX0 + i, usY0 + 8 - j, (INT8U)ForeColor);}}}usX0 += XWIDTH;pucChar++;}}#ifndef Eng_v/****************************************************************************** **************** name: Lcd_DspHz16()* func: display chinese character string in 16x16 dot array* para: usX0,usY0 -- ASCII character string's start point coordinate* ForeColor -- appointed color value* pucChar -- ASCII character string* ret: none* modify:* comment:******************************************************************************* **************/extern const INT8U g_auc_HZK16[];void Lcd_DspHz16(INT16U x0, INT16U y0, INT8U ForeColor, INT8U *s){INT16 i,j,k,x,y,xx;INT8U qm,wm;INT32U ulOffset;INT8 hzbuf[32],temp[2];for( i = 0; i < strlen((const char*)s); i++ ){if( ((INT8U)(*(s+i))) < 161 ){temp[0] = *(s+i);temp[1] = '\0';break;}else{qm = *(s+i) - 161;wm = *(s + i + 1) - 161;ulOffset = (INT32U)(qm * 94 + wm) * 32;for( j = 0; j < 32; j ++ ){hzbuf[j] = g_auc_HZK16[ulOffset + j];}for( y = 0; y < 16; y++ ){for( x = 0; x < 16; x++ ){k = x % 8;if( hzbuf[y * 2 + x / 8] & (0x80 >> k) ){xx = x0 + x + i * 8;LCD_PutPixel( xx, y + y0, (INT8U)ForeColor);}}}i++;}}}#endif/****************************************************************************** **************** name: Lcd_Test()* func: LCD test function* para: none* ret: none* modify:* comment:******************************************************************************* **************/void Lcd_Test(void){int i, j;Uart_Printf("\n LCD display Test Example(please look at LCD screen)\n");/* initial LCD controller */Lcd_Init();/* clear screen */Lcd_Clr();/* draw rectangle pattern */#ifdef Eng_v // english versionLcd_DspAscII8x16(10,0,BLUE,"Embest S3CEV40");#elseLcd_DspAscII8x16(100, 50, RED, "2009073 20091989 ");Lcd_DspHz16(155, 70, RED, "马一鸣");Lcd_DspAscII8x16(100, 90, BLACK, "2009073 20091993 ");Lcd_DspHz16(155, 110, BLACK, "邓家坤");Lcd_DspAscII8x16(100, 130, BLUE, "2009073 20092022 ");Lcd_DspHz16(155, 150, BLUE, "蒋赵睿");DelayMs(500);Lcd_DspHz16( 100, 100, BLUE, "欢迎使用电子词典");Lcd_DspAscII8x16(100, 50, WHITE, "2009073 20091989 ");Lcd_DspHz16(155,70, WHITE, "马一鸣");Lcd_DspAscII8x16(100, 90, WHITE, "2009073 20091993 ");Lcd_DspHz16(155, 110, WHITE, "邓家坤");Lcd_DspAscII8x16(100, 130, WHITE, "2009073 20092022 ");Lcd_DspHz16(155, 150, WHITE, "蒋赵睿");DelayMs(500);Lcd_Clr();Lcd_DspHz16(15,15,BLUE,"电子词典");#endif//Lcd_DspAscII8x16(10,24,GREEN-55,"ShenZhen Embest Info&Tech Co.,LTD");Lcd_Draw_Box(5,30,115,180,GREEN);/*显示窗口*/Lcd_Draw_Box(5,190,75,230,GREEN);/*输入窗口*/Lcd_Draw_Box(75,190,115,230,GREEN);/*搜索键*/Lcd_Draw_Box(120,30,165,75,GREEN);/*abc*/Lcd_Draw_Box(170,30,215,75,GREEN);/*def*/Lcd_Draw_Box(220,30,265,75,GREEN);/*ghi*/Lcd_Draw_Box(270,30,315,75,GREEN);/*jkl*/Lcd_Draw_Box(120,80,165,125,GREEN);/*mno*/Lcd_Draw_Box(170,80,215,125,GREEN);/*pqr*/Lcd_Draw_Box(220,80,265,125,GREEN);/*stu*/Lcd_Draw_Box(270,80,315,125,GREEN);/*vwx*/Lcd_Draw_Box(120,130,165,175,GREEN);/*yz*/Lcd_Draw_Box(170,130,215,175,GREEN);/*选择1*/Lcd_Draw_Box(220,130,265,175,GREEN);/*选择2*/Lcd_Draw_Box(270,130,315,175,GREEN);/*选择3*/Lcd_Draw_Box(120,180,165,225,GREEN);/*back*/Lcd_Draw_Box(170,180,215,225,GREEN);/*ent*/Lcd_Draw_Box(220,180,265,225,GREEN);/*save*/Lcd_Draw_Box(270,180,315,225,GREEN);/* output ASCII symbol */Lcd_DspAscII6x8(90,210,BLACK,"scan");Lcd_DspAscII6x8(140,50,BLACK,"abc");Lcd_DspAscII6x8(190,50,BLACK,"def");Lcd_DspAscII6x8(240,50,BLACK,"ghi");Lcd_DspAscII6x8(290,50,BLACK,"jkl");Lcd_DspAscII6x8(140,100,BLACK,"mno");Lcd_DspAscII6x8(190,100,BLACK,"pqr");Lcd_DspAscII6x8(240,100,BLACK,"stu");Lcd_DspAscII6x8(290,100,BLACK,"vwx");Lcd_DspAscII6x8(140,150,BLACK,"yz");Lcd_DspAscII6x8(190,150,BLACK,"ch1");Lcd_DspAscII6x8(240,150,BLACK,"ch2");Lcd_DspAscII6x8(290,150,BLACK,"ch3");Lcd_DspAscII6x8(140,200,BLACK,"back");Lcd_DspAscII6x8(190,200,BLACK,"ent");Lcd_DspAscII6x8(240,200,BLACK,"save");Lcd_DspAscII6x8(290,200,BLACK," ");/*for (j = 0; j < 1000000 * 5; j++);while (1){for (i = 0; i < 5; i++){BitmapView320x240x256((INT8U*)(aucTempBitmap[i]));for (j = 0; j < 1000000 * 5; j++);}}*/}/****************************************************************************** **************** name: Lcd_Test_board()* func: LCD test function for board all test* para: none* ret: none* modify:* comment:******************************************************************************* **************/void Lcd_Test_board(void){int i, j;/* initial LCD controller */Lcd_Init();/* clear screen */Lcd_Clr();/* draw rectangle pattern */#ifdef Eng_v // english versionLcd_DspAscII8x16(10,0,BLUE,"Embest S3CEV40 ");#elseLcd_DspHz16(10,10,BLUE,"英蓓特三星实验平台");#endif。