|
5110的頭文件 編寫 誰能幫我看看 哪里出錯(cuò)啦 謝謝 里面的 編寫的 頭文件 有問題 找不到問題所在
單片機(jī)源程序如下:- #include <REGX51.H>
- #ifndef __5110_H__
- #define __5110_H__
- #include "ziku.c"
- //宏定義
- #define X_Col_Addr 0x80 //定位到第0列指令(列起始地址)(0 - 83)
- #define Y_Page_Addr 0x40 //定位到第0頁指令(頁起始地址)(0 - 5)
- #define LCD_write_cmd(cmd) LCD_write_byte(cmd, 0) //寫入指令
- #define LCD_write_dat(dat) LCD_write_byte(dat, 1) //寫入數(shù)據(jù)
- sbit LCD_CLK = P0^4; //串行時(shí)鐘 //上升沿寫入數(shù)據(jù)
- sbit LCD_DIN = P0^3; //串行數(shù)據(jù)輸入 //先高后低
- sbit LCD_DC = P0^2; //數(shù)據(jù)指令控制端 //高電平數(shù)據(jù),低電平指令
- sbit LCD_CS = P0^1; //片選使能 //低電平有效
- sbit LCD_RST = P0^0; //LCD復(fù)位端 //低電平復(fù)位
- //顯示一個(gè)字節(jié)(數(shù)據(jù)或命令)
- void LCD_write_byte(unsigned char wbyte, unsigned char dat_cmd);
- //液晶字節(jié)定位(1*1)
- //液晶規(guī)劃:
- //x: 0 - 83
- //y: 0 - 5
- void LCD_pos_byte(unsigned char x, unsigned char y);
- //顯示清屏
- void LCD_clr_scr(void);
- //液晶字符輸出(6*8字體)
- //x: 0 - 13
- //y: 0 - 5
- void LCD_printc(unsigned char x, unsigned char y, unsigned char c_dat);
- //液晶字符串輸出(6*8字體)
- //x: 0 - 13
- //y: 0 - 5
- void LCD_prints(unsigned char x, unsigned char y, unsigned char *s_dat);
- //液晶漢字輸出(16*16字體)
- //取碼規(guī)則: 低位在前, 列行掃描, 陰碼(1-亮, 0-滅)
- //x: 0 - 4
- //y: 0 - 2
- void LCD_printch(unsigned char x, unsigned char y, unsigned char code *h_dat);
- //液晶漢字輸出(16*16字體)
- //查表顯示輸出
- //取碼規(guī)則: 低位在前, 列行掃描, 陰碼(1-亮, 0-滅)
- //x: 0 - 4
- //y: 0 - 2
- void LCD_showch(unsigned char x, unsigned char y, unsigned char code *dat);
- //初始化LCD5510
- void LCD5510_Init(void);
- #endif
復(fù)制代碼
|
-
-
5110.zip
2019-6-28 09:32 上傳
點(diǎn)擊文件名下載附件
42.14 KB, 下載次數(shù): 9
|