CN116795315B - Method and system for realizing continuous display of character strings on LCD (liquid crystal display) based on singlechip - Google Patents

Method and system for realizing continuous display of character strings on LCD (liquid crystal display) based on singlechip Download PDF

Info

Publication number
CN116795315B
CN116795315B CN202310763779.1A CN202310763779A CN116795315B CN 116795315 B CN116795315 B CN 116795315B CN 202310763779 A CN202310763779 A CN 202310763779A CN 116795315 B CN116795315 B CN 116795315B
Authority
CN
China
Prior art keywords
characters
character
character string
flash
lcd
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310763779.1A
Other languages
Chinese (zh)
Other versions
CN116795315A (en
Inventor
张伟
蔡树衡
吴伟杰
黄秀钿
黄浩涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Hybribio Biotech Ltd
Hybribio Ltd
Guangdong Kaipu Technology Intelligent Manufacturing Co ltd
Original Assignee
Guangzhou Hybribio Biotech Ltd
Hybribio Ltd
Guangdong Kaipu Technology Intelligent Manufacturing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Hybribio Biotech Ltd, Hybribio Ltd, Guangdong Kaipu Technology Intelligent Manufacturing Co ltd filed Critical Guangzhou Hybribio Biotech Ltd
Priority to CN202310763779.1A priority Critical patent/CN116795315B/en
Publication of CN116795315A publication Critical patent/CN116795315A/en
Application granted granted Critical
Publication of CN116795315B publication Critical patent/CN116795315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a method, electronic equipment, a computer readable storage medium and a system for realizing continuous display of character strings on LCD based on a singlechip, which comprises the following steps of S1: acquiring a character string reading instruction; step S2: reading characters in the character string according to the character string reading instruction, and acquiring dot matrix data corresponding to the characters from FLASH of the singlechip according to Chinese and English types of the characters; step S3: and outputting the characters on the LCD according to the dot matrix data corresponding to the characters. The method, the electronic equipment, the computer readable storage medium and the system for realizing the continuous display of the character strings on the LCD based on the singlechip provided by the invention can effectively solve the problem that the continuous display of the character strings on the LCD has disordered character resource ordering and cannot form regular codes so as to lead the coding to be complicated, avoid the conversion of index codes, effectively reduce the workload of realizing the serial display of the character strings on the LCD and improve the service performance of the singlechip.

Description

Method and system for realizing continuous display of character strings on LCD (liquid crystal display) based on singlechip
Technical Field
The present invention relates to the field of serial character string display technology, and in particular, to a method, an electronic device, a computer readable storage medium and a system for implementing serial character string display on an LCD based on a single chip microcomputer.
Background
The Single chip microcomputer (Single-Chip Microcomputer) is an integrated circuit chip, and is a small and perfect microcomputer system formed by integrating functions (possibly including a display driving circuit, a pulse width modulation circuit, an analog multiplexer, an A/D converter and the like) such as a central processing unit CPU, a random access memory RAM, a read-only memory ROM, various I/O ports, an interrupt system, a timer/counter and the like with a silicon chip by adopting a very large scale integrated circuit technology, and is widely applied to the field of industrial control.
At present, a conventional single-chip microcomputer generally integrates a Central Processing Unit (CPU), a random access data storage (RAM), a read-only program memory (ROM), a parallel communication interface, a serial communication interface, an interrupt system, a timing circuit and a clock circuit on a single chip, and an enhanced single-chip microcomputer integrates an LCD (liquid crystal) driving circuit on the single chip, so that the single-chip microcomputer has more unit circuits and more powerful functions.
Liquid Crystal Displays (LCDs) have the advantages of rich display information, low power consumption, small size, light weight, ultra-thin and many other displays, which are incomparable, and have been widely used in recent years for intelligent instruments, meters and low power consumption electronic products controlled by single-chip computers. LCDs can be classified into segment type LCDs, character type LCDs, and dot type LCDs. The segment type LCD and the character type LCD can only be used for simple display of characters and numbers, and cannot meet the requirements of graphic curves and Chinese character display; the dot matrix LCD can display characters and numbers, various figures, curves and Chinese characters, and has wide application.
However, in the prior art, the resources of the singlechip are very limited, when dot characters are displayed, the designated characters are usually imported into software to be displayed, so that when the function design of the dot characters is displayed, parameters are difficult to input into the function in the form of a character string with a regular coding rule, further, the character string is continuously displayed on the LCD, the character resource is disordered, regular coding cannot be formed, the coding is complicated, the problem of repeated conversion of index codes occurs, and the workload of continuously displaying the character string on the LCD is greatly increased.
Disclosure of Invention
Aiming at the problems of complex and disordered coding and large workload of realizing continuous display of character strings on an LCD (liquid crystal display), the invention provides a method, electronic equipment, a computer readable medium and a system for realizing continuous display of character strings on the LCD based on a singlechip.
In order to achieve the purpose of the invention, the invention adopts the following technical scheme:
a method for realizing continuous display of character strings on LCD based on a singlechip comprises the following steps:
step S1: acquiring a character string reading instruction;
step S2: reading characters in the character string according to the character string reading instruction, and acquiring dot matrix data corresponding to the characters from FLASH of the singlechip according to Chinese and English types of the characters;
step S3: outputting the characters on the LCD according to the dot matrix data corresponding to the characters;
wherein the FLASH represents a non-volatile memory.
According to the technical scheme, characters in the character string are read through the obtained character string reading instruction, corresponding dot matrix data are obtained from the FLASH of the singlechip according to the Chinese and English types of the read characters, the characters in the character string are output on the LCD according to the dot matrix data, the problem that the character string is disordered in continuous display of character resource sequencing and cannot form regular codes so that coding is complicated is effectively solved by directly reading the dot matrix data of the characters in the FLASH of the singlechip, conversion work of making index codes is avoided, workload of realizing character string serial display on the LCD is effectively reduced, and the service performance of the singlechip is further improved.
Further, the process of obtaining the character string reading instruction in step S1 is as follows:
s11: initializing FLASH of the singlechip, and presetting a matrix resource library according to the character coding sequence;
s12: parameter function interface defining character string: and obtaining a reading instruction of the character string by the aid of the cplay string through the parameter function interface.
The process of presetting a matrix resource library according to the character coding sequence in the step S11 is as follows:
the Chinese character type is encoded according to the encoding rule of two bytes of GB2313, a page of 32-byte Chinese character lattice data is generated, a Chinese character model resource library is obtained based on the Chinese character lattice data, and the Chinese character model resource library is stored into FLASH according to page numbers 0xA1A0-0xF7F 0;
encoding English type characters according to an ASCII encoding rule, generating a page of 16-byte English character lattice data, obtaining an English matrix resource library based on the English character lattice data, and storing the English matrix resource library into a FLASH according to page numbers 0-255; simultaneously, storing the original codes of the Chinese character model resource library and the English character model resource library into a RAM;
wherein the RAM represents a random access memory.
According to the technical scheme, by initializing the FLASH, further presetting a matrix resource library in the FLASH according to the character coding sequence, wherein the matrix resource library comprises a Chinese matrix resource library and an English matrix resource library, according to the types of Chinese and English characters, dot matrix data of the Chinese and English characters are stored in the page number appointed by the FLASH according to the coding sequence of the Chinese and English characters, and original codes of the matrix resource library corresponding to the Chinese and English characters are stored in the RAM, so that programming efficiency is improved and errors are reduced; the read instruction of the acquired character string can be transmitted through the defined character string parameter function interface cDisplayString, so that the efficiency of character string reading is improved.
Further, the process of reading the characters in the character string according to the character string reading instruction in step S2 is as follows:
defining a character string reading function interface: and the flash_read is used for transmitting a reading instruction of the character string by using the parameter function interface cdisplay string, and reading the parameter symbol of the character in the character string by using the reading function interface flash_read according to the reading instruction of the character string transmitted by the parameter function interface cdisplay string.
The process of acquiring the dot matrix data corresponding to the characters from the FLASH of the singlechip according to the Chinese and English types of the characters in the step S2 is as follows:
s21: reading the original code of any byte in the characters from the RAM by using a read function interface flash_read, judging the size of the original code of the read byte, and if the original code of the byte is smaller than 0xA1 (hexadecimal number), representing the characters of the read original code as English characters; if the original code of the byte is larger than or equal to 0xA1 (hexadecimal number), the character read the original code is expressed as Chinese character, and two bytes are required to be read to form the original code of Chinese;
s22: reading lattice data information of the byte in FLASH according to the original code type of the byte by using a reading function interface flash_read;
wherein, one English character in English characters comprises 16 bytes, and one byte is a row lattice; one of the chinese characters contains 32 bytes, two bytes being a row of dot matrix.
According to the technical scheme, the character string parameter reading instruction of the character string transmission word is received through the defined function reading interface flash_read of the character string, and then the original code of any one byte in the characters is read from the RAM through the function reading interface flash_read, so that the conversion of the address/index is quickly and flexibly achieved, the parameters of the characters in the character string are read, and the dot matrix data corresponding to the characters is directly obtained from the FLASH according to the type of the original code.
Further, the process of outputting the characters on the LCD according to the character lattice data in step S3 is as follows:
s31: acquiring byte bits according to dot matrix data information of the character bytes, and judging values of the byte bits; if the value of the byte bit is 1, displaying the dot matrix data of the byte as the color of the character, and if the value of the byte bit is 0, not displaying the dot matrix data or displaying the dot matrix data as the background color on the LCD;
s32: outputting the characters in the character string on the LCD one by one according to the byte bit information;
wherein the parameters output on the LCD include coordinates, height, width, font color and background color of the character string;
s33: judging whether the characters in the character string are displayed on the LCD;
if the read function interface flash_read does not receive the read instruction of the character string transmitted by the parameter function interface cdisplay string, the display is completed;
otherwise, the step S2 is executed back.
According to the technical scheme, the byte bit in the dot matrix data of the character byte is obtained, the value of the byte bit is judged, and then the display mode of the dot matrix data of the byte on the LCD is determined according to the value of the byte bit, so that the parameters displayed on the LCD accord with the set values, whether the characters in the character string are displayed on the LCD is judged to be completed or not is judged, whether the display of the character string on the LCD accords with the set values or not is monitored in real time, the effect that the character string is continuously displayed on the LCD is achieved, the problem that the character resource is disordered and regular codes cannot be formed when the character string is continuously displayed on the LCD, and the service performance of the singlechip is improved is effectively solved.
An electronic device comprises a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor realizes the steps of the method for realizing continuous display of character strings on an LCD based on a singlechip when executing the computer program.
A computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the method for implementing continuous display of character strings on an LCD based on a single chip microcomputer.
A system for realizing character string serial display on LCD based on single chip microcomputer includes:
the application layer is used for issuing an operation instruction for reading the character strings to the operation layer;
the operation layer reads the characters in the character string according to the instruction of the application layer, and acquires dot matrix data corresponding to the characters from the FLASH of the singlechip according to the Chinese and English types of the characters;
the driving layer receives the dot matrix data of the characters transmitted in the operation layer and outputs the characters on the LCD according to the dot matrix data of the characters;
wherein the FLASH represents a non-volatile memory.
The operation layer defines a parameter function interface of a character string for the application layer: the application layer can transmit a reading instruction of the character string to the operation layer through a parameter function interface (cDisplayString);
the operation layer defines a character string reading function interface: the flash_read is used for receiving a reading instruction of the character string transmitted by the parameter function interface cdisplay string;
the operation layer reads the original code of any byte in the character from the RAM through a read function interface flash_read, and reads the dot matrix data information in the byte FLASH according to the original code of the byte;
the driving layer outputs characters in the character string on the LCD one by one according to the dot matrix data of the original codes of the bytes;
wherein the parameters output on the LCD include coordinates of the character string, height, width, font color and background color of the font, and the RAM represents a random access memory.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a method, electronic equipment, a computer readable medium and a system for realizing continuous display of character strings on an LCD (liquid crystal display) based on a singlechip. The method for directly reading the dot matrix data corresponding to the characters from the FLASH of the singlechip can rapidly acquire the appointed position of the characters in the character string on the LCD and the output parameters, realizes rapid and flexible continuous display of the character string, effectively solves the problems of disordered character resource ordering and incapability of forming regular codes to make the codes complicated and complicated when the character string is continuously displayed on the LCD, avoids conversion work of making index codes, effectively reduces the workload of realizing serial display of the characters on the LCD, and further improves the service performance of the singlechip.
Drawings
Fig. 1 is a flowchart of a method for implementing continuous display of character strings on an LCD based on a single chip microcomputer according to an embodiment of the present application;
fig. 2 is a connection structure diagram of a single chip microcomputer and an LCD according to an embodiment of the present application;
fig. 3 is a schematic program module diagram of a system for implementing character string serial display on an LCD based on a single chip microcomputer according to an embodiment of the present application.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Preferred embodiments of the present invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Embodiment one:
the embodiment provides a method for realizing continuous display of character strings on an LCD based on a singlechip, which is shown in FIG. 1, and comprises the following steps:
step S1: acquiring a character string reading instruction;
further, the process of obtaining the character string reading instruction is as follows:
s11: initializing FLASH of the singlechip, and presetting a matrix resource library according to the character coding sequence;
the process of presetting the matrix resource library according to the character coding sequence comprises the following steps:
the Chinese character type is encoded according to the encoding rule of two bytes of GB2313, a page of 32-byte Chinese character lattice data is generated, a Chinese character model resource library is generated according to the Chinese character lattice data, and the Chinese character model resource library is stored into FLASH according to the page number of 0xA1A0-0xF7F0, so that the use frequency of 99.75% of China is covered;
encoding English type characters according to an ASCII encoding rule, generating a page of 16-byte English character lattice data, generating an English matrix resource library according to the English character lattice data, and storing the English matrix resource library into a FLASH according to page numbers of 0-255; simultaneously, storing the original codes of the Chinese character model resource library and the English character model resource library into a RAM;
wherein the FLASH represents a nonvolatile memory, and the RAM represents a random access memory.
S12: parameter function interface defining character string: and obtaining a reading instruction of the character string by the aid of the cplay string through the parameter function interface.
The parameter function interface of the character string is defined by the following codes: the number of the layers of the cdisplay string,
illustratively, the parameter function interface cdisplay string transmits related parameters displayed on the LCD, such as:
the parameters to be specified when calling the parameter function interface cdisplay string are as follows:
to display the starting x coordinate of the character string on the LCD, the starting y coordinate of the character string on the LCD, the width of a word, the height of a word, the character string to be displayed ends with a "\0" escape character, the font color, the background color of the font (when the font color is transparent as the background color of the font indicates that the text background is transparent).
It can be understood that by initializing FLASH, further presetting a matrix resource library corresponding to Chinese and English in the FLASH according to the character coding sequence, storing the dot matrix data of the Chinese and English characters in the page number appointed by FLASH according to the Chinese and English coding sequence according to the type of the Chinese and English characters, and storing the original codes of the matrix resource library corresponding to Chinese and English in RAM, the programming efficiency is improved and the errors are reduced; the read instruction of the acquired character string can be transmitted through the defined character string parameter function interface cDisplayString, so that the efficiency of character string reading is improved.
Step S2: reading characters in the character string according to the character string reading instruction, and acquiring dot matrix data corresponding to the characters from FLASH of the singlechip according to Chinese and English types of the characters;
further, the process of reading the characters in the character string according to the character string reading instruction is as follows:
the string read function interface is defined using the following code: the flash _ read is used to read the flash _ read,
and transmitting a reading instruction of the character string by using the parameter function interface cdisplay string, and reading the parameter symbol of the character in the character string by using the reading function interface flash_read according to the reading instruction of the character string transmitted by the parameter function interface cdisplay string.
The process for acquiring the dot matrix data corresponding to the characters from the FLASH of the singlechip according to the Chinese and English types of the characters comprises the following steps:
s21: reading the original code of any byte in the characters from the RAM by using a read function interface flash_read, judging the size of the read original code of the byte, and if the original code of the byte is smaller than 0xA1 (hexadecimal number), representing the original code as English characters; if the original code of the byte is larger than or equal to 0xA1 (hexadecimal number), the byte is expressed as Chinese character, and two bytes are required to be read to form the original code of Chinese;
s22: reading lattice data information of the byte in FLASH according to the original code type of the byte by using a reading function interface flash_read;
wherein, one English character in English characters comprises 16 bytes, and one byte is a row lattice; one of the chinese characters contains 32 bytes, two bytes being a row of dot matrix.
It can be understood that the character string parameter reading instruction of the character string transmission word is received through the defined reading function interface flash_read of the character string, and then the original code of any one byte in the character is read from the RAM through the reading function interface flash_read, so that the conversion of the address/index is quickly and flexibly achieved, the parameters of the character in the character string are read, and the dot matrix data corresponding to the character is directly obtained from the FLASH according to the type of the original code.
Step S3: outputting the characters on the LCD according to the dot matrix data of the characters;
further, the process of outputting the characters on the LCD according to the dot matrix data of the characters is as follows:
s31: acquiring byte bits according to dot matrix data information of the character bytes, and judging values of the byte bits; if the value of the byte bit is 1, displaying the dot matrix data of the byte as the color of the character, and if the value of the byte bit is 0, not displaying the dot matrix data or displaying the dot matrix data as the background color on the LCD;
s32: outputting the characters in the character string on the LCD one by one according to the byte bit information;
wherein the parameters output on the LCD include coordinates of the character string, height, width, font color, and background color.
S33: judging whether the characters in the character string are displayed on the LCD;
if the read function interface flash_read does not receive the read instruction of the character string transmitted by the parameter function interface cdisplay string, the display is completed;
otherwise, the step S2 is executed back.
In an exemplary embodiment, assume that a string of Chinese and English mixed black strings "HelloWord, hash! ".
For the save with "HelloWord, hello-! "character string variables (variables are stored in RAM) read characters one by one. The ASCII symbol is one byte and chinese is two bytes.
One byte is read, if the original code of the byte is smaller than 0xA1 (hexadecimal number), the byte is expressed as an ASCII symbol, and if the original code of the byte is larger than or equal to 0xA1 (hexadecimal number), the byte is expressed as a Chinese character, and two bytes are required to be read to form the Chinese original code. Taking the first character "H" of the string as an example, the original code is 0x48.
The original code 0x48 is used as an index, and the dot matrix information of 16 bytes of the 0x48 page of FLASH is read. One byte is a row dot matrix, whether the dot matrix is displayed is determined according to byte bit 1 or 0, and 16 bytes are 16 rows in total.
If the character is Chinese, taking the character 'you' as an example and the original code is 0xC4E3, reading 32 bytes of the 0xC4E3 page of FLASH, wherein two bytes are a row of dot matrix, and determining whether to display the dot matrix according to byte bit 1 or 0, wherein the total number of the 32 bytes is 16 rows.
Wherein the parameters output on the LCD display screen include: width, height, color, background color, etc. of characters in the character string.
In this embodiment, the reading instruction of the character string is obtained, and the characters in the character string are read according to the reading instruction of the character string, so that corresponding dot matrix data is obtained from the FLASH of the singlechip according to the Chinese and English type of the read characters, and the characters are output on the LCD according to the dot matrix data of the characters. The method for directly reading the dot matrix data corresponding to the characters from the FLASH of the singlechip can rapidly acquire the appointed position and the output parameters of the characters in the character string on the LCD, realizes rapid and flexible character string serial display, effectively solves the problems of disordered character resource ordering and incapability of forming regular codes to make coding complicated and complicated when the character string is continuously displayed on the LCD, avoids conversion of index codes, effectively reduces the workload of realizing character string serial display on the LCD, and improves the service performance of the singlechip.
Embodiment two:
an electronic device, see fig. 2, comprising a single-chip microcomputer and an LCD display screen, and comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the steps of the method for realizing continuous display of character strings on an LCD based on the single-chip microcomputer according to the embodiment one are realized when the processor executes the computer program.
The memory comprises a nonvolatile memory (FLASH) and a Random Access Memory (RAM), wherein the nonvolatile memory (FLASH) is mainly used for storing a word module resource library corresponding to Chinese and English characters, the Random Access Memory (RAM) is mainly used for storing the original codes of bytes in the Chinese and English characters, and the word module resource library contains dot matrix data corresponding to the characters and the original codes of the bytes.
In an exemplary embodiment, when the electronic device works, the processor runs a computer program stored on the memory, so as to read the original codes in the matrix resource library corresponding to Chinese and English in the memory, judge the size of the original codes of the bytes by the processor, classify the characters, and read the corresponding dot matrix data according to the types of the original codes.
And then the processor acquires the corresponding byte bit through the dot matrix data corresponding to the characters, judges the byte bit, displays the dot matrix data of the bytes as the color of the characters if the value of the byte bit is 1, and does not display the dot matrix data or displays the dot matrix data as the background color if the value of the byte bit is 0. Judging whether the characters in the character string are completely displayed on the LCD display screen, and if the characters are not continuously read from the memory in the processor, indicating that the display is completed; if the processor continues to run the computer program to read the characters in the memory, the processor indicates that the characters are not finished, and the operation process is continued.
Embodiment III:
a computer readable storage medium, such as FLASH memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), non-volatile memory (FLASH), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, server, app application mall, etc., storing a computer program that when executed by a processor, performs the steps of the method of implementing continuous display of strings on an LCD based on a single chip as described in embodiment one.
Embodiment four:
a system for implementing character string serial display on an LCD based on a single chip microcomputer, see fig. 3, comprising:
the application layer is used for issuing an operation instruction for reading the character strings to the operation layer;
the operation layer reads the characters in the character string according to the instruction of the application layer, and acquires dot matrix data corresponding to the characters from the FLASH of the singlechip according to the Chinese and English types of the characters;
the driving layer receives the dot matrix data of the characters transmitted in the operation layer and outputs the characters on the LCD according to the dot matrix data of the characters;
wherein the FLASH represents a non-volatile memory.
The operation layer defines a parameter function interface of a character string for the application layer: the application layer can transmit a reading instruction of the character string and related parameters displayed on the LCD to the operation layer through a parameter function interface (cDisplayString), wherein the related parameters comprise coordinates, height, width, font color, background color and the like of the character string;
the operation layer defines a character string reading function interface: the flash_read is used for receiving a reading instruction of the character string transmitted by the parameter function interface cdisplay string;
the operation layer reads the original code of any byte in the character from the RAM through a read function interface flash_read, and reads the dot matrix data information in the byte FLASH according to the original code of the byte;
the driving layer outputs characters in the character string on the LCD one by one according to the dot matrix data of the original codes of the bytes;
wherein the parameters output on the LCD include coordinates of the character string, height, width, font color and background color of the font, and the RAM represents a random access memory.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present invention.

Claims (4)

1. A method for realizing continuous display of character strings on LCD based on single chip microcomputer is characterized in that,
step S1: acquiring a character string reading instruction;
step S2: reading characters in the character string according to the character string reading instruction, and acquiring dot matrix data corresponding to the characters from FLASH of the singlechip according to Chinese and English types of the characters;
step S3: outputting the characters on the LCD according to the dot matrix data corresponding to the characters;
wherein the FLASH represents a non-volatile memory;
the process of obtaining the character string reading instruction in step S1 is as follows:
s11: initializing FLASH of the singlechip, and presetting a matrix resource library according to the character coding sequence;
s12: parameter function interface defining character string: the method comprises the steps of (1) obtaining a reading instruction of a character string through a parameter function interface (cDisplayString);
the process of presetting the matrix resource library according to the character encoding sequence in step S11 is as follows:
the Chinese character type is encoded according to the encoding rule of two bytes of GB2313, a page of 32-byte Chinese character lattice data is generated, a Chinese character model resource library is obtained based on the Chinese character lattice data, and the Chinese character model resource library is stored into FLASH according to page numbers 0xA1A0-0xF7F 0;
encoding English type characters according to an ASCII encoding rule, generating an English character lattice data of 16 bytes, obtaining an English matrix resource library based on the English character lattice data, and storing the English matrix resource library into a FLASH according to page numbers 0-255; simultaneously, storing the original codes of the Chinese character model resource library and the English character model resource library into a RAM;
wherein the RAM represents a random access memory;
the process of reading the characters in the character string according to the character string reading instruction in step S2 is as follows:
defining a character string reading function interface: flash_read, which is used for transmitting a reading instruction of a character string by using a parameter function interface cdisplay string, and reading a parameter character of a character in the character string by using a reading function interface flash_read according to the reading instruction of the character string transmitted by the parameter function interface cdisplay string;
the process of acquiring the dot matrix data corresponding to the characters from the FLASH of the singlechip according to the Chinese and English types of the characters in the step S2 is as follows:
s21: reading the original code of any byte in the characters by using a read function interface flash_read, judging the size of the original code of the read byte, and if the original code of the byte is smaller than 0xA1 (hexadecimal number), representing the characters of the read original code as English characters; if the original code of the byte is larger than or equal to 0xA1 (hexadecimal number), the character read the original code is expressed as Chinese character, and then two bytes are read to form the original code of Chinese;
s22: reading lattice data information of the byte in FLASH by using a read function interface flash_read according to the original code type of the byte;
among the english characters, one english character contains 16 bytes, and one byte is a row of dot matrix; of the chinese characters, one chinese character contains 32 bytes, two bytes being a row lattice;
the process of outputting the characters on the LCD according to the character lattice data in step S3 is as follows:
s31: acquiring byte bits according to dot matrix data information of the character bytes, and judging values of the byte bits; if the value of the byte bit is 1, displaying the dot matrix data of the byte as the color of the character, and if the value of the byte bit is 0, not displaying the dot matrix data or displaying the dot matrix data as the background color on the LCD;
s32: outputting the characters in the character string on the LCD one by one according to the byte bit information;
the parameters output on the LCD comprise coordinates, height, width, font color and background color of the character string, and when the font color is identical to the background color of the font, the character background is transparent;
s33: judging whether the characters in the character string are displayed on the LCD;
if the read function interface flash_read does not receive the read instruction of the character string transmitted by the parameter function interface cdisplay string, the display is completed;
otherwise, the step S2 is executed back.
2. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the steps of the method of claim 1 when the computer program is executed by the processor.
3. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which is executed by a processor, implementing the steps of the method according to claim 1.
4. A system for realizing character string serial display on LCD based on single chip microcomputer is characterized in that the system comprises:
the application layer is used for issuing an operation instruction for reading the character strings to the operation layer;
the operation layer reads the characters in the character string according to the instruction of the application layer, and acquires dot matrix data corresponding to the characters from the FLASH of the singlechip according to the Chinese and English types of the characters;
the driving layer receives the dot matrix data of the characters transmitted in the operation layer and outputs the characters on the LCD according to the dot matrix data of the characters;
wherein the FLASH represents a non-volatile memory;
the operation layer defines a parameter function interface of a character string for the application layer: the application layer can transmit a reading instruction of the character string to the operation layer through a parameter function interface (cDisplayString);
the operation layer defines a character string reading function interface: the flash_read is used for receiving a reading instruction of the character string transmitted by the parameter function interface cdisplay string;
the operation layer reads the original code of any byte in the character through a read function interface flash_read, and reads the dot matrix data information in the byte FLASH according to the original code of the byte;
the driving layer outputs characters in the character string on the LCD one by one according to the dot matrix data of the original codes of the bytes;
wherein the parameters output on the LCD include coordinates of the character string, height, width, font color, and background color of the font.
CN202310763779.1A 2023-06-26 2023-06-26 Method and system for realizing continuous display of character strings on LCD (liquid crystal display) based on singlechip Active CN116795315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310763779.1A CN116795315B (en) 2023-06-26 2023-06-26 Method and system for realizing continuous display of character strings on LCD (liquid crystal display) based on singlechip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310763779.1A CN116795315B (en) 2023-06-26 2023-06-26 Method and system for realizing continuous display of character strings on LCD (liquid crystal display) based on singlechip

Publications (2)

Publication Number Publication Date
CN116795315A CN116795315A (en) 2023-09-22
CN116795315B true CN116795315B (en) 2024-02-09

Family

ID=88041694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310763779.1A Active CN116795315B (en) 2023-06-26 2023-06-26 Method and system for realizing continuous display of character strings on LCD (liquid crystal display) based on singlechip

Country Status (1)

Country Link
CN (1) CN116795315B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491327A (en) * 2017-07-31 2017-12-19 郑州众智科技股份有限公司 A kind of wiring method based on generator set controller self-defining character string
WO2020263674A1 (en) * 2019-06-24 2020-12-30 Oracle International Corporation User interface commands for regular expression generation
CN115080478A (en) * 2022-06-09 2022-09-20 苏州大学 Embedded platform display system
CN115988170A (en) * 2023-03-20 2023-04-18 全时云商务服务股份有限公司 Method and device for clearly displaying Chinese and English characters in real-time video screen combination in cloud conference

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11269934B2 (en) * 2018-06-13 2022-03-08 Oracle International Corporation Regular expression generation using combinatoric longest common subsequence algorithms

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491327A (en) * 2017-07-31 2017-12-19 郑州众智科技股份有限公司 A kind of wiring method based on generator set controller self-defining character string
WO2020263674A1 (en) * 2019-06-24 2020-12-30 Oracle International Corporation User interface commands for regular expression generation
CN115080478A (en) * 2022-06-09 2022-09-20 苏州大学 Embedded platform display system
CN115988170A (en) * 2023-03-20 2023-04-18 全时云商务服务股份有限公司 Method and device for clearly displaying Chinese and English characters in real-time video screen combination in cloud conference

Also Published As

Publication number Publication date
CN116795315A (en) 2023-09-22

Similar Documents

Publication Publication Date Title
US8972295B2 (en) Dynamic visual statistical data display and method for limited display device
CN108985066B (en) Intelligent contract security vulnerability detection method, device, terminal and storage medium
JPH0469794B2 (en)
US10768947B2 (en) Method for interface refresh synchronization,terminal device, and non-transitory computer-readable storage medium
KR101159320B1 (en) Iteratively solving constraints in a font-hinting language
CN101621575B (en) Embedded vector font color changing method
CN109992221B (en) Method for realizing processor chip for vector font operation
CN116795315B (en) Method and system for realizing continuous display of character strings on LCD (liquid crystal display) based on singlechip
CN112000336A (en) Interface rendering method, electronic device and computer-readable storage medium
CN114201627A (en) Display method, device and equipment for electronic ink screen and storage medium
CN101201829B (en) Chinese character library system as well as character code display method thereof
CN102109999B (en) Realizing method for liquid crystal interface relay protection
US20230351976A1 (en) Internet-of-things terminal and picture updating method therefor
US20050219255A1 (en) User interface display apparatus using texture mapping method
JPS6329291B2 (en)
CN114493983A (en) Compression method and device of character data, storage medium and electronic equipment
CN102902534A (en) Transparent OSD (Optical Scanning Device) software realization method
CN114237795A (en) Terminal interface display method and device, electronic equipment and readable storage medium
CN105551450A (en) Display driving method and device for segment type liquid crystal display screen
JPS6327727B2 (en)
CN204375017U (en) A kind of fingerprint attendance system
CN204406441U (en) A kind of e-inks set of hanging scrolls code proving installation
CN115001628B (en) Data encoding method and device, data decoding method and device and data structure
CN204090056U (en) A kind of intelligent remote controller
KR100619833B1 (en) Display data update method for mobile station

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant