LCD1602 screen displays email and mobile phone numbers (scrolling and flashing display program Proteus simulation)

Publisher:SparklingEyesLatest update time:2019-12-12 Source: 51heiKeywords:LCD1602 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Learned how to use LCD to display two lines of email and phone number


Three display modes:
direct display,
scrolling display
, flashing display,
simulation schematic diagram as follows,
51hei screenshot 20191211232405.png

single chip source program as follows:


#include
sbit rs=P2^0; 
sbit rw=P2^1;
sbit en=P2^2;
#define uint unsigned int
#define uchar unsigned char
uchar code tab1[]={"123456@163.com"};
uchar code tab2[]={"tel:1234567891"};
void delay(unsigned int xms);
void write_com(uchar com)
{
    rw=0;
    rs=0;//instruction register
    P0=com;
    delay(5); en
    =1;
    delay(5);
    en=0;
}
void write_data(uchar dat)
{
    rw=0;
    rs=1;//data register
    P0=dat;
    delay(5);
    en=1;
    delay(5);
    en=0;
}
void init()
{
   en=0;
   write_com(0x01);
   write_com(0x06);
   write_com(0x0c);
   write_com(0x38);
}
int main()
{
   uint i;
   init();
   write_com(0x80+0x10);
       for(i=0;i<15;i++)
       {
               write_data(tab1[ i]);
            delay(50);
       }
       write_com(0x80+0x50);
       for(i=0;i<15;i++)
       {
               write_data(tab2[ i]);
            delay(50); 
        }
   while(1)
   {
              for(i=0;i<16;i++)
        {
          write_com(0x1c);
          delay(50);
        }
      
   }
   return 0;
}


void delay(unsigned int xms)
{
   unsigned i,j;
   for(i=xms;i>0;i--)
   for(j=110;j>0;j--);
}

Keywords:LCD1602 Reference address:LCD1602 screen displays email and mobile phone numbers (scrolling and flashing display program Proteus simulation)

Previous article:Programming of Human Infrared Alarm Based on 51 Single Chip Microcomputer
Next article:Proteus simulation and source program design of single chip temperature control fan

Recommended ReadingLatest update time:2024-11-16 12:48

Design of badminton scoring device based on 51 single chip microcomputer
1. Hardware Solution This design uses the AT89C51 microcontroller as the core component. This design consists of three parts: control system, display module, and key drive module. The main program, interrupt program, display program function module program, etc. are written to realize the badminton scorer function.
[Microcontroller]
Design of badminton scoring device based on 51 single chip microcomputer
Single chip microcomputer controls LCD1602 to display characters (test passed)
This test is on the commonly used LCD1602 display screen. The operation process is very simple, but there are some minor issues to pay attention to. For example, the LCD processing speed is a bit slow, and the microcontroller needs to delay appropriately when sending control instructions, otherwise the operation may fa
[Microcontroller]
51 single chip microcomputer LCD1602 stepper motor control
#include          //51 chip pin definition header file #include intrins.h //Internally includes the delay function _nop_();   #define uchar unsigned char #define uint   unsigned int #define delayNOP(); {_nop_();_nop_();_nop_();_nop_();}; char code SST516 _at_ 0x003b;     uchar code FFW ={0xf1,0xf3,0xf
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号