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

正文內(nèi)容

基于atmega16l單片機(jī)的六路搶答器設(shè)計(jì)-在線瀏覽

2025-07-18 08:57本頁面
  

【正文】 ***********************************************************define LCD_EN_PORT PORTB //以下2個(gè)要設(shè)為同一個(gè)口define LCD_EN_DDR DDRBdefine LCD_RS_PORT PORTB //以下2個(gè)要設(shè)為同一個(gè)口define LCD_RS_DDR DDRBdefine LCD_DATA_PORT PORTB //以下3個(gè)要設(shè)為同一個(gè)口define LCD_DATA_DDR DDRB //一定要用高4位define LCD_DATA_PIN PINBdefine LCD_RS (1PB7) //0x80 portB7 out define LCD_EN (1PB6) //0x60 portB6 out define LCD_DATA ((1PB5)|(1PB4)|(1PB3)|(1PB2)) unsigned char tab[]={39。,39。,39。,39。,39。,39。,39。,39。,39。,39。}。void LCD_en_write(void)。void LCD_write_data(unsigned char data)。void LCD_write_string(unsigned char X,unsigned char Y,unsigned char *s)。/*補(bǔ)充*/void LCD_write_shu(unsigned int x,unsigned int t,unsigned int n)。void delay_nms(unsigned int n)。 //數(shù)據(jù)口方向?yàn)檩敵? LCD_EN_DDR|=LCD_EN。 //設(shè)置RS方向?yàn)檩敵? LCD_write_mand(0x28)。 delay_nus(40)。 //4位顯示 LCD_write_mand(0x0c)。 //清屏 delay_nms(2)。 delay_nus(1)。=~LCD_EN。 mand=((mandamp。0b01000000)5)|((mandamp。0b00010000)1)|((mandamp。0b00000100)3)|((mandamp。0b00000001)7)。 temp=mand2。=~LCD_RS。=0b11000011。0b00111100。 mand=mand2。=0b11000011。0b00111100。 } void LCD_write_data(unsigned char data) //寫數(shù)據(jù) { unsigned char temp。0b10000000)7)|((dataamp。0b00100000)3)|((dataamp。0b00001000)1)|((dataamp。0b00000010)5)|((dataamp。 delay_nus(16)。 LCD_RS_PORT|=LCD_RS。=0b11000011。0b00111100。 data=data2。=0b11000011。0b00111100。 }void LCD_set_xy( unsigned char x, unsigned char y ) //寫地址函數(shù){ unsigned char address。 else address = 0xc0 + x。} void LCD_write_string(unsigned char X,unsigned char Y,unsigned char *s) //列x=0~15,行y=0,1{ LCD_set_xy( X, Y )。 s ++。 //寫地址 LCD_write_data( data)。 }void delay_nus(unsigned int n) //N us延時(shí)函數(shù) { unsigned int i=0。in。 } void delay_1ms(void) //1ms延時(shí)函數(shù) { unsigned int i。i1140。 } void delay_nms(unsigned int n) //N ms延時(shí)函數(shù) { unsigned int i=0。in。 }unsigned char *Format(unsigned char data,unsigned char *str){ str[0]=tab[(data/10)%10]。 return str。=~(15) //定義蜂鳴器開define off_beep PORTD|=15 //定義蜂鳴器關(guān)define MAINKEY ((PINDamp。0x02)==0x00)/*宏定義*/define uchar unsigned chardefine uint unsigned int//全局變量定義unsigned char key。uchar Dmiao,Emiao=30。uchar stop_flag=0。 //定義啟動(dòng)計(jì)時(shí)標(biāo)志uchar MAIN_KEY。 //定義LED移動(dòng)位uchar flag=0。 //定義30秒計(jì)時(shí)數(shù)值/****************************************** 延時(shí)函數(shù)1:入口i,單位mS,最大65536mS ******************************************/void delay_ms(uint i) { uchar a。i。a。} } } /****************************************** 延時(shí)函數(shù)2:入口i,單位uS,最大65536uS ******************************************/void delay_us(uint i) { i=i/2。i。 } } //響聲函數(shù):入口i:響聲長度i*10ms,n:響聲次數(shù)void sound1(uchar i,uchar n) { for(。n) { uint a=i*10。a。 //開蜂鳴器 delay_us(100)。 //關(guān)蜂鳴器 delay_us(100)。 } }//端口初始化void port_init(void){ PORTA = 0xff。 PORTB =
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1