⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcd1602_main.c

📁 lcd1602编程资料。包括8位和4位口的c语言程序。当单片机口不够时可用4位接法
💻 C
字号:
/******************************************************************************************
  This function is used for LCD1602, using 4 bits to translate between the units.
  DB4-7 connects to P4-7, and E connects to P2.0, RS connects to P2.1, R/W connects to P2.2.
  If you want to revise them to adapt to your hardware, revise them in file lcd1602.h.
*******************************************************************************************/

#include <reg51.h>
#include <intrins.h>
#include <string.h>
#include "lcd1602.h"


//interrupt


void main(void)
{
  uchar Buff2[] = {0x5a, 0x68, 0x61, 0x6e, 0x67, 0x20, 0x58, 0x69, 0x61, 0x6f, 0x63, 0x68, 0x65, 0x6e, 0x67};
//  uchar Buff3[] = "Hi, mcu!";

//initialization
  ini_lcd1602();

//main
  wr_byte_ram   (1, 0x00, 'Z');	 
  wr_length_ram (1, 0x40, Buff2, 15);
  wr_length_ram (1, 0x03, "the king", 8);

  while(1);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -