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

正文內(nèi)容

觸摸式lcd人機(jī)接口的設(shè)計(jì)畢業(yè)論文-資料下載頁(yè)

2025-06-27 16:30本頁(yè)面
  

【正文】 if (Fcco / Fcclk) == 8 PLLCFG = ((Fcclk / Fosc) 1) | (2 5)。 endif if (Fcco / Fcclk) == 16 PLLCFG = ((Fcclk / Fosc) 1) | (3 5)。 endif PLLFEED = 0xaa。 PLLFEED = 0x55。 while((PLLSTAT amp。 (1 10)) == 0)。 PLLCON = 3。 PLLFEED = 0xaa。 PLLFEED = 0x55。 }//初始化液晶接口void LCD_Port(void){ = 1。 //WR = 1。 //RD = 1。 //RD = 1。 //WR = 1。 //RS = 1。 //CS = 1。 = 1。}//延時(shí)void DelayMs(unsigned short k){ unsigned short i。 unsigned int j。 for(i = k。i 0。i) for(j = 1000。j 0。j)。 }//向HC573寫入數(shù)據(jù)void Write_HC573(unsigned short Dat){ unsigned char dat。 dat = (unsigned char)(Datamp。0xFF)。 IO1SET |= (((unsigned int)dat)16)。 IO1CLR |= ((~(((unsigned int)dat)16))amp。((0XFF16)))。 = 1。 = 1。 dat = (unsigned char)((Dat8)amp。0xFF)。 IO1SET |= (((unsigned int)dat)16)。 IO1CLR |= ((~(((unsigned int)dat)16))amp。((0XFF16)))。 = 1。 = 1。}//向液晶屏寫入數(shù)據(jù)void TFTWriData(unsigned short ch){ LCD_RS_H()。 //RS = 1 LCD_CS_L()。 //CS = 0 Write_HC573(ch)。 LCD_WR_L()。 //WR = 0 LCD_WR_H()。 //WR = 1 LCD_CS_H()。 //CS = 1}//向液晶屏寫入命令void TFTWriCom(unsigned short ch){ LCD_RS_L()。 //RS = 0 Write_HC573(ch)。 LCD_WR_L()。 //WR = 0 LCD_CS_L()。 //CS = 0 LCD_WR_H()。 //WR = 1 LCD_CS_H()。 //CS = 1}//寫入控制字void write_(unsigned short address,unsigned short num){ TFTWriCom(address)。 TFTWriData(num)。}//液晶屏初始化void TftInit(void){ LCD_RESET_L()。 //低電平復(fù)位 Delayn(10000)。 LCD_RESET_H()。define DelayNS Delayn write_(0x0000,0x0001)。 DelayNS(1000)。 //打開(kāi)晶振 write_(0x0003,0xA8A4)。 DelayNS(1000)。 //0xA8A4 write_(0x000C,0x0000)。 DelayNS(1000)。 write_(0x000D,0x080C)。 DelayNS(1000)。 write_(0x000E,0x2B00)。 DelayNS(1000)。 write_(0x001E,0x00B0)。 DelayNS(1000)。 write_(0x0001,0x2B3F)。 DelayNS(1000)。 //驅(qū)動(dòng)輸出控制320*240 0x6B3F write_(0x0002,0x0600)。 DelayNS(1000)。 write_(0x0010,0x0000)。 DelayNS(1000)。 write_(0x0011,0x6070)。 DelayNS(1000)。 //0x4030 //定義數(shù)據(jù)格式 16位色 write_(0x0005,0x0000)。 DelayNS(1000)。 write_(0x0006,0x0000)。 DelayNS(1000)。 write_(0x0016,0xEF1C)。 DelayNS(1000)。 write_(0x0017,0x0003)。 DelayNS(1000)。 write_(0x0007,0x0233)。 DelayNS(1000)。 //0x0233 write_(0x000B,0x0000)。 DelayNS(1000)。 write_(0x000F,0x0000)。 DelayNS(1000)。 //掃描開(kāi)始地址 write_(0x0041,0x0000)。 DelayNS(1000)。 write_(0x0042,0x0000)。 DelayNS(1000)。 write_(0x0048,0x0000)。 DelayNS(1000)。 write_(0x0049,0x013F)。 DelayNS(1000)。 write_(0x004A,0x0000)。 DelayNS(1000)。 write_(0x004B,0x0000)。 DelayNS(1000)。 write_(0x0044,0xEF00)。 DelayNS(1000)。 write_(0x0045,0x0000)。 DelayNS(1000)。 write_(0x0046,0x013F)。 DelayNS(1000)。 write_(0x0030,0x0707)。 DelayNS(1000)。 write_(0x0031,0x0204)。 DelayNS(1000)。 write_(0x0032,0x0204)。 DelayNS(1000)。 write_(0x0033,0x0502)。 DelayNS(1000)。 write_(0x0034,0x0507)。 DelayNS(1000)。 write_(0x0035,0x0204)。 DelayNS(1000)。 write_(0x0036,0x0204)。 DelayNS(1000)。 write_(0x0037,0x0502)。 DelayNS(1000)。 write_(0x003A,0x0302)。 DelayNS(1000)。 write_(0x003B,0x0302)。 DelayNS(1000)。 write_(0x0023,0x0000)。 DelayNS(1000)。 write_(0x0024,0x0000)。 DelayNS(1000)。 write_(0x0025,0x8000)。 DelayNS(1000)。 write_(0x004f,0)。 //行首址0 write_(0x004e,0)。 //列首址0}//顯示一種顏色void DispOneColor(unsigned short Color){ unsigned char i。 unsigned int j。 write_(0x004f,0)。 //行首址0 write_(0x004e,0)。 //列首址0 TFTWriCom(0x22)。 LCD_RS_H()。 //RS = 1 LCD_CS_L()。 //CS = 0 Write_HC573(Color)。 for(j=0。j320。j++) for(i=0。i240。i++) { LCD_WR_L()。 //WR = 0 LCD_WR_H()。 //WR = 1 } LCD_CS_H()。 //CS = 1}//清屏void DispClear(void){ DispOneColor(BLACK)。}//設(shè)置RAM地址void Set_ramaddr(unsigned short x,unsigned short y){ write_(0x004f,y)。 //行首址 write_(0x004e,x)。 //列首址}//顯示一個(gè)小圖片void DispSmallPic(unsigned short x, unsigned short y, unsigned short w, unsigned short h, const unsigned char *str){ unsigned short i,j,temp。 for(j=0。jh。j++) { Set_ramaddr(x,y+j)。 TFTWriCom(0x22)。 for(i=0。iw。i++) { //send_data(*(unsigned short *)(amp。str[(j*w+i)*2]))。 //高位在前 temp=str[(j*w+i)*2+1]8。 //低位在前 temp|=str[(j*w+i)*2]。 TFTWriData(temp)。 } }}//顯示一副240x320分辨率的圖片void DispPic240_320(const unsigned char *str){ int i。 Set_ramaddr(0,0)。 TFTWriCom(0x22)。 for (i = 0。 i 240 * 320。 i++) { TFTWriData(*(unsigned short *)(amp。str[ 2 * i]))。 }}
點(diǎn)擊復(fù)制文檔內(nèi)容
語(yǔ)文相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1