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

正文內(nèi)容

新型車速監(jiān)控裝置的設(shè)計(jì)論文-資料下載頁(yè)

2025-06-28 04:29本頁(yè)面
  

【正文】 !也特別感謝在學(xué)習(xí)和生活中給予我們支持和幫助的同學(xué)和朋友。在此,請(qǐng)接受我們真誠(chéng)的謝意。最后,感謝xx大學(xué)對(duì)我們的培養(yǎng)和教誨。它是一身的財(cái)富。附錄Ainclude include include include /*LCD_init : 5110LCD初始化*/void delay_1us(void) //1us延時(shí)函數(shù) { unsigned int i。 for(i=0。i1000。i++)。 } void delay_1ms(void) //1ms延時(shí)函數(shù) { unsigned int i。 for (i=0。i1140。i++)。 } void delay_nms(unsigned int n) //N ms延時(shí)函數(shù) { unsigned int i=0。 for (i=0。in。i++) delay_1ms()。 }void LCD_init(void) { // 產(chǎn)生一個(gè)讓LCD復(fù)位的低電平脈沖 LCD_RST = 0。 delay_1us()。 LCD_RST = 1。 // 關(guān)閉LCD LCD_CE = 0。 delay_1us()。 // 使能LCD LCD_CE = 1。 delay_1us()。 LCD_write_byte(0x21, 0)。 // 使用擴(kuò)展命令設(shè)置LCD模式 LCD_write_byte(0xc8, 0)。 // 設(shè)置偏置電壓 LCD_write_byte(0x06, 0)。 // 溫度校正 LCD_write_byte(0x13, 0)。 // 1:48 LCD_write_byte(0x20, 0)。 // 使用基本命令 LCD_clear()。 // 清屏 LCD_write_byte(0x0c, 0)。 // 設(shè)定顯示模式,正常顯示 LCD_CE = 0。 // 關(guān)閉LCD }/*LCD_clear : LCD清屏函數(shù)*/void LCD_clear(void) { unsigned int i。 LCD_write_byte(0x0c, 0)。 LCD_write_byte(0x80, 0)。 for (i=0。 i504。 i++) LCD_write_byte(0, 1)。 }/*LCD_set_XY : 設(shè)置LCD坐標(biāo)函數(shù)輸入?yún)?shù):X :0-83 Y :0-5*/void LCD_set_XY(unsigned char X, unsigned char Y) { LCD_write_byte(0x40 | Y, 0)。 // column LCD_write_byte(0x80 | X, 0)。 // row }/*LCD_write_char : 顯示英文字符輸入?yún)?shù):c :顯示的字符;*/void LCD_write_char(unsigned char c) { unsigned char line。 c = 32。 for (line=0。 line6。 line++) LCD_write_byte(font6x8[c][line], 1)。 }/*LCD_write_english_String : 英文字符串顯示函數(shù)輸入?yún)?shù):*s :英文字符串指針; X、Y : 顯示字符串的位置,x 083 ,y 05 */void LCD_write_english_string(unsigned char X,unsigned char Y,char *s) { LCD_set_XY(X,Y)。 while (*s) { LCD_write_char(*s)。 s++。 } }/*LCD_write_chinese_string: 在LCD上顯示漢字輸入?yún)?shù):X、Y :顯示漢字的起始X、Y坐標(biāo); ch_with :漢字點(diǎn)陣的寬度 num :顯示漢字的個(gè)數(shù); line :漢字點(diǎn)陣數(shù)組中的起始行數(shù) row :漢字顯示的行間距測(cè)試: LCD_write_chi(0,0,12,7,0,0)。 LCD_write_chi(0,2,12,7,0,0)。 LCD_write_chi(0,4,12,7,0,0)。 */ void LCD_write_chinese_string(unsigned char X, unsigned char Y, unsigned char ch_with,unsigned char num, unsigned char line,unsigned char row) { unsigned char i,n。 LCD_set_XY(X,Y)。 //設(shè)置初始位置 for (i=0。inum。) { for (n=0。 nch_with*2。 n++) //寫(xiě)一個(gè)漢字 { if (n==ch_with) //寫(xiě)漢字的下半部分 { if (i==0) LCD_set_XY(X,Y+1)。 else LCD_set_XY((X+(ch_with+row)*i),Y+1)。 } LCD_write_byte(write_chinese[line+i][n],1)。 } i++。 LCD_set_XY((X+(ch_with+row)*i),Y)。 } } /*LCD_draw_map : 位圖繪制函數(shù)輸入?yún)?shù):X、Y :位圖繪制的起始X、Y坐標(biāo); *map :位圖點(diǎn)陣數(shù)據(jù); Pix_x :位圖像素(長(zhǎng)) Pix_y :位圖像素(寬)*/void LCD_draw_bmp_pixel(unsigned char X,unsigned char Y,unsigned char *map, unsigned char Pix_x,unsigned char Pix_y) { unsigned int i,n。 unsigned char row。 if (Pix_y%8==0) row=Pix_y/8。 //計(jì)算位圖所占行數(shù) else row=Pix_y/8+1。 for (n=0。nrow。n++) { LCD_set_XY(X,Y)。 for(i=0。 iPix_x。 i++) { LCD_write_byte(map[i+n*Pix_x], 1)。 } Y++。 //換行 } }/*LCD_write_byte : 使用SPI接口寫(xiě)數(shù)據(jù)到LCD輸入?yún)?shù):data :寫(xiě)入的數(shù)據(jù); mand :寫(xiě)數(shù)據(jù)/命令選擇; */void LCD_write_byte(unsigned char dat, unsigned char mand) { unsigned char i。 //PORTB amp。= ~LCD_CE 。 // 使能LCD LCD_CE = 0。 if (mand == 0) // PORTB amp。= ~LCD_DC 。 // 傳送命令 LCD_DC = 0。 else // PORTB |= LCD_DC 。 // 傳送數(shù)據(jù) LCD_DC = 1。 for(i=0。i8。i++) { if(datamp。0x80) SDIN = 1。 else SDIN = 0。 SCLK = 0。 dat = dat 1。 SCLK = 1。 } // SPDR = data。 // 傳送數(shù)據(jù)到SPI寄存器 //while ((SPSR amp。 0x80) == 0)。 // 等待數(shù)據(jù)傳送完畢 //PORTB |= LCD_CE 。 // 關(guān)閉LCD LCD_CE = 1。 }附錄B第 31 頁(yè) 共 32 頁(yè)
點(diǎn)擊復(fù)制文檔內(nèi)容
化學(xué)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1