?? lcd.h
字號(hào):
#ifndef _LCD_H_
#define _LCD_H_
// msp430口線定義
//連線表: CPU=msp430 SystemClock=8Mhz
// Reset=RC in Board
//P4.3 模擦組片選CS
//P4.4 SID 串行數(shù)據(jù)輸入端
//P4.5 SCK 串行同步時(shí)鐘,上升沿有效
//P4.7 PSB串口方式接低電平
#define SCK_OUT P4DIR|=BIT6 // P4.6 SCK 串行同步時(shí)鐘,上升沿有效
#define SCK_H P4OUT|=BIT6
#define SCK_L P4OUT&=~BIT6
#define SID_OUT P4DIR|=BIT5 //P4.5 SID 串行數(shù)據(jù)輸出
#define SID_IN P4DIR&=~BIT5 //P4.5 SID串行數(shù)據(jù)輸入
#define SID ((P4IN&BIT5)>>5) // 把輸入的數(shù)據(jù)移到第0位
#define SID_H P4OUT|=BIT5
#define SID_L P4OUT&=~BIT5
#define CS_OUT P4DIR|=BIT4 //P4.4 CS 模擦組片選 , 高電平有效
#define CS_H P4OUT|=BIT4
#define CS_L P4OUT&=~BIT4
#define PSB_OUT P4DIR|=BIT7 //P4.7 PSB串口方式接低電平
#define PSB_L P4OUT&=~BIT7
void LCD_CheckBusy(void);//等待忙狀態(tài)結(jié)束
void LCD_WriteCommand(unsigned char Cbyte);//寫指令
void LCD_WriteData(unsigned char Dbyte);//寫數(shù)據(jù)
unsigned char LCD_ReadData(void);//讀數(shù)據(jù)
void LCD_LcmClearTXT(void);//文本區(qū)清RAM函數(shù)
void LCD_LcmClearBMP(void);//圖形區(qū)清RAM函數(shù)
void LCD_DisplayDots(unsigned char DotByte);////電子測(cè)試用點(diǎn)陣顯示
void LCD_PutBMP(unsigned char *put);//打印圖像
void LCD_setAC(unsigned char row,unsigned char col);//設(shè)置光標(biāo)的位置
//顯示一個(gè)字節(jié)的數(shù)據(jù),row=-1和col=-1,接著上次顯示完的地方開始顯示,滿3行翻屏
void LCD_PutChar3 ( int row, int col,unsigned char put) ;
//顯示一個(gè)字節(jié)的數(shù)據(jù),row=-1和col=-1,接著上次顯示完的地方開始顯示,滿4行翻屏
void LCD_PutChar ( int row, int col,unsigned char put) ;
//顯示一個(gè)字符串,row=-1和col=-1,接著上次顯示完的地方開始顯示,滿2行清屏
void LCD_PutStr2( int row, int col,unsigned char *puts);
//輸出字符串,row=-1和col=-1時(shí),從接著上次顯示完的地方開始顯示,滿3行翻屏
void LCD_PutStr3(int row,int col,unsigned char *puts);
//輸出字符串,row=-1和col=-1時(shí),從接著上次顯示完的地方開始顯示,滿4行翻屏
void LCD_PutStr( int row, int col,unsigned char *put);
//顯示一個(gè)INT型的數(shù)據(jù),row=-1和col=-1,接著上次顯示完的地方開始顯示,滿4行翻屏
void LCD_PutNum ( int row, int col,unsigned int num);
/***************************************************************
顯示一個(gè)無(wú)符號(hào) 長(zhǎng)整型 數(shù)據(jù)
*****************************************************************/
void LCD_PutNum_l ( int row, int col,unsigned long num);
//液晶初始化
void LCD_LcmInit(void);
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -