CN112419951A - Segment code liquid crystal driving method - Google Patents
Segment code liquid crystal driving method Download PDFInfo
- Publication number
- CN112419951A CN112419951A CN202011140552.4A CN202011140552A CN112419951A CN 112419951 A CN112419951 A CN 112419951A CN 202011140552 A CN202011140552 A CN 202011140552A CN 112419951 A CN112419951 A CN 112419951A
- Authority
- CN
- China
- Prior art keywords
- codec
- codef
- codee
- codeg
- codeb
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/04—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of a single character by selection from a plurality of characters, or by composing the character by combination of individual elements, e.g. segments using a combination of such display devices for composing words, rows or the like, in a frame with fixed character positions
- G09G3/16—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of a single character by selection from a plurality of characters, or by composing the character by combination of individual elements, e.g. segments using a combination of such display devices for composing words, rows or the like, in a frame with fixed character positions by control of light from an independent source
- G09G3/18—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of a single character by selection from a plurality of characters, or by composing the character by combination of individual elements, e.g. segments using a combination of such display devices for composing words, rows or the like, in a frame with fixed character positions by control of light from an independent source using liquid crystals
Landscapes
- Engineering & Computer Science (AREA)
- Chemical & Material Sciences (AREA)
- Crystallography & Structural Chemistry (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Control Of Indicators Other Than Cathode Ray Tubes (AREA)
Abstract
The invention discloses a segment code liquid crystal driving method, which comprises the following steps: the method comprises the following steps: code breaking sequencing, which is defined from top to bottom according to COM 0-COM 5 from left to right from SEG0 on a liquid crystal drawing; step two: classifying and naming, using an assembly grammar to enable numbers to correspond to segment codes, and combining the segment codes into an array which is convenient to program; step three: manufacturing a segment code structure body; step four: scanning the structure; step five: judging whether the number is a corresponding number; step six: the corresponding number is displayed. The invention has the beneficial effects that: different liquid crystal segment codes of the same unordered digital tube are easily extracted from the huge segment codes to form a display number, so that the efficiency of replacing the segment code liquid crystal display program is improved, the operation is simple and convenient, and the working efficiency is improved.
Description
Technical Field
The invention relates to the technical field of electronics, in particular to a segment code liquid crystal driving method.
Background
A segment code liquid crystal display is frequently used in instruments, particularly, a large number of numbers and independent fixed indicators need to be displayed in some equipment, and a liquid crystal display manufacturer often has difficulty in regularly distributing various indicators due to layout problems when displaying drawings. Therefore, when a programmer is driving, it is often necessary to put together the segment codes distributed at different positions according to the display requirement to obtain a complete display, for example, 7 segment codes are required for displaying a number 8, if the segment codes are distributed in different SEG pins. A separate function is needed to screen the 7 segment codes together. If the display internal amount is not much better. If a large number of numbers are displayed, a large number of functions are required. A large amount of time of developers is wasted, the program is called to waste efficiency, and the maintenance is very troublesome in the future.
Therefore, a segment code liquid crystal driving method is provided.
Disclosure of Invention
The invention aims to provide a segment code liquid crystal driving method, which can easily extract different liquid crystal segment codes of the same digital tube which is dispersed disorderly from a huge segment code to construct a display number so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: a segment code liquid crystal driving method comprises the following steps:
the method comprises the following steps: code breaking sequencing, which is defined from top to bottom according to COM 0-COM 5 from left to right from SEG0 on a liquid crystal drawing;
step two: classifying and naming, using an assembly grammar to enable numbers to correspond to segment codes, and combining the segment codes into an array which is convenient to program;
step three: making segment code structure body, namely making segment code mark byte mapped by digit, using 8 BIT BITs of one byte to correspond to 8 segments of digit;
step four: a scanning structure for starting scanning the structure by displaying a number as required;
step five: judging whether the number is a corresponding number;
step six: the corresponding number is displayed.
Preferably, in step two: the combination is carried out by the following method, # define u8DIGIT _ AtoG (n) { DISPLAY # # n # # A, DISPLAY # # n # # B, DISPLAY # # n # # C,
DISPLAY_##n##D ,DISPLAY_##n##E ,DISPLAY_##n##F ,DISPLAY_##n##G }
const static u8 DIGIT_TABLE[][7]={/*A B C D E F G*/。
preferably, in step three: the structure was produced by: # define CODEA 0x 01/. ANG A pen segment >
# define CODEB 0x 02/# B segment +
# define CODEC 0x 04/. dot C segment @ C
# define CODED 0x 08/# D pen segment +
# define CODE 0x 10/. dot E segment >
# define CODEF 0x 20/. dot F segment >
# define CODEG 0x 40/. dot G pen segment >
# define CODEDP 0x 80/# DP segment +
static const u8 CODE_TABLE[][2]=
{
{0, CODEA+CODEB+CODEC+CODEC+CODEE+CODEF},
{1, CODEB+CODEC},
{2, CODEA+CODEB+CODEG+CODEE+CODEC},
{3, CODEA+CODEB+CODEG+CODEC+CODEC},
{4, CODEF+CODEG+CODEB+CODEC},
{5, CODEA+CODEF+CODEG+CODEC+CODEC},
{6, CODEA+CODEC+CODEC+CODEE+CODEF+CODEG},
{7, CODEA+CODEB+CODEC},
{8, CODEA+CODEB+CODEC+CODEC+CODEE+CODEF+CODEG},
{9, CODEA+CODEB+CODEC+CODEC+CODEF+CODEG},
{'A', CODEA+CODEB+CODEC+CODEE+CODEF+CODEG},
{'b', CODEC+CODEC+CODEE+CODEF+CODEG},
{'C', CODEA+CODEC+CODEE+CODEF},
{'-', CODEG},
{'E', CODEA+CODEF+CODEE+CODEC+CODEG},
{'F', CODEA+CODEF+CODEE+CODEG},
{'P', CODEA+CODEB+CODEG+CODEF+CODEE},
{'t', CODEF+CODEE+CODEG+CODEC},
{'r', CODEE+CODEG},
{'J', CODEB+CODEC+CODEC+CODEE},
{'o', CODEG+CODEC+CODEC+CODEE},
{'L', CODEF+CODEE+CODEC},
{'d', CODEB+CODEC+CODEC+CODEE+CODEG},
{'U', CODEF+CODEE+CODEC+CODEC+CODEB},
{'S', CODEA+CODEF+CODEG+CODEC+CODEC},
{'V', CODEF+CODEE+CODEC+CODEC+CODEB},
{'H', CODEF+CODEE+CODEG+CODEC+CODEB},
{'K', CODEF+CODEE},
{'n', CODEF+CODEE+CODEA+CODEB+CODEC},
{'i', CODEE},
{'y', CODEB+CODEG+CODEC+CODEF+CODEC},
}。
Preferably, in step four, the scan structure is performed by void Display _ setDigit (u8 u8n, u8 u8v)
{
u8 u8i,u8j;
u8n--;
if (u8n >= (sizeof(DIGIT_TABLE)/sizeof(DIGIT_TABLE[0]))) return;
for (u8i=0; u8i<(sizeof(CODE_TABLE)/sizeof(CODE_TABLE[0])); i++){
if (SEG[u8i][0] == u8v){
for (u8j=0; u8j<7; u8j++){
if (CODE_TABLE[u8i][1]&(1<<u8j)){
mDispBuf[DIGIT_TABLE[u8n][u8j]/6] |= 1<<(DIGIT_TABLE[u8n][u8j]%6);
}
}
return;
}
}
return;
}。
Compared with the prior art, the invention has the beneficial effects that: different liquid crystal segment codes of the same unordered digital tube are easily extracted from the huge segment codes to form a display number, so that the efficiency of replacing the segment code liquid crystal display program is improved, the operation is simple and convenient, and the working efficiency is improved.
Drawings
Fig. 1 is a schematic diagram of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present invention provides a technical solution:
a segment code liquid crystal driving method comprises the following steps:
the method comprises the following steps: code breaking sequencing, which is defined from top to bottom according to COM 0-COM 5 from left to right from SEG0 on a liquid crystal drawing;
step two: classifying and naming, using an assembly grammar to enable numbers to correspond to segment codes, and combining the segment codes into an array which is convenient to program;
step three: making segment code structure body, namely making segment code mark byte mapped by digit, using 8 BIT BITs of one byte to correspond to 8 segments of digit;
step four: a scanning structure for starting scanning the structure by displaying a number as required;
step five: judging whether the number is a corresponding number;
step six: the corresponding number is displayed.
2. The segment code liquid crystal driving method according to claim 1, wherein: in the second step: the combination is carried out by the following method, # define u8DIGIT _ AtoG (n) { DISPLAY # # n # # A, DISPLAY # # n # # B, DISPLAY # # n # # C,
DISPLAY_##n##D ,DISPLAY_##n##E ,DISPLAY_##n##F ,DISPLAY_##n##G }
const static u8 DIGIT_TABLE[][7]={/*A B C D E F G*/。
3. the segment code liquid crystal driving method according to claim 1, wherein: in step three: the structure was produced by: # define CODEA 0x 01/. ANG A pen segment >
# define CODEB 0x 02/# B segment +
# define CODEC 0x 04/. dot C segment @ C
# define CODED 0x 08/# D pen segment +
# define CODE 0x 10/. dot E segment >
# define CODEF 0x 20/. dot F segment >
# define CODEG 0x 40/. dot G pen segment >
# define CODEDP 0x 80/# DP segment +
static const u8 CODE_TABLE[][2]=
{
{0, CODEA+CODEB+CODEC+CODEC+CODEE+CODEF},
{1, CODEB+CODEC},
{2, CODEA+CODEB+CODEG+CODEE+CODEC},
{3, CODEA+CODEB+CODEG+CODEC+CODEC},
{4, CODEF+CODEG+CODEB+CODEC},
{5, CODEA+CODEF+CODEG+CODEC+CODEC},
{6, CODEA+CODEC+CODEC+CODEE+CODEF+CODEG},
{7, CODEA+CODEB+CODEC},
{8, CODEA+CODEB+CODEC+CODEC+CODEE+CODEF+CODEG},
{9, CODEA+CODEB+CODEC+CODEC+CODEF+CODEG},
{'A', CODEA+CODEB+CODEC+CODEE+CODEF+CODEG},
{'b', CODEC+CODEC+CODEE+CODEF+CODEG},
{'C', CODEA+CODEC+CODEE+CODEF},
{'-', CODEG},
{'E', CODEA+CODEF+CODEE+CODEC+CODEG},
{'F', CODEA+CODEF+CODEE+CODEG},
{'P', CODEA+CODEB+CODEG+CODEF+CODEE},
{'t', CODEF+CODEE+CODEG+CODEC},
{'r', CODEE+CODEG},
{'J', CODEB+CODEC+CODEC+CODEE},
{'o', CODEG+CODEC+CODEC+CODEE},
{'L', CODEF+CODEE+CODEC},
{'d', CODEB+CODEC+CODEC+CODEE+CODEG},
{'U', CODEF+CODEE+CODEC+CODEC+CODEB},
{'S', CODEA+CODEF+CODEG+CODEC+CODEC},
{'V', CODEF+CODEE+CODEC+CODEC+CODEB},
{'H', CODEF+CODEE+CODEG+CODEC+CODEB},
{'K', CODEF+CODEE},
{'n', CODEF+CODEE+CODEA+CODEB+CODEC},
{'i', CODEE},
{'y', CODEB+CODEG+CODEC+CODEF+CODEC},
}。
4. The segment code liquid crystal driving method according to claim 1, wherein: in the fourth step, the scan structure is performed by void Display _ SetDigit (u8 u8n, u8 u8v)
{
u8 u8i,u8j;
u8n--;
if (u8n >= (sizeof(DIGIT_TABLE)/sizeof(DIGIT_TABLE[0]))) return;
for (u8i=0; u8i<(sizeof(CODE_TABLE)/sizeof(CODE_TABLE[0])); i++){
if (SEG[u8i][0] == u8v){
for (u8j=0; u8j<7; u8j++){
if (CODE_TABLE[u8i][1]&(1<<u8j)){
mDispBuf[DIGIT_TABLE[u8n][u8j]/6] |= 1<<(DIGIT_TABLE[u8n][u8j]%6);
}
}
return;
}
}
return;
}。
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (4)
1. A segment code liquid crystal driving method is characterized in that: the method comprises the following steps:
the method comprises the following steps: code breaking sequencing, which is defined from top to bottom according to COM 0-COM 5 from left to right from SEG0 on a liquid crystal drawing;
step two: classifying and naming, using an assembly grammar to enable numbers to correspond to segment codes, and combining the segment codes into an array which is convenient to program;
step three: making segment code structure body, namely making segment code mark byte mapped by digit, using 8 BIT BITs of one byte to correspond to 8 segments of digit;
step four: a scanning structure for starting scanning the structure by displaying a number as required;
step five: judging whether the number is a corresponding number;
step six: the corresponding number is displayed.
2. The segment code liquid crystal driving method according to claim 1, wherein: in the second step: the combination is carried out by the following method, # define u8DIGIT _ AtoG (n) { DISPLAY # # n # # A, DISPLAY # # n # # B, DISPLAY # # n # # C,
DISPLAY_##n##D ,DISPLAY_##n##E ,DISPLAY_##n##F ,DISPLAY_##n##G }
const static u8 DIGIT_TABLE[][7]={/*A B C D E F G*/。
3. the segment code liquid crystal driving method according to claim 1, wherein: in step three: the structure was produced by: # define CODEA 0x 01/. ANG A pen segment >
# define CODEB 0x 02/# B segment +
# define CODEC 0x 04/. dot C segment @ C
# define CODED 0x 08/# D pen segment +
# define CODE 0x 10/. dot E segment >
# define CODEF 0x 20/. dot F segment >
# define CODEG 0x 40/. dot G pen segment >
# define CODEDP 0x 80/# DP segment +
static const u8 CODE_TABLE[][2]=
{
{0, CODEA+CODEB+CODEC+CODEC+CODEE+CODEF},
{1, CODEB+CODEC},
{2, CODEA+CODEB+CODEG+CODEE+CODEC},
{3, CODEA+CODEB+CODEG+CODEC+CODEC},
{4, CODEF+CODEG+CODEB+CODEC},
{5, CODEA+CODEF+CODEG+CODEC+CODEC},
{6, CODEA+CODEC+CODEC+CODEE+CODEF+CODEG},
{7, CODEA+CODEB+CODEC},
{8, CODEA+CODEB+CODEC+CODEC+CODEE+CODEF+CODEG},
{9, CODEA+CODEB+CODEC+CODEC+CODEF+CODEG},
{'A', CODEA+CODEB+CODEC+CODEE+CODEF+CODEG},
{'b', CODEC+CODEC+CODEE+CODEF+CODEG},
{'C', CODEA+CODEC+CODEE+CODEF},
{'-', CODEG},
{'E', CODEA+CODEF+CODEE+CODEC+CODEG},
{'F', CODEA+CODEF+CODEE+CODEG},
{'P', CODEA+CODEB+CODEG+CODEF+CODEE},
{'t', CODEF+CODEE+CODEG+CODEC},
{'r', CODEE+CODEG},
{'J', CODEB+CODEC+CODEC+CODEE},
{'o', CODEG+CODEC+CODEC+CODEE},
{'L', CODEF+CODEE+CODEC},
{'d', CODEB+CODEC+CODEC+CODEE+CODEG},
{'U', CODEF+CODEE+CODEC+CODEC+CODEB},
{'S', CODEA+CODEF+CODEG+CODEC+CODEC},
{'V', CODEF+CODEE+CODEC+CODEC+CODEB},
{'H', CODEF+CODEE+CODEG+CODEC+CODEB},
{'K', CODEF+CODEE},
{'n', CODEF+CODEE+CODEA+CODEB+CODEC},
{'i', CODEE},
{'y', CODEB+CODEG+CODEC+CODEF+CODEC},
}。
4. The segment code liquid crystal driving method according to claim 1, wherein: in step four, the scan structure is performed by void Display _ SetDigit (u8 u8n, u8 u8v)
{
u8 u8i,u8j;
u8n--;
if (u8n >= (sizeof(DIGIT_TABLE)/sizeof(DIGIT_TABLE[0]))) return;
for (u8i=0; u8i<(sizeof(CODE_TABLE)/sizeof(CODE_TABLE[0])); i++){
if (SEG[u8i][0] == u8v){
for (u8j=0; u8j<7; u8j++){
if (CODE_TABLE[u8i][1]&(1<<u8j)){
mDispBuf[DIGIT_TABLE[u8n][u8j]/6] |= 1<<(DIGIT_TABLE[u8n][u8j]%6);
}
}
return;
}
}
return;
}。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011140552.4A CN112419951A (en) | 2020-10-22 | 2020-10-22 | Segment code liquid crystal driving method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011140552.4A CN112419951A (en) | 2020-10-22 | 2020-10-22 | Segment code liquid crystal driving method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112419951A true CN112419951A (en) | 2021-02-26 |
Family
ID=74841652
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011140552.4A Pending CN112419951A (en) | 2020-10-22 | 2020-10-22 | Segment code liquid crystal driving method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112419951A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103854615A (en) * | 2012-12-06 | 2014-06-11 | 苏州工业园区新宏博通讯科技有限公司 | Stroke segment type liquid crystal display screen software driving method |
CN109272954A (en) * | 2018-11-01 | 2019-01-25 | 江苏林洋能源股份有限公司 | A kind of caching mapping method of the LCD segment code type liquid crystal applied to intelligent electric meter |
-
2020
- 2020-10-22 CN CN202011140552.4A patent/CN112419951A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103854615A (en) * | 2012-12-06 | 2014-06-11 | 苏州工业园区新宏博通讯科技有限公司 | Stroke segment type liquid crystal display screen software driving method |
CN109272954A (en) * | 2018-11-01 | 2019-01-25 | 江苏林洋能源股份有限公司 | A kind of caching mapping method of the LCD segment code type liquid crystal applied to intelligent electric meter |
Non-Patent Citations (3)
Title |
---|
小帅帅天天见V: "段式LCD液晶显示屏的底层驱动程序", 《HTTPS://BLOG.CSDN.NET/CHINA77536816/ARTICLE/DETAILS/47427397》 * |
张雅妮: "航空仪表的段式液晶屏驱动软件设计", 《测控技术》 * |
林凡强,马晓茗: "笔段式LCD驱动设计", 《液晶与显示》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1043210A (en) | Character Root Code Input Method And Apparatus | |
WO2006013582A2 (en) | A method and system for pixel based rendering of multi-lingual characters from a combination of glyphs | |
KR890005048B1 (en) | Control device of flat displayer | |
JP2003216602A (en) | Program, device and method for inputting chinese type face | |
CN112419951A (en) | Segment code liquid crystal driving method | |
CN109375962A (en) | The implementation method of chinese character mixing output display based on embedded OS | |
CN109272954A (en) | A kind of caching mapping method of the LCD segment code type liquid crystal applied to intelligent electric meter | |
AU2008357252A1 (en) | Method for inputting chinese characters apapting for chinese teaching | |
CN102750009A (en) | Non-switching Chinese character input method and keyboard | |
CN1032986C (en) | Chinese-character stroke order code enter method and its keyboard | |
Cox | Speaking Stata: Between tables and graphs | |
CN104793757B (en) | Chinese character input method and device | |
CN101256446A (en) | Dual-purpose input hanzi method | |
CN103425627A (en) | Method for generating stroke and method for generating font | |
CN107145478B (en) | Method for converting Chinese sentence into braille | |
CN100454222C (en) | Chinese character triple-key inputting method | |
CN1209699C (en) | Small digit keyboard and its alphabetic writing input method | |
CN1564156A (en) | Image type interesting Chinese Phonetic symbol and image type interesting information processing method | |
CN1062667C (en) | All spelling form guide code Chinese character input system | |
CN115544987A (en) | Excel-based LCD display method, system, tool and memory | |
CN1567401A (en) | Liquid crystal display device with mark display function | |
TW214587B (en) | Chinese input method | |
CN101192100A (en) | Chinese phonetic three-code encoded Chinese character input method | |
CN104571705A (en) | Chinese input system for touch screen device | |
CN1108553C (en) | Universal popular voice form Chinese character coding input method |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210226 |