xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 40KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-07
  • 語言: 其他
  • 標簽: #include??

資源簡介

#include #include #define RS_0 PORTD &= ~(1 << PD3) #define RS_1 PORTD |= (1 << PD3) #define RW_0 PORTD &= ~(1 << PD4) #define RW_1 PORTD |= (1 << PD4) #define EN_0 PORTD &= ~(1 << PD6) #define EN_1 PORTD |= (1 <1); } //毫秒級延時程序晶振8MHZ void delay_ms(unsigned int time) { while(time!=0) { delay_us(1000); time--; } } /*顯示屏命令寫入函數*/ void LCD_write_com(unsigned char com) { RS_0; RW_0; PORTB = com; EN_1; delay_us(20); EN_0; } /*顯示屏命令寫入函數*/ void LCD_write_data(unsigned char data) { RS_1; RW_0; PORTB = data; EN_1; delay_us(200); EN_0; } /*顯示屏清空顯示*/ void LCD_clear(void) { LCD_write_com(0x01); delay_ms(5); } /*顯示屏字符串寫入函數*/ void LCD_write_str(unsigned char x,unsigned char y,unsigned char *s) { if (y == 0) { LCD_write_com(0x80 + x); } else { LCD_write_com(0xC0 + x); } while (*s) { LCD_write_data( *s); s ++; } } /*顯示屏單字符寫入函數*/ void LCD_write_char(unsigned char x,unsigned char y,unsigned char data) { if (y == 0) { LCD_write_com(0x80 + x); } else { LCD_write_com(0xC0 + x); } LCD_write_data( data); } /*顯示屏初始化函數*/ void LCD_init(void) { DDRB = 0xFF; /*I/O口方向設置*/ DDRD |= (1 << PD3) | (1 << PD4) | (1 << PD6); LCD_write_com(0x38); /*顯示模式設置*/ delay_ms(5); LCD_write_com(0x38); delay_ms(5); LCD_write_com(0x38); delay_ms(5); LCD_write_com(0x38); LCD_write_com(0x08); /*顯示關閉*/ LCD_write_com(0x01); /*顯示清屏*/ LCD_write_com(0x06); /*顯示光標移動設置*/ delay_ms(5);

資源截圖

代碼片段和文件信息

評論

共有 條評論

相關資源