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

正文內(nèi)容

基于觸摸屏式的電子密碼鎖設(shè)計(jì)-畢業(yè)設(shè)計(jì)(參考版)

2024-11-27 06:50本頁(yè)面
  

【正文】 LCD_cs(0)。 //16是字體的寬度 p++。 // x+=8。\039。 //backcolor temp=1。0x80) LCD_Write_DATA(For_color8 , For_color )。t8。pos++) { temp= Font16x24[ch][pos]。 //每個(gè)字母取模字節(jié)數(shù) for(pos=0。 //設(shè)置顯示地址 ch = ch32。 if(x(LCD_SIZE_XCHAR_W)||y(LCD_SIZE_YCHAR_H)) return。 CHAR_W = 16。 uchar pos,t。 //textcolor } else { LCD_Write_DATA( Bk_color8 , Bk_color)。j++) { if((edj)amp。 for(j=0。 // else // e=4。i++) { ed=*pchar++。 for(i=0。 //每個(gè)字取模的字節(jié)數(shù) =(32*32)/8 } pchar=pfont + (nbytes*(c1))。 nrows =321。 nbytes =72。 //每個(gè)字取模的字節(jié)數(shù) =(16*16)/8 } else 蘇州大學(xué)本科生畢業(yè)設(shè)計(jì)(論文) 第 34 頁(yè) if(size==1) { ncols =241。 nrows =161。 uchar *pchar。 uint nbytes。 uint ncols。 } /********************************************************** 寫(xiě)漢字子函數(shù) **********************************************************/ void ChineseChar(uint x,uint y,int size,uint For_color,uint Bk_color ,char c) { int e=0,i,j。LCD_Write_DATA(y28,y2)。LCD_Write_DATA(x28,x2)。LCD_Write_DATA(y18,y1)。LCD_Write_DATA(x18,x1)。LCD_Write_DATA(x18,x1)。 } } LCD_cs(1)。j240。i320。 //打開(kāi)片選使能 Address_set(0,0,239,319)。 } void Pant(char VH,char VL) { int i,j。 } void LCD_Write_DATA(char VH,char VL) //發(fā)送數(shù)據(jù) { LCD_rs(1)。 } endif void LCD_Write_COM(char VH,char VL) //發(fā)送命令 { LCD_rs(0)。 //八位模式都用 P0口送數(shù)據(jù) //LCD_wr(0)。 //LCD_wr(1)。 } else //條件編譯 8位數(shù)據(jù)模式 void LCD_Writ_Bus(char VH,char VL) //并行數(shù)據(jù)寫(xiě)入函數(shù) { =VH。 LCD_wr(0)。 GPIOBBRR = ((~VL)8) amp。 //低位 P0口 //屏蔽低 8位 將數(shù)據(jù)送到 PB8PB15 GPIOBBSRR = (VL)8 amp。 0x00ff))。 0x00ff)。 0x00ff。 0x00ff。 } ifdef Bus_16 //條件編譯 16 位數(shù)據(jù)模式 void LCD_Writ_Bus(uint VH , uint VL) //并行數(shù)據(jù)寫(xiě)入函數(shù) { //LCD_DataPortH=VH。j1000。unt。 // 262K color and display ON LCD_cs(1)。 LCD_Write_COM(0x00,0x07)。 LCD_Write_COM(0x00,0x92)。 // Panel Control // LCD_Write_COM(0x00,0x90)。 LCD_Write_COM(0x00,0x85)。 LCD_Write_COM(0x00,0x84)。 LCD_Write_COM(0x00,0x83)。 LCD_Write_COM(0x00,0x82)。 LCD_Write_COM(0x00,0x81)。 // set scrolling line // Partial Display Control // LCD_Write_COM(0x00,0x80)。 // NDL,VLE, REV LCD_Write_COM(0x00,0x6A)。 // Gate Scan Line LCD_Write_COM(0x00,0x61)。 // Vertical GRAM Start Address LCD_Write_COM(0x00,0x60)。 // Vertical GRAM Start Address LCD_Write_COM(0x00,0x53)。 // Horizontal GRAM End Address LCD_Write_COM(0x00,0x52)。 // Horizontal GRAM Start Address LCD_Write_COM(0x00,0x51)。//1604 // Set GRAM area // LCD_Write_COM(0x00,0x50)。//0702 蘇州大學(xué)本科生畢業(yè)設(shè)計(jì)(論文) 第 31 頁(yè) LCD_Write_COM(0x00,0x3D)。//0707 LCD_Write_COM(0x00,0x3C)。//0102 LCD_Write_COM(0x00,0x39)。//0306 LCD_Write_COM(0x00,0x38)。 LCD_Write_COM(x00,0x37)。 LCD_Write_COM(0x00,0x32)。 LCD_Write_COM(0x00,0x31)。 // GRAM Vertical Address // Adjust the Gamma Curve // LCD_Write_COM(0x00,0x30)。 // GRAM horizontal Address LCD_Write_COM(0x00,0x21)。 // Delay 50ms LCD_Write_COM(0x00,0x20)。 LCD_Write_DATA(0x00,0x0D)。 LCD_Write_DATA(0x00,0x27)。 LCD_Write_DATA(0x15,0x00)。 delayms(50)。 LCD_Write_DATA(0x00,0x1F)。 // DC1[2:0], DC0[2:0], VC[2:0] delayms(50)。 // 1490//SAP, BT[3:0], AP, DSTB, SLP, STB LCD_Write_COM(0x00,0x11)。 // Discharge capacitor power voltage LCD_Write_COM(0x00,0x10)。 LCD_Write_DATA(0x00,0x01)。 LCD_Write_DATA(0x00,0x00)。 LCD_Write_DATA(0x00,0x00)。 LCD_Write_DATA(0x00,0x07)。 LCD_Write_DATA(0x00,0x00)。 LCD_Write_DATA(0x00,0x00)。 LCD_Write_DATA(0x00,0x00)。 LCD_Write_DATA(0x00,0x00)。 LCD_Write_DATA(0x00,0x00)。 LCD_Write_DATA(0x00,0x00)。 LCD_Write_DATA(0x02,0x07)。 LCD_Write_DATA(0x00,0x00)。 LCD_Write_DATA(0x10,0x30)。 LCD_Write_DATA(0x07,0x00)。 LCD_Write_DATA(0x01,0x00)。 LCD_Write_DATA(0x78,0xF0)。 LCD_cs(0)。 LCD_rest(1)。 LCD_rest(0)。 void LCD_Init(void) { LCD_rest(1)。 cs(1)。 Delay(10)。 Delay(10)。 WriteCharTo7843(0xD0)。 Delay(10)。 Delay(10)。 //如果 BUSY信號(hào)不好使可以刪除不用 //delayms(1)。 WriteCharTo7843(0x90)。 //啟動(dòng) SPI //while(BUSY)。 } void AD7843(void) //外部中斷 0 用來(lái)接受鍵盤(pán)發(fā)來(lái)的數(shù)據(jù) { //delayms(1)。 //千位 str[4]=dd((dd/10)*10)+48。 //十位 str[2]=(dd/100)((dd/1000)*10)+48。 蘇州大學(xué)本科生畢業(yè)設(shè)計(jì)(論文) 第 28 頁(yè) } void inttostr(int dd,char *str) { str[0]=dd/10000+48。 if(dout == 1) Num++。 //下降沿有效 dclk(0)。 dclk(1)。count12。 unsigned int Num=0。 Delay(20)。 Delay(20)。 num=1。0x80) == 0x80)din(1)。count8。 Delay(10)。 } //********************************************************** void WriteCharTo7843(unsigned char num) //SPI 寫(xiě)數(shù)據(jù) { unsigned char count=0。 Delay(20)。 Delay(20)。 Delay(20)。 Delay(20)。 pb6 //define PEN GPIO_Pin_5 //P3^7。 pb1 //define DOUT GPIO_Pin_2 //P2^0。 pb7 //define DIN GPIO_Pin_0 //P2^2。 } 觸摸屏: include include include include /********************************宏定義*********************************/ define cs(x) x ? GPIO_SetBits(GPIOB, CS): GPIO_ResetBits(GPIOB, CS) //自己定義位操作函數(shù) define din(x) x ? GPIO_SetBits(GPIOB, DIN) : GPIO_ResetBits(GPIOB, DIN) define dclk(x) x ? GPIO_SetBits(GPIOB, DCLK) : GPIO_ResetBits(GPIOB, DCLK) define busy(x) x ? GPIO_SetBits(GPIOB, BUSY) : GPIO_ResetBits(GPIOB, BUSY) define dout GPIO_ReadInputDataBit(GPIOB, DOUT) unsigned int TP_X,TP_Y。 nCount != 0。 AD7843()。 LCD_Init()。 EXTI_Config()。 } /******************************************************************************* 主函
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1