freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

word版可編輯-嵌入式課程設(shè)計電子詞典硬件設(shè)計精心整理doc-展示頁

2025-07-24 12:09本頁面
  

【正文】 num=7。 case 5: num=6。 case 4: num=5。 case 3: num=4。 case 2: num=3。 case 1: num=2。 switch(input_char) { case 0: num=1。 input_char = nTemp。 nTemp = key_read()。 rI_ISPC = BIT_EINT1。}/********************************************************************************************** name: KeyboardInt* func: keyboard interrupt handler function* para: none* ret: none* modify:* ment: ********************************************************************************************/void KeyboardInt(void){ int nTemp,i,j,k,m=0。 pISR_EINT4567 = NULL。 // clear pending bit rEXTINTPND = 0xf。 // pull up enable rEXTINT = rEXTINT|0x20。 /* PORT G */ rPCONG = 0xffff。 pISR_EINT1 = (int)isrEINT1。 rINTCON = 0x1。extern void isrEint4567(void)。 // close keyboard // close_keyboard()。 // init keyboard init_keyboard()。/* function code *//********************************************************************************************** name: Test_Keyboard* func: test keyboard* para: none* ret: none* modify:* ment: ********************************************************************************************/void Test_Keyboard(){ Uart_Printf(\n Keyboard Test Example\n)。void Eint4567Isr(void)。void KeyboardInt(void)。/* function declare */void init_keyboard()。int counter=0。int x = 15。char word[20]。(4)按鍵后賦值并顯示。(2)對應(yīng)界面中各鍵的位置設(shè)置鍵盤對應(yīng)鍵值。(4)當發(fā)現(xiàn)輸入的單詞在庫中不存在時,可實現(xiàn)將該單詞添加入庫的操作。(2)一個鍵可完成2個英文字母的輸入,如左上角第一個鍵可實現(xiàn)輸入a,b兩個字母,第一次按下時為輸入a,如果需輸入b,只需連續(xù)快速按鍵兩次即可。上海電力學院嵌入式系統(tǒng)課程設(shè)計報告題  目: 電子詞典的設(shè)計 姓 名: 學 號: 院  系:    專業(yè)年級:  同組成員:  年 月 日一、實驗內(nèi)容及要求在LCD屏幕左側(cè)繪制出單詞輸入框和釋義顯示框以及一個搜索鍵,右側(cè)繪制4*4鍵盤按鈕,模擬出簡易電子詞典的功能,按鈕操作用觸摸屏或鍵盤實現(xiàn)均可。實現(xiàn)功能:(1)LCD屏幕上顯示4*4鍵盤,顯示單詞及其翻譯、例句。(3)在輸入完單詞后,點擊搜索鍵,即可在釋義顯示框中顯示該單詞的詞性、中文解釋、示例詞組和句子等。二、設(shè)計思路(1)通過LCD顯示模塊畫出電子詞典操作界面。(3)設(shè)定功能鍵,實現(xiàn)以下3個功能:①退格鍵:刪除最后一位字母;②搜索∕保存鍵:對輸入框的單詞進行判斷,若單詞存在于詞庫中,則顯示單詞詞性、詞義、例句;若單詞不存在則自動進行保存;③轉(zhuǎn)換鍵:按下后,字母鍵輸出對應(yīng)的第二個字母。三、軟件構(gòu)架開始LCD模塊鍵盤模塊結(jié)束四、模塊分析(1)鍵盤模塊流程圖:開始鍵盤初始化鍵盤是否按下Y讀取鍵值是否是功能鍵YN執(zhí)行功能賦值顯示結(jié)束N源代碼:/********************************************************************************************** File: * Author: embest* Desc: keyboard source code* History: *********************************************************************************************//* include files */include include include include include include ifndef KEY_INTdefine KEY_INTendififndef BUT_INTdefine BUT_INTendif/* global variables */int input_char,n=0。int wordIndex=0。int num=0。/* keyboard control address */volatile UCHAR *keyboard_base = (UCHAR *)0x06000000。void close_keyboard()。// __attribute__ ((interrupt (IRQ)))。// __attribute__ ((interrupt (IRQ)))。 Uart_Printf(\n Please press one key on keyboard and look at LED ...\n)。 while(1)。}/********************************************************************************************** name: init_keyboard* func: init keyboard interrupt* para: none* ret: none* modify:* ment: ********************************************************************************************/extern void isrEINT1(void)。void init_keyboard(){ /* enable interrupt */ rINTMOD = 0x0。 /* set EINT1 interrupt handler */ rINTMSK =~(BIT_GLOBAL|BIT_EINT1|BIT_EINT4567)。 pISR_EINT4567 = (int)isrEint4567。 // EINT7~0 rPUPG = 0x0。 // EINT1 falling edge mode rI_ISPC = BIT_EINT1|BIT_EINT4567。 // clear EXTINTPND reg}/********************************************************************************************** name: close_keyboard* func: close keyboard interrupt* para: none* ret: none* modify:* ment: ********************************************************************************************/void close_keyboard(){ pISR_EINT1 = NULL。 /* Mask interrupt */ rINTMSK = rINTMSK | BIT_EINT1 | BIT_EINT4567。 char bbyte。 // clear pending bit char pbyte[10]。 if(nTemp 1) { // Lcd_Draw_HLine(10, 310, 80, WHITE, 50)。 Lcd_DspAscII8x16(15,45,WHITE,word)。break。break。break。break。break。break。break。break。break。break。break。break。 Lcd_Draw_HLine(15+n10, 15+n, 45, WHITE, 16)。 word[wordIndex]=39。 wordIndex。 /*if(n==0) { word[20]=0。 Lcd_Draw_HLine(10, 310,85, WHITE, 160)。*/ case 13: word[wordIndex]=39。 wordIndex=0。i20。 k=i。 } else j=1。 Lcd_DspAscII8x16(15,60,BLUE,vocab[k].d)。 //else Lcd_DspHz16(15,100,BLUE,vocab[k].e)。 DelayMs(600)。 } break。\039。 for(i=0。i++) { if(strcmp(word,vocab[i].c)==0) { j=0。 break。 } if(j==0) { //ifdef Eng_v Lcd_DspAscII8x16(15,40,BLUE,vocab[k].c)。 Lcd_DspAscII8x16(15,80,BLUE,vocab[k].f)。 //endif } else { if(20x0) { for(i = 0。 i++) vocab[x].c[i]=word[i]。\039。 x++。 //Lcd_DspAscII8x16(15,45,BLUE,word)。 i 20。\039。 case 15: //Lcd_Draw_Box(10,40,310,80,GREEN)。 } if(num!=0amp。counter!=0) { switch(3*(num1)+counter1) { case 0: bbyte=39。break。b39。 case 2: bbyte=39。break。d39。 case 4: bbyte=39。break。f39。 case 6: bbyte=39。break。h39。
點擊復(fù)制文檔內(nèi)容
職業(yè)教育相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1