测水位C语言程序,51单片机水位检测程序 DCS

//#ifndef _Use_LCD1602B

//# define _Use_LCD1602B

/***********************

*    系 统 宏 定 义    *

***********************/

/*---------------------*

*    常 数 宏 定 义    *

*---------------------*/

#ifndef True

# define True           0x01

#endif

#ifndef False

# define False          0x00

#endif

#ifndef Enable

# define Enable         0x01

#endif

#ifndef Disable

# define Disable        0x00

#endif

#ifndef RunStringSpeed

# define RunStringSpeed 100

#endif

#ifndef FlashTimeOut

# define FlashTimeOut   500

#endif

#ifndef FlashGIFTimeOut

# define FlashGIFTimeOut  1000

#endif

# define LCD_Write          0x00

# define LCD_Read           0x01

# define LCD_Command        0x00

# define LCD_Data           0x01

# define LCD_CMD_Init       0x28

# define LCD_CMD_DispCtr    0x0c

# define LCD_CMD_CLS        0x01

# define LCD_CMD_EnterSet   0x06

# define LCD_CMD_IconShow   0x0f

# define LCD_CMD_IconHide   0x0c

# define LCD_CMD_NotMove    0b00010100

/*---------------------*

*    动 作 宏 定 义    *

*---------------------*/

# define SetReadState       LCD_SetReadData;LCD_RS = LCD_Command;LCD_RW = LCD_Read;

# define SetRead            LCD_SetReadData;LCD_RW = LCD_Read;

# define SetWrite           LCD_SetWriteData;LCD_RW = LCD_Write;

# define SetCommand         LCD_RS = LCD_Command;

# define SetData            LCD_RS = LCD_Data;

# define Print(a)           LCDDisplayString(a);

# define Locate(x,y)        LCDSetXY(x-1,y-1);

# define CLS                LCDWaitForReady();LCDSendCommand(LCD_CMD_CLS);

# define PrintN(a,b)        LCDDisplayNum((unsigned long)a,b);

# define ShowIcon           LCDWaitForReady();LCDSendCo

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值