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

正文內(nèi)容

本科設(shè)計--基于單片機(jī)的自動售貨機(jī)的系統(tǒng)設(shè)計-資料下載頁

2024-12-04 01:21本頁面

【導(dǎo)讀】工作及取得的研究成果。據(jù)我所知,除文中特別加以標(biāo)注引用參考文獻(xiàn)資料外,論文(設(shè)。計)中所有數(shù)據(jù)均為自己研究成果,不包含其他人已經(jīng)發(fā)表或撰寫過的研究成果。我一同工作的同志對本研究所做的工作已在論文中作了明確說明并表示謝意。貨機(jī)全過程的自動控制。本系統(tǒng)選擇3×3矩陣式鍵盤作為控制按鍵,實現(xiàn)貨物的掉。出、退幣以及貨幣數(shù)的LCD顯示等功能。

  

【正文】 else Tishi( )。 return。 } else if(Line3==0) //按鍵 TuiBi被按下 { TuiBi=0。 // 啟動退幣系統(tǒng) String_s1=We appreciate your。 String_s2= business,bye!。 LCD()。 return。 } } } } 附 錄 2 TC1602AL顯示程序 include include include sbit LCD_EP=P3^6。 sbit LCD_RW=P3^5。 sbit LCD_RS=P3^4。 define uchar unsigned char 。 // 宏定義 define uint unsigned int define LCD_Out P0 define LCD_In P0 code uchar LCD_addr[18]={ //共 18 行顯示的首地址 0x85,0xc5,0x86,0xc1, 0x82,0xc3,0x83,0xc3, 0x83,0xc0,0x81,0xc0, 0x82,0xc6,0x84,0xc6, 0x81,0xc3}。 code uchar LCD_InitialCode[]={0x30,0x30,0x30,0x38,0x01,0x06,0x0c}。 //初始化代碼 uchar *string_s1,*string_s2。 uchar i,j。 /****************************************************************************** 函數(shù) : void LCD_DataWrite(unsigned char Data) 描述 : 寫一個字節(jié)的顯示數(shù)據(jù)至 LCD 中的顯示緩沖 RAM 當(dāng)中 參數(shù) : Data 寫入的數(shù)據(jù) ******************************************************************************/ void LCD_DataWrite(unsigned char Data) { unsigned int Read_Dat=0。 LCD_EP = 0。 //EP、 RS 端口為低, RW 為高 LCD_RS = 0。 LCD_RW = 1。 do{ //RS=0,RW=1 時,在 E 高電平作用下, BF 輸出到總線 DB7 上 LCD_In = 0xff。 LCD_EP = 1。 Read_Dat = LCD_Inamp。0x80。 LCD_EP = 0。 }while(Read_Dat!=0)。 //讀狀態(tài)字( BF 位)并判斷是否可進(jìn)行讀寫操作 LCD_RW = 0。 LCD_RS = 1。 LCD_Out = Data。 LCD_EP = 1。 LCD_EP = 0。 } /****************************************************************************** 函數(shù) : void LCD_RegWrite(uchar Command) 描述 : 寫一個字節(jié)的數(shù)據(jù)至 LCD 中的控制寄存器當(dāng)中 參數(shù) : Command 寫入的數(shù)據(jù)( byte) ******************************************************************************/ void LCD_RegWrite(uchar Command) { uint Read_Dat=0。 LCD_EP = 0。 //EP、 RS 置低, RW 置高,表為讀狀態(tài)字 LCD_RS = 0。 LCD_RW = 1。 do{ LCD_In = 0xff。 LCD_EP = 1。 Read_Dat = LCD_Inamp。0x80。 LCD_EP = 0。 }while(Read_Dat!=0)。 //讀狀態(tài)字并判斷是否可進(jìn)行讀寫操作 LCD_RW = 0。 //RW to Low,表為寫指令 LCD_Out = Command。 LCD_EP = 1。 //EP to Hight LCD_EP = 0。 } /****************************************************************************** 函數(shù) : unsigned char LCD_StatusRead(void) 描述 : 從 LCD 中的顯示緩沖 RAM 當(dāng)中讀一個字節(jié)的顯示數(shù)據(jù) 返回 : 讀出的數(shù)據(jù),低八位有效( byte) ******************************************************************************/ unsigned char LCD_StatusRead(void) { unsigned char Read_Dat=0。 LCD_EP = 0。 //EP、 RS 置低, RW 置高,表為讀狀態(tài)字 LCD_RS = 0。 LCD_RW = 1。 LCD_In = 0xff。 LCD_EP = 1。 Read_Dat = LCD_In。 //讀狀態(tài)字 LCD_EP = 0。 return Read_Dat。 } /****************************************************************************** 函數(shù) : void LCD_Init(void) 描述 : LCD 初始化程序,在里面會完成 LCD 初始所需要設(shè)置的許多寄存器 ******************************************************************************/ void LCD_Init(void) { uchar uiTemp=0,i。 uchar *Point。 Point = (uchar *)LCD_InitialCode。 //獲取初始化序列數(shù)據(jù)的首地址 LCD_EP = 0。 LCD_RS = 0。 LCD_RW = 0。 for(i=0。i4。i++) { uiTemp = *Point++。 LCD_Out = uiTemp。 LCD_EP = 1。 //EP to Hight LCD_EP = 0。 //EP to Hight delay(5)。 //延時 5ms,一般要求 以上就可以,沒有那么嚴(yán)格的了 } LCD_RegWrite(*Point++)。 LCD_RegWrite(*Point++)。 LCD_RegWrite(*Point++)。 } /****************************************************************************** 函數(shù) : void LCD() 描述 : LCD 初始化程序,在里面會完成 LCD 初始所需要設(shè)置的許多寄存器 參數(shù) : 4 個 ******************************************************************************/ void LCD() { uchar uiTemp=0。 LCD_Init()。 uiTemp = LCD_StatusRead()。 //無意義,只是測試讀狀態(tài)字的子程序 LCD_RegWrite(LCD_addr[i])。 //設(shè)置地址為第一行第一個字符的位置 while((*String_s1)!=0) //顯示字符串 { LCD_DataWrite(*String_s1)。 String_s1++。 } LCD_RegWrite(LCD_addr[j])。 while((*String_s2)!=0) //顯示字符串 { LCD_DataWrite(*String_s2)。 String_s2++。 } } 附 錄 3 提示 程序 include define uchar unsigned char define uint unsigned int void Tishi( ) { sbit d=P3^3。 sbit c=P3^7。 sbit f。 void baojing( ) { EA=1。 //*******開總中斷 ******* EX0=1。 //*******開外部中斷 0******* IT0=1。 //*******開中斷 ******* c=1。 { if (f==1) c=0。 else c=1。 } if( } void extero( ) interrupt 0 { f=1。 } } 附 錄 4
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1