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

正文內(nèi)容

基于rda5807的數(shù)控fm收音機實訓論文-資料下載頁

2025-06-27 18:44本頁面
  

【正文】 while(lcd_busy())。 //進行忙檢測 LCD_RS = 1。 LCD_RW = 0。 LCD_EN = 0。 DATA_PORT = dat。 delayNOP()。 LCD_EN = 1。 delayNOP()。 LCD_EN = 0。}/******************************************************************* LCD初始化設定*******************************************************************/void lcd_init(){ delayms(50)。 lcd_wcmd(0x38,0)。 //16*2顯示,5*7點陣,8位數(shù)據(jù) delayms(5)。 lcd_wcmd(0x38,0)。 //不進行忙檢測,強制執(zhí)行。 delayms(5)。 lcd_wcmd(0x38,0)。 delayms(5)。 lcd_wcmd(0x38,1)。 //進行忙檢測 delayms(5)。 lcd_wcmd(0x0c,1)。 //顯示開,關光標 delayms(5)。 lcd_wcmd(0x06,1)。 //移動光標 delayms(5)。 lcd_wcmd(0x01,1)。 //清除LCD的顯示內(nèi)容 delayms(5)。}/******************************************************************* 設定顯示位置*******************************************************************/void lcd_pos_xy(uchar pos_x,uchar pos_y){ uchar pos_temp。 pos_temp=pos_x amp。 0x0f。 pos_y amp。= 0x0f。 if(pos_y==0x01) pos_temp |= 0x80。 else if(pos_y==0x02) pos_temp |= 0xc0。 lcd_wcmd(pos_temp,1)。}/******************************************************************* 寫字符串子函數(shù) *******************************************************************/void lcd_w_string(uchar pos_x,uchar pos_y,uchar code *str,uint times){ uchar m。 lcd_pos_xy(pos_x,pos_y)。 //設定起始位置 for(m=0。 m16。 m++) { lcd_wdat(str[m])。 delayms(times)。 }} IIC程序include include include sbit SDA = P3^0。sbit SCL = P3^1。 /********************************************************** 啟動子程序 在 SCL 高電平期間 SDA 發(fā)生負跳變**********************************************************/void I2C_start(){ SDA = 1。 SCL = 1。 delayNOP()。 SDA = 0。 delayNOP()。 SCL = 0。}/********************************************************** 停止子函數(shù) 在 SCL 高電平期間 SDA 發(fā)生正跳變**********************************************************/void I2C_stop(){ SDA = 0。 SCL = 1。 delayNOP()。 SDA = 1。 delayNOP()。}/********************************************************** 發(fā)送一個字節(jié)子程序**********************************************************/unsigned char I2C_write_byte(unsigned char indata){ unsigned char i, ack。 // I2C 發(fā)送8 位數(shù)據(jù) for (i=0。 i8。 i++) { // 高在前低在后 if (indata amp。 0x80) SDA = 1。 else SDA = 0。 // 發(fā)送左移一位 indata = 1。 delayNOP()。 SCL = 1。 delayNOP()。 SCL = 0。 } // 設置SDA為輸入 SDA =1。 delayNOP()。 // 讀取從機應答狀態(tài) SCL = 1。 delayNOP()。 if(SDA) { ack = I2C_NACK。 } else { ack = I2C_ACK。 } SCL = 0。 return ack。}/********************************************************** 讀一個字節(jié)子程序**********************************************************/unsigned char I2C_read_byte(unsigned char ack){ unsigned char i, data1 = 0。 // SDA 設置輸入方向 SDA = 1。 // I2C 接收8位數(shù)據(jù) for(i = 8。 i 0。 i) { data1 = 1。 SCL = 1。 delayNOP()。 // 高在前低在后 if (SDA) { data1++。 } SCL = 0。 delayNOP()。 } // 主機發(fā)送應答狀態(tài) if(ack == I2C_ACK) SDA = 0。 else SDA = 1。 delayNOP()。 SCL = 1。 delayNOP()。 SCL = 0。 return data1。} Delay延遲程序include /********************************************************** us延時子程序**********************************************************/void delayNOP(){ _nop_()。_nop_()。_nop_()。_nop_()。}/********************************************************** ms延時子程序**********************************************************/void delayms( unsigned int ms) { unsigned char k。 while(ms) { for(k = 0。 k 120。 k++)。 }}
點擊復制文檔內(nèi)容
醫(yī)療健康相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1