Single chip LCD display program

Publisher:EtherealGraceLatest update time:2012-10-24 Source: 21IC Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The assembly language program of the microcontroller driving the 1602 LCD display. You only need to change the port in the first 3 lines. The data port is P0. The program has passed the test.

      RS EQU P2.0;
      RW EQU P2.1;
      E EQU P2.2;
      ORG 0000H;
      AJMP MAIN;
      ORG 0100H;
MAIN: MOV P0,#01H;
      LCALL XRT;
      MOV P0,#038H;
      LCALL XRT;
      MOV P0,#0CH;
      LCALL XRT;
      MOV P0,#080H;
      LCALL XRT;
      MOV R1,#080H;
      MOV P0,#01010011B;
      LCALL WXS;
      LCALL QJ;
      MOV P0,#01010000B;
      LCALL WXS;
      LCALL QJ;
      MOV P0,#01010011B
      LCALL WXS;
      LCALL QJ;
      MOV P0,#01010111B
      LCALL WXS;
      LCALL QJ;
      MOV P0,#01000100B
      LCALL WXS;
      LCALL QJ;
      MOV P0,#00111000B
      LCALL WXS;
      LCALL QJ;
      MOV P0,#01010101B
      LCALL WXS;
      LCALL QJ;
WXS: SETB RS;
      CLR RW;
      CLR E;
      RET;
QJ: MOV A,R1;
      INC A;
      MOV R1,A;
      MOV P0,A;
      LCALL XRT;
      RET;
XRT: CLR RS;
      CLR RW;
      CLR E;
      LCALL CKMB;
      SETB E;
      RET;
CKMB: MOV P0,#0FFH;
      CLR RS;
      SETB RW;
      CLR E;
      NOP
      SETB E;
      JB P0.7, CKMB;
      RET
      END

Keywords:MCU Reference address:Single chip LCD display program

Previous article:51 single chip microcomputer super alarm clock program design (with pictures)
Next article:ds18B20 temperature program based on 51 single chip microcomputer

Recommended ReadingLatest update time:2024-11-16 15:31

Programming based on single chip microcomputer application AVR 18B20
#include //Includes model header file #include //Includes "bit" operation header file #include //Standard input and output header file #include //Includes custom constant header file #include "SMG.C" //Includes digital tube display function /******************************************** #include//Include model header f
[Microcontroller]
Programming based on single chip microcomputer application AVR 18B20
Design of furnace temperature control system using AT89C51 microcontroller and temperature transmitter
1 Introduction With the development of science and technology and the improvement of industrial production levels, electric heating furnaces have been widely used in various industrial controls such as metallurgy, chemical industry, and machinery, and occupy a pivotal position in the national economy. For such a contr
[Microcontroller]
Design of furnace temperature control system using AT89C51 microcontroller and temperature transmitter
How to manage too many global variables in a microcontroller development project?
Recently, several friends have reported that writing programs feels messy. They don’t know how to plan. They just write whatever comes to mind. Global variables are everywhere, and many problems arise when there are too many codes. And if you write a program without comments, you will find that you can’t understand
[Microcontroller]
51 microcontroller ultrasonic ranging program code sharing
/Ultrasonic module ME007 display program //Crystal oscillator=8M //MCU=STC10F04XE //P0.0-P0.6 common anode digital tube pins //Trig = P1^0 //Echo = P3^2 #include //Include a header file for the 52 standard kernel #define uchar unsigned char //Define it for ease of use #define uint unsigned int #define ulong unsigned l
[Microcontroller]
MCS-51 single chip microcomputer input and output port
8051 has 4 groups of 8-bit I/O ports: P0, P1, P2 and P3. P1, P2 and P3 are quasi-bidirectional ports, and P0 is a bidirectional three-state input and output port. Let's introduce these ports separately:       P0 and P2 ports:     The right figure is a circuit diagram of one of the P0 and P2 ports. As can b
[Microcontroller]
MCS-51 single chip microcomputer input and output port
STM32 Learning Road - LCD (3)
The function is copied from the example of struggle, which can be regarded as some notes. However, the annotations of the example of struggle are not very detailed. Today I went to the forum of Zhengdian Atom, and I felt that Zhengdian Atom did a really good job. All the information is open source, and most of the que
[Microcontroller]
Interface technology between LCD module TC1602A and single chip microcomputer
  With the development of science and technology, the application prospects of liquid crystal display modules are broader. At present, they have been widely used in electronic watches, calculators, LCD TVs, portable computers, handheld electronic toys, copiers, fax machines and many other aspects.   Liquid crystal di
[Microcontroller]
Interface technology between LCD module TC1602A and single chip microcomputer
Low power consumption design based on C8051F series microcontroller
Introduction   In the design of control terminal systems, when the system requires low overall power consumption, the C8051 series of microcontrollers is the best choice. They have flexible clock hardware that allows the system to easily switch between high-efficiency operation mode and low-power consumption mode. Th
[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号