CN110176201A - It is a kind of display and key scan sequential control method and device - Google Patents

It is a kind of display and key scan sequential control method and device Download PDF

Info

Publication number
CN110176201A
CN110176201A CN201910435162.0A CN201910435162A CN110176201A CN 110176201 A CN110176201 A CN 110176201A CN 201910435162 A CN201910435162 A CN 201910435162A CN 110176201 A CN110176201 A CN 110176201A
Authority
CN
China
Prior art keywords
key
scan
dis
byte0
display
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.)
Granted
Application number
CN201910435162.0A
Other languages
Chinese (zh)
Other versions
CN110176201B (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.)
Fujian Chuanzheng Communications College
Original Assignee
Fujian Chuanzheng Communications College
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 Fujian Chuanzheng Communications College filed Critical Fujian Chuanzheng Communications College
Priority to CN201910435162.0A priority Critical patent/CN110176201B/en
Publication of CN110176201A publication Critical patent/CN110176201A/en
Application granted granted Critical
Publication of CN110176201B publication Critical patent/CN110176201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/04Control 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/06Control 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 using controlled light sources
    • G09G3/12Control 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 using controlled light sources using electroluminescent elements
    • G09G3/14Semiconductor devices, e.g. diodes

Landscapes

  • Engineering & Computer Science (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)
  • Control Of El Displays (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

The invention discloses a kind of display and the sequential control methods and device of key scan.Wherein, the described method includes: judging input signal cable KEY_SCAN=0 or KEY_SCAN=1, if key K1 is not switched on, input signal cable KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if key K1 is connected, input signal cable KEY_SCAN is connected by K1 and U2/Q0, KEY_SCAN=0.By the above-mentioned means, can be realized the key scan for realizing big quantity by timing control mode, it is conducive to promote.

Description

It is a kind of display and key scan sequential control method and device
Technical field
The present invention relates to field of display technology more particularly to a kind of display and the sequential control methods and dress of key scan It sets.
Background technique
LED (Light Emitting Diode, light emitting diode) charactron by multiple LED packages together The device of " 8 " font is formed, lead complete in inside by connection, need to only draw their each stroke, public electrode.LED number Code pipe is actually to form what 8-shaped was constituted by seven luminous tubes, in addition decimal point is exactly 8.
LED charactrons are mainly used for building body brightening, advertising signboard, bar, nightclub, the door head billboard of club etc., special Be not suitably applied the large-scale dynamic light belt such as billboard background, viaduct, river, lake guardrail, contour of building nightscape lighting it In, it can produce effect gorgeous as rainbow, with the profile of guardrail pipe decorative architecture object, the color brightening building of prominent U.S. can be played Effect, facts proved that, LED charactrons have become a wonderful work in illuminating product, burst forth in dynamic city.
Existing 8 segment encode i.e. 8 sections of LED charactrons are shown and key scan scheme is usually to utilize a small amount of CPU (Central Processing Unit, central processing unit) mouth line, the key scan of big quantity, such as 5 mouths are realized by more complex algorithm Line realizes that 25 key scans, four keys are pressed twice to realize the modes such as 16 key scannings, is unfavorable for promoting.
Summary of the invention
In view of this, it is an object of the invention to propose it is a kind of display and key scan sequential control method and device, It can be realized the key scan for realizing big quantity by timing control mode, be conducive to promote.
According to an aspect of the present invention, provide it is a kind of display and key scan sequential control method, comprising:
Into after interrupt routine, judgement belongs to 8 segment encodes at present and shows that display and key of t1 to the t8 in totally 8 periods are swept Retouch the period;Wherein, different time sections realize display and the key scan of different positions, carry out in turn in order;
In the 2.5ms millisecond incipient stage of t1 period, executes signal wire OFF_DIS and set 1 instruction, in OFF_DIS=1 Afterwards, all displays L1-L7 and light emitting diode lamp are turned off;
Bidirectional data line signal wire and clock cable shift U1 and U2 two panels under the control of central processing unit software Register carries out shifting function preset times, realizes Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, brush U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7 after new, 0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 is ready to L1 shows content, and U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1;
After Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command, OFF_DIS=0 are executed Afterwards, all displays L1-L7 and LED light and power supply are connected, allows to light;Wherein, L1-L7 and light emitting diode refer to Show that site is bright in lamp, by U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content is determined, in the t1 period, Byte0< 7,0 >=11111110, i.e. U2/Q0=0, the 1st L1 is lighted, and prepare scanning key K1;
Judge input signal cable KEY_SCAN=0 or KEY_SCAN=1, if key K1 is not switched on, input signal Line KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if key K1 connect, input signal cable KEY_SCAN by K1 with U2/Q0 is connected, KEY_SCAN=0.
Wherein, it is described enter interrupt routine after, judgement belongs to 8 segment encodes at present and shows that t1 to t8 is aobvious in totally 8 periods Show and the key scan period, comprising:
Into after interrupt routine, setting interrupt identification or software mark come by way of realizing and not judging, judgement is current Belong to 8 segment encodes and shows display and key scan period of t1 to the t8 in totally 8 periods.
Wherein, the 2.5ms incipient stage in the t1 period executes signal wire OFF_DIS and sets 1 instruction, in OFF_DIS After=1, turn off all displays L1-L7 and light emitting diode lamp, comprising:
It in the 2.5ms incipient stage of t1 period, executes signal wire OFF_DIS and sets 1 instruction, after OFF_DIS=1, lead to The mode for crossing shutdown triode P9 turns off all displays L1-L7 and light emitting diode lamp.
Wherein, the bidirectional data line signal wire and clock cable be under the control of central processing unit software, to U1 and U2 two panels shift register carry out shifting function preset times, realize 1 word totally 2 bytes Word0 (byte1+byte0) number According to refreshing, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7 after refreshing, 0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 gets out L1 and shows content, and U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1, comprising:
Bidirectional data line signal wire and clock cable are believed under the control of central processing unit software using bidirectional data line Number line sends the mode of data content, clock cable tranmitting data register pulse signal, carries out to U1 and U2 two panels shift register Shifting function preset times realize Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, U1/ after refreshing Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 is ready in L1 shows Hold, U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1.
Wherein, after Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command is executed, After OFF_DIS=0, all displays L1-L7 and LED light and power supply are connected, allows to light, comprising:
After Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command, OFF_ are executed After DIS=0, by connecting triode P9 saturation conduction, all displays L1-L7 and LED light and power supply is connected, is allowed It lights.
According to another aspect of the present invention, provide it is a kind of display and key scan time sequence control device, comprising:
Key scan unit, serial shift unit, position menu member;
The key scan unit, after entering interrupt routine, judgement belongs to 8 segment encodes at present and shows t1 to t8 totally 8 Display and key scan period in period;Wherein, different time sections realize display and the key scan of different positions, by suitable Sequence carries out in turn;
The serial shift unit executes signal wire OFF_DIS and sets 1 finger for the 2.5ms incipient stage in the t1 period It enables, after OFF_DIS=1, turns off all displays L1-L7 and light emitting diode lamp;
The key scan unit is also used in bidirectional data line signal wire and clock cable in central processing unit software Control under, shifting function preset times are carried out to U1 and U2 two panels shift register, realize the Word0 of 1 word totally 2 bytes (byte1+byte0) Refresh Data, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7 after refreshing, 0>, U2/ Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 gets out L1 and shows content, and the 1st L1 and preparation are lighted in U2/Q0=0 preparation Scan key K1;
The serial shift unit is also used to after Word0 (byte1+byte0) Refresh Data, executes signal wire OFF_DIS clear command after OFF_DIS=0, connects all displays L1-L7 and LED light and power supply, allows to light; Wherein, that site is bright in L1-L7 and light emitting diode lamp, by U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0> Content determines, in the t1 period, Byte0<7,0>=11111110, i.e. U2/Q0=0, the 1st L1 is lighted, and prepare scanning and press Key K1;
Institute's rheme menu member, for judging input signal cable KEY_SCAN=0 or KEY_SCAN=1, if key K1 It being not switched on, input signal cable KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if key K1 is connected, input signal Line KEY_SCAN is connected by K1 and U2/Q0, KEY_SCAN=0.
Wherein, the key scan unit, is specifically used for:
Into after interrupt routine, setting interrupt identification or software mark come by way of realizing and not judging, judgement is current Belong to 8 segment encodes and shows display and key scan period of t1 to the t8 in totally 8 periods.
Wherein, the serial shift unit, is specifically used for:
It in the 2.5ms incipient stage of t1 period, executes signal wire OFF_DIS and sets 1 instruction, after OFF_DIS=1, lead to The mode for crossing shutdown triode P9 turns off all displays L1-L7 and light emitting diode lamp.
Wherein, the key scan unit, is specifically used for:
In bidirectional data line signal wire and clock cable under the control of central processing unit software, using bidirectional data line Signal wire send data content, clock cable tranmitting data register pulse signal mode, to U1 and U2 two panels shift register into Row shifting function preset times realize Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, U1/ after refreshing Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 is ready in L1 shows Hold, U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1.
Wherein, the serial shift unit, is specifically used for:
After Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command, OFF_DIS are executed After=0, by connecting triode P9 saturation conduction, all displays L1-L7 and LED light and power supply is connected, is allowed a little It is bright.
According to another aspect of the present invention, provide it is a kind of display and key scan timing control equipment, comprising: at least One processor;And the memory being connect at least one described processor communication;Wherein, be stored with can for the memory The instruction executed by least one described processor, described instruction executed by least one described processor so that it is described at least One processor is able to carry out the sequential control method of above-mentioned display and key scan.
According to another aspect of the present invention, a kind of computer readable storage medium is provided, computer program is stored with, institute State the sequential control method that above-mentioned display and key scan are realized when computer program is executed by processor.
, can be after entering interrupt routine it can be found that above scheme, judgement belongs to 8 segment encodes at present and shows t1 to t8 totally 8 Display and key scan period in a period;Wherein, different time sections realize display and the key scan of different positions, press Rotation carries out;With can in the 2.5ms millisecond incipient stage of t1 period, execute signal wire OFF_DIS set 1 instruction, After OFF_DIS=1, turn off all displays L1-L7 and light emitting diode lamp;With bidirectional data line signal wire and clock Signal wire can carry out U1 and U2 two panels shift register shifting function default time under the control of central processing unit software Number realizes Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, U1/Q7Q6Q5Q4Q3Q2Q1Q0=after refreshing Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 gets out L1 and shows content, and U2/Q0=0 prepares point Bright 1st L1 and preparation scanning key K1;With can after Word0 (byte1+byte0) Refresh Data, execute signal wire OFF_DIS clear command after OFF_DIS=0, connects all displays L1-L7 and LED light and power supply, allows to light; Wherein, that site is bright in L1-L7 and light emitting diode lamp, by U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0> Content determines, in the t1 period, Byte0<7,0>=11111110, i.e. U2/Q0=0, the 1st L1 is lighted, and prepare scanning and press Key K1;And may determine that input signal cable KEY_SCAN=0 or KEY_SCAN=1, and if key K1 is not switched on, input Signal wire KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if key K1 is connected, input signal cable KEY_SCAN passes through K1 and U2/Q0 is connected, and KEY_SCAN=0 can be realized the key scan for realizing big quantity by timing control mode, be conducive to It promotes.
Further, above scheme, the display quantity and LED light quantity configuration controlled is flexible, is conveniently increased and decreased, above Scheme drives 8 positions, i.e. 78 sections of code displays and 18 LED light, in fact display position and 8 in 8 positions The quantity of LED indication lamp position can be with arbitrary disposition, as long as word0-word7 content and hardware circuit are mating i.e. in software program Can, such as to increase indicator lamp quantity, 16 can be can be realized using 6 display positions and 28 LED indication lamp positions configurations The driving of LED light can make indicator lamp quantity at multiplication if being further reduced display position increases by 8 LED indication lamp positions Add.
Further, above scheme, the number of keys for needing to scan flexibly increase and decrease, and large batch of key may be implemented and sweep It retouches, above scheme, 8 key K1-K8 can be scanned, the key if necessary to scanning is less than 8, then hardware circuit is without change Design, it is only necessary to which welding needs that the corresponding several key scanned, and the key in addition not needing scanning not weld, soft Without change on part, the key that will do not need scanning is handled as open circuit, and the key if necessary to scanning, can be with greater than 8 Increase a piece of shift register on hardware, and weld 8 key scanning circuits in its output end, increases a byte on software (byte) position selects information, exports in Refresh Data, and increase corresponding key scan program on software, every to increase by one Piece shift register can increase by 8 key scans, therefore this programme is also quite suitable for needing the field of high-volume key scan It closes.
Further, above scheme can flexibly increase and decrease display quantity, the LED light quantity for needing to control, and be easy Make system " dilatation ", above scheme, drive 8 positions, 78 sections of code displays and 18 LED light, if necessary to increase Add display quantity, 8 sections of code displays or 8 LED lights can be increased, on software on the basis of above-mentioned 4th point The position selection information for increasing a byte, the corresponding word information content such as word8-word15 is exported in Refresh Data, and Increase corresponding control program on software, 1 shift register of every increase can increase by 8 sections of 8 positions code display or 8 LED light more can need to increase shift register quantity, to realize large batch of display or LED light Drive control is realized system " dilatation ".
Further, above scheme can use similar control program, can also control data bit less than 8 or Display greater than 8, this example only the control program of 8 sections of code displays is illustrated, but be not limited to these 8 The display of position, various New Type Display Devices continuously emerge at present, for the display less than 8 or greater than 8, pass through increasing U1 quantity in shift register such as this example of few transmission data that adds deduct equally also may be implemented to control, then increases by 1, 16 kinds of displays controls once then may be implemented;Then increase by 2, then 24 kinds of displays control once etc. may be implemented Deng.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 be the invention shows and key scan one embodiment of sequential control method flow diagram;
Fig. 2 be the invention shows and key scan one embodiment of sequential control method time diagram;
Fig. 3 be the invention shows and the timing of each scan period of one embodiment of sequential control method of key scan show It is intended to;
Fig. 4 be the invention shows and key scan one embodiment of time sequence control device structural schematic diagram;
Fig. 5 be the invention shows and key scan one embodiment of timing control equipment structural schematic diagram.
Specific embodiment
With reference to the accompanying drawings and examples, the present invention is described in further detail.It is emphasized that following implement Example is merely to illustrate the present invention, but is not defined to the scope of the present invention.Likewise, following embodiment is only portion of the invention Point embodiment and not all embodiments, institute obtained by those of ordinary skill in the art without making creative efforts There are other embodiments, shall fall within the protection scope of the present invention.
The present invention provide it is a kind of display and key scan sequential control method, can be realized and reducing central processing to the greatest extent Under the premise of device mouth line resource, realize that greater amount of display, LED light lamp control using common common component And key scan, and reduce hardware cost.
Be with Fig. 2 and Fig. 3, Fig. 1 referring to Figure 1 the invention shows and key scan one embodiment of sequential control method Flow diagram, Fig. 2 be the invention shows and key scan one embodiment of sequential control method time diagram, Fig. 3 is The invention shows and key scan one embodiment of sequential control method each scan period time diagram.It should be noted It is, if having substantially the same as a result, method of the invention is not limited with process sequence shown in FIG. 1.Such as Fig. 1 and Fig. 2 and Shown in Fig. 3, this method comprises the following steps:
S101: after entering interrupt routine, judgement belong at present 8 segment encodes show display of t1 to the t8 in totally 8 periods and The key scan period;Wherein, different time sections realize display and the key scan of different positions, carry out in turn in order.
Wherein, after this enters interrupt routine, judgement belongs to 8 segment encodes at present and shows display of t1 to the t8 in totally 8 periods With the key scan period, may include:
, can be setting interrupt identification or software mark come by way of realizing and not judging into after interrupt routine, judgement Belong to 8 segment encodes at present and shows display and key scan period of t1 to the t8 in totally 8 periods.
In the present embodiment, into after interrupt routine, first determining whether to belong at present that of t1-t8 in totally 8 periods Period can not judge that different time sections realize different positions by setting interrupt identification or software mark here to realize Display and key scan, carry out in turn in order, and determination is to come into effect the number for showing content in next step after belonging to the t1 period According to transmission, figure place showing according to tasks such as transmission and key scans.
S102: it in 2.5ms (millisecond, the millisecond) incipient stage of t1 period, executes signal wire OFF_DIS and sets 1 Instruction turns off all displays L1-L7 and light emitting diode lamp after OFF_DIS=1.
Wherein, it should execute signal wire OFF_DIS in the 2.5ms incipient stage of t1 period and set 1 instruction, in OFF_DIS= After 1, all displays L1-L7 and light emitting diode lamp are turned off, may include:
It in the 2.5ms incipient stage of t1 period, executes signal wire OFF_DIS and sets 1 instruction, after OFF_DIS=1, lead to The mode for crossing shutdown triode P9 turns off all displays L1-L7 and light emitting diode lamp.
In the present embodiment, it can execute signal wire OFF_DIS in t1 period the 2.5ms incipient stage and set 1 instruction. , by turning off triode P9, all displays L1-L7 and LED light can be made to turn off, to avoid under after OFF_DIS=1 One step serial shift cell data causes display or LED light to flash interference when refreshing.
S103:SDA (Static Data Authentication, bidirectional data line) signal wire and (Clock, clock) are believed Number line carries out shifting function preset times under the control of central processing unit software, to U1 and U2 two panels shift register, realizes 1 Word0 (byte1+byte0) Refresh Data of a word totally 2 bytes, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1 < 7 after refreshing, 0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 gets out L1 and shows content, and the 1st L1 is lighted in U2/Q0=0 preparation And prepare scanning key K1.
Wherein, the bidirectional data line signal wire and clock cable are under the control of central processing unit software, to U1 and U2 Two panels shift register carries out shifting function preset times, realizes Word0 (byte1+byte0) data of 1 word totally 2 bytes Refresh, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7 after refreshing, 0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 It gets out L1 and shows content, U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1, may include:
Bidirectional data line signal wire and clock cable are believed under the control of central processing unit software using bidirectional data line Number line sends the mode of data content, clock cable tranmitting data register pulse signal, carries out to U1 and U2 two panels shift register Shifting function preset times realize Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, U1/ after refreshing Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 is ready in L1 shows Hold, U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1.
In the present embodiment, bidirectional data line signal wire and clock cable, can under the control of central processing unit software To carry out shifting function 16 times to U1 and U2 two panels shift register, the Word0 (byte1+ of 1 word totally 2 bytes is realized Byte0) Refresh Data.SDA sends data content, CLK tranmitting data register pulse signal, U1/Q7Q6Q5Q4Q3Q2Q1Q0 after refreshing =Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 gets out L1 and shows content, and U2/Q0=0 prepares It lights the 1st L1 and prepares scanning key K1 and realize 1 word Word0 (2 bytes according to current computer digit technology Bytes, 16 digit order number bits) the Refresh Data time within 0.1ms, i.e. t11=0.1ms.Account for entire period 2.5ms's 4%, the brightness of display will not be reduced, certainly, the shorter this time the better, and central processor CPU can be improved in when design The speed of service reduces the Refresh Data time.
After S104:Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command, OFF_ are executed After DIS=0, all displays L1-L7 and LED light and power supply are connected, allows to light;Wherein, L1-L7 and luminous two That site is bright in pole pipe indicator light, and by U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content is determined, in the t1 period, Byte0<7,0>=11111110, i.e. U2/Q0=0, the 1st L1 is lighted, and prepare scanning key K1.
Wherein, after Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command is executed, After OFF_DIS=0, all displays L1-L7 and LED light and power supply are connected, allows to light, may include:
After Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command, OFF_DIS are executed After=0, by connecting triode P9 saturation conduction, all displays L1-L7 and LED light and power supply is connected, is allowed a little It is bright.
In the present embodiment, it after Word0 (byte1+byte0) Refresh Data, executes signal wire OFF_DIS clearing and refers to It enables, after OFF_DIS=0, by connecting triode P9 (saturation conduction), makes all displays L1-L7 and LED light and power supply It connects, allows to light.That site is bright in specifically L1-L7 and LED light, by U2/Q7Q6Q5Q4Q3Q2Q1Q0= Byte0<7,0>content determine.In the t1 period, Byte0<7,0>=11111110, i.e. U2/Q0=0, the 1st L1 is lighted, and Prepare scanning key K1.
S105: central processing unit judges input signal cable KEY_SCAN=0 or KEY_SCAN=1, if key K1 does not have There is connection, input signal cable KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if key K1 is connected, input signal cable KEY_SCAN is connected by K1 and U2/Q0, KEY_SCAN=0.
In the present embodiment, central processor CPU judges input signal cable KEY_SCAN=0 or KEY_SCAN=1, such as Fruit key K1 is not switched on, and input signal cable KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if key K1 is connected, Input signal cable KEY_SCAN is connected by K1 and U2/Q0, and the scanning to key K1 may be implemented in KEY_SCAN=0 accordingly.This The effect of 8 diode D1-D8 in embodiment can be, to aobvious caused by avoiding when more keys are also turned in K1-K8 Show that position is interfered, and can identify specifically which key connection, realizes the extension of key scan function.
In the present embodiment, can be with 20ms for 1 duty cycle, circulation carries out.Each duty cycle divides t1-t8 totally 8 A period.Each time period is 2.5ms, completes 8 sections of codes (L1-L7) or the display of 8 LED lights of 1 position Control and 1 key scan.I.e. by Time-sharing control in different time periods, when each site is bright, transmit corresponding aobvious Show content, realizes " dynamic scan " of so-called display.Each period lights 1 position, and lighting time is close to 2.5ms, L1-L7 And a total time is lighted in totally 8 positions to LED light in turn is 20ms, constitutes a cycle.Although each position was at 20ms weeks Only 2.5ms is lighted in flashing in phase, but due to human eye vision delay effect, so visually 8 positions are lighted always, is not dodged Bright phenomenon.In addition, in each 2.5ms period, to K1-K8, totally 8 keys are scanned respectively, judge key break-make situation.
In the present embodiment, each period 2.5ms can be worked using timer interruption mode in CPU, therefore every time Interrupt response interval time is 2.5ms, enters execution of each period corresponding program content in turn in order.
In the present embodiment, it is few to occupy CPU mouth line resource, it is only necessary to which 4 mouth lines OFF_DIS, SDA, CLK, KEY_SCAN make For signal wire, so that it may realize display control and key scan.In the case where not increasing control mouth line, shifted by increasing Register and part of devices can also double " dilatation ", realize the control of more multi-display and key scan.Because using CPU's In digital control circuit, all very rare preciousness of mouth line resource is controlled.Using this control method, it is equipped with high-speed CPU, it is therefore an objective to protect It is not too large to demonstrate,prove Refresh Data time t11, may be implemented few control mouth line realize fairly large display control and by Key scanning.
In the present embodiment, it needs hardware device to be used few, does not need dedicated devices, hardware cost is low.With this example 8 positions of driving such as 78 sections of codes and 18 LED light display circuit and 8 key scanning circuits for, only need Want 2 shift registers and several triodes, diode, resistance, capacitor etc..Used device is market commonplace components, Purchase is easy, cheap.Device type in the present embodiment, such as shift register 74HC164, triode 9012 can also To be replaced using other model devices with the same function.
In the present embodiment, the display quantity and LED light quantity configuration controlled is flexible, is conveniently increased and decreased, in this implementation 8 positions, i.e. 78 sections of code displays and 18 LED light are driven in example.In fact display position and 8 in 8 positions The quantity of LED indication lamp position can be with arbitrary disposition, as long as word0-word7 content and hardware circuit are mating i.e. in software program It can.Such as to increase indicator lamp quantity, 16 can be can be realized using 6 display positions and 28 LED indication lamp positions configurations The driving of LED light.If being further reduced display position increases by 8 LED indication lamp positions, indicator lamp quantity can be made at multiplication Add.
In the present embodiment, the number of keys for needing to scan flexibly increases and decreases, and large batch of key scan may be implemented.At this In embodiment, 8 key K1-K8 can be scanned.Key if necessary to scanning is less than 8, then hardware circuit is set without change Meter, it is only necessary to which welding needs that the corresponding several key scanned, and the key in addition not needing scanning not weld.In software On without change, the key that will do not need scanning is handled as open circuit.Key if necessary to scanning is greater than 8, Ke Yi Increase a piece of shift register on hardware, and welds 8 key scanning circuits in its output end.Increase a byte on software (byte) position selects information, exports in Refresh Data, and increase corresponding key scan program on software.It is every to increase by one Piece shift register can increase by 8 key scans.Therefore this programme is also quite suitable for needing the field of high-volume key scan It closes.
In the present embodiment, can flexibly increase and decrease and need the display quantity, the LED light quantity that control, be easy to make be It unites " dilatation ".In the present embodiment, 8 positions, 78 sections of code displays and 18 LED light are driven.If necessary to increase Add display quantity, 8 sections of code displays or 8 LED lights can be increased on the basis of above-mentioned 4th point.On software The position selection information for increasing a byte, the corresponding word information content such as word8-word15 is exported in Refresh Data, and Increase corresponding control program on software, 1 shift register of every increase can increase by 8 sections of 8 positions code display or 8 LED light.More it can need to increase shift register quantity, to realize large batch of display or LED light Drive control is realized system " dilatation ".
In the present embodiment, similar control program can be used, data bit can also be controlled less than 8 or greater than 8 The display of position.This example is only illustrated the control program of 8 sections of code displays, but is not limited to these 8 Display.Various New Type Display Devices continuously emerge at present, for the display less than 8 or greater than 8, by increasing or The U1 quantity reduced in shift register such as this example of transmission data equally also may be implemented to control.Then increase by 1, then may be used To realize 16 kinds of displays controls once;Then increase by 2, then 24 kinds of displays control once etc. may be implemented.
It can be found that in the present embodiment, it can be after entering interrupt routine, judgement belongs to 8 segment encodes at present and shows that t1 is arrived The t8 display in totally 8 periods and the key scan period;Wherein, different time sections realize that the display of different positions and key are swept It retouches, carries out in turn in order;With can in the 2.5ms millisecond incipient stage of t1 period, execute signal wire OFF_DIS set 1 finger It enables, after OFF_DIS=1, turns off all displays L1-L7 and light emitting diode lamp;With bidirectional data line signal wire It is pre- that shifting function can be carried out to U1 and U2 two panels shift register under the control of central processing unit software with clock cable If number, Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, U1/ after refreshing are realized Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 is ready in L1 shows Hold, U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1;With can be in Word0 (byte1+byte0) Refresh Data After, execute signal wire OFF_DIS clear command, after OFF_DIS=0, make all displays L1-L7 and LED light with Power supply is connected, and allows to light;Wherein, that site is bright in L1-L7 and light emitting diode lamp, by U2/ Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content determines, in the t1 period, Byte0<7,0>=11111110, i.e. U2/Q0 =0, the 1st L1 is lighted, and prepare scanning key K1;And it may determine that input signal cable KEY_SCAN=0 or KEY_ SCAN=1, if key K1 is not switched on, input signal cable KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if pressed Key K1 is connected, and input signal cable KEY_SCAN is connected by K1 and U2/Q0, and KEY_SCAN=0 can be realized and pass through timing control Mode realizes the key scan of big quantity, is conducive to promote.
The present invention also provides a kind of display and the time sequence control devices of key scan, can be realized through timing control side Formula realizes the key scan of big quantity, is conducive to promote.
Refer to Fig. 4, Fig. 4 be the invention shows and key scan one embodiment of time sequence control device structural representation Figure.In the present embodiment, the time sequence control device 40 of the display and key scan includes key scan unit 41, serial shift unit 42, position menu member 43.
The key scan unit 41, after entering interrupt routine, judgement belongs to 8 segment encodes at present and shows t1 to t8 totally 8 Display and key scan period in period;Wherein, different time sections realize display and the key scan of different positions, by suitable Sequence carries out in turn.
The serial shift unit 42 executes signal wire OFF_DIS and sets 1 finger for the 2.5ms incipient stage in the t1 period It enables, after OFF_DIS=1, turns off all displays L1-L7 and light emitting diode lamp.
The key scan unit 41 is also used in bidirectional data line signal wire and clock cable in central processing unit software Control under, shifting function preset times are carried out to U1 and U2 two panels shift register, realize the Word0 of 1 word totally 2 bytes (byte1+byte0) Refresh Data, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7 after refreshing, 0>, U2/ Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 gets out L1 and shows content, and the 1st L1 and preparation are lighted in U2/Q0=0 preparation Scan key K1.
The serial shift unit 42 is also used to after Word0 (byte1+byte0) Refresh Data, executes signal wire OFF_DIS clear command after OFF_DIS=0, connects all displays L1-L7 and LED light and power supply, allows to light; Wherein, that site is bright in L1-L7 and light emitting diode lamp, by U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0> Content determines, in the t1 period, Byte0<7,0>=11111110, i.e. U2/Q0=0, the 1st L1 is lighted, and prepare scanning and press Key K1.
This menu member 43, for judging input signal cable KEY_SCAN=0 or KEY_SCAN=1, if key K1 It being not switched on, input signal cable KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if key K1 is connected, input signal Line KEY_SCAN is connected by K1 and U2/Q0, KEY_SCAN=0.
Optionally, the key scan unit 41, can be specifically used for:
, can be setting interrupt identification or software mark come by way of realizing and not judging into after interrupt routine, judgement Belong to 8 segment encodes at present and shows display and key scan period of t1 to the t8 in totally 8 periods.
Optionally, the serial shift unit 42, can be specifically used for:
It in the 2.5ms incipient stage of t1 period, executes signal wire OFF_DIS and sets 1 instruction, after OFF_DIS=1, lead to The mode for crossing shutdown triode P9 turns off all displays L1-L7 and light emitting diode lamp.
Optionally, the key scan unit 41, can be specifically used for:
In bidirectional data line signal wire and clock cable under the control of central processing unit software, using bidirectional data line Signal wire send data content, clock cable tranmitting data register pulse signal mode, to U1 and U2 two panels shift register into Row shifting function preset times realize Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, U1/ after refreshing Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 is ready in L1 shows Hold, U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1.
Optionally, the serial shift unit 42, can be specifically used for:
After Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command, OFF_DIS are executed After=0, by connecting triode P9 saturation conduction, all displays L1-L7 and LED light and power supply is connected, is allowed a little It is bright.
Each unit module of the time sequence control device of the display and key scan can execute above method embodiment respectively Middle corresponding step, therefore each unit module is not repeated herein, refer to the explanation of the above corresponding step.
The present invention also provides a kind of display and the timing control equipment of key scan, refer to Fig. 5, and Fig. 5 is that the present invention is aobvious Show and the structural schematic diagram of one embodiment of timing control equipment of key scan.As shown in figure 5, the display and key scan when It includes: at least one processor 501 that sequence, which controls equipment,;And the memory 502 with the communication connection of at least one processor 501; Wherein, memory 502 is stored with the instruction that can be executed by least one processor 501, and instruction is held by least one processor 501 Row, so that at least one processor 501 is able to carry out the sequential control method of above-mentioned display and key scan.
Wherein, memory 502 is connected with processor 501 using bus mode, and bus may include any number of interconnection Bus and bridge, bus is by one or more processors 501 together with the various circuit connections of memory 502.Bus may be used also With by such as peripheral equipment, voltage-stablizer, together with various other circuit connections of management circuit or the like, these are all It is known in the art, therefore, it will not be further described herein.Bus interface provides between bus and transceiver Interface.Transceiver can be an element, be also possible to multiple element, such as multiple receivers and transmitter, provide for The unit communicated on transmission medium with various other devices.The data handled through processor 501 pass through antenna on the radio medium It is transmitted, further, antenna also receives data and transfers data to processor 501.
Processor 501 is responsible for management bus and common processing, can also provide various functions, including timing, periphery connects Mouthful, voltage adjusting, power management and other control functions.And memory 502 can be used for storage processor 501 and execute Used data when operation.
The present invention also provides a kind of computer readable storage mediums, are stored with computer program.The computer program is located Reason device realizes above method embodiment when executing.
, can be after entering interrupt routine it can be found that above scheme, judgement belongs to 8 segment encodes at present and shows t1 to t8 totally 8 Display and key scan period in a period;Wherein, different time sections realize display and the key scan of different positions, press Rotation carries out;With can in the 2.5ms millisecond incipient stage of t1 period, execute signal wire OFF_DIS set 1 instruction, After OFF_DIS=1, turn off all displays L1-L7 and light emitting diode lamp;With bidirectional data line signal wire and clock Signal wire can carry out U1 and U2 two panels shift register shifting function default time under the control of central processing unit software Number realizes Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, U1/Q7Q6Q5Q4Q3Q2Q1Q0=after refreshing Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 gets out L1 and shows content, and U2/Q0=0 prepares point Bright 1st L1 and preparation scanning key K1;With can after Word0 (byte1+byte0) Refresh Data, execute signal wire OFF_DIS clear command after OFF_DIS=0, connects all displays L1-L7 and LED light and power supply, allows to light; Wherein, that site is bright in L1-L7 and light emitting diode lamp, by U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0> Content determines, in the t1 period, Byte0<7,0>=11111110, i.e. U2/Q0=0, the 1st L1 is lighted, and prepare scanning and press Key K1;And may determine that input signal cable KEY_SCAN=0 or KEY_SCAN=1, and if key K1 is not switched on, input Signal wire KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if key K1 is connected, input signal cable KEY_SCAN passes through K1 and U2/Q0 is connected, and KEY_SCAN=0 can be realized the key scan for realizing big quantity by timing control mode, be conducive to It promotes.
Further, above scheme, the display quantity and LED light quantity configuration controlled is flexible, is conveniently increased and decreased, above Scheme drives 8 positions, i.e. 78 sections of code displays and 18 LED light, in fact display position and 8 in 8 positions The quantity of LED indication lamp position can be with arbitrary disposition, as long as word0-word7 content and hardware circuit are mating i.e. in software program Can, such as to increase indicator lamp quantity, 16 can be can be realized using 6 display positions and 28 LED indication lamp positions configurations The driving of LED light can make indicator lamp quantity at multiplication if being further reduced display position increases by 8 LED indication lamp positions Add.
Further, above scheme, the number of keys for needing to scan flexibly increase and decrease, and large batch of key may be implemented and sweep It retouches, above scheme, 8 key K1-K8 can be scanned, the key if necessary to scanning is less than 8, then hardware circuit is without change Design, it is only necessary to which welding needs that the corresponding several key scanned, and the key in addition not needing scanning not weld, soft Without change on part, the key that will do not need scanning is handled as open circuit, and the key if necessary to scanning, can be with greater than 8 Increase a piece of shift register on hardware, and weld 8 key scanning circuits in its output end, increases a byte on software (byte) position selects information, exports in Refresh Data, and increase corresponding key scan program on software, every to increase by one Piece shift register can increase by 8 key scans, therefore this programme is also quite suitable for needing the field of high-volume key scan It closes.
Further, above scheme can flexibly increase and decrease display quantity, the LED light quantity for needing to control, and be easy Make system " dilatation ", above scheme, drive 8 positions, 78 sections of code displays and 18 LED light, if necessary to increase Add display quantity, 8 sections of code displays or 8 LED lights can be increased, on software on the basis of above-mentioned 4th point The position selection information for increasing a byte, the corresponding word information content such as word8-word15 is exported in Refresh Data, and Increase corresponding control program on software, 1 shift register of every increase can increase by 8 sections of 8 positions code display or 8 LED light more can need to increase shift register quantity, to realize large batch of display or LED light Drive control is realized system " dilatation ".
Further, above scheme can use similar control program, can also control data bit less than 8 or Display greater than 8, this example only the control program of 8 sections of code displays is illustrated, but be not limited to these 8 The display of position, various New Type Display Devices continuously emerge at present, for the display less than 8 or greater than 8, pass through increasing U1 quantity in shift register such as this example of few transmission data that adds deduct equally also may be implemented to control, then increases by 1, 16 kinds of displays controls once then may be implemented;Then increase by 2, then 24 kinds of displays control once etc. may be implemented Deng.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can To realize by another way.For example, device embodiments described above are only schematical, for example, module or The division of unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units Or component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, institute Display or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit Indirect coupling or communication connection can be electrical property, mechanical or other forms.
Unit may or may not be physically separated as illustrated by the separation member, shown as a unit Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks On unit.It can select some or all of unit therein according to the actual needs to realize the mesh of present embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can integrate in one processing unit, it can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units.It is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.
It, can if integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product To be stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention substantially or Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products Out, which is stored in a storage medium, including some instructions are used so that a computer equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute each implementation of the present invention The all or part of the steps of methods.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. it is various It can store the medium of program code.
The foregoing is merely section Examples of the invention, are not intended to limit protection scope of the present invention, all utilizations Equivalent device made by description of the invention and accompanying drawing content or equivalent process transformation are applied directly or indirectly in other correlations Technical field, be included within the scope of the present invention.

Claims (10)

1. the sequential control method of a kind of display and key scan characterized by comprising
Into after interrupt routine, when judgement belongs to 8 segment encodes at present and shows display of t1 to the t8 in totally 8 periods and key scan Between section;Wherein, different time sections realize display and the key scan of different positions, carry out in turn in order;
In the 2.5ms millisecond incipient stage of t1 period, executes signal wire OFF_DIS and set 1 instruction, after OFF_DIS=1, make All displays L1-L7 and light emitting diode lamp shutdown;
Bidirectional data line signal wire and clock cable are under the control of central processing unit software, to U1 and U2 two panels shift LD Device carries out shifting function preset times, Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes is realized, after refreshing U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, it is aobvious that U1 gets out L1 Show content, U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1;
After Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command is executed, after OFF_DIS=0, All displays L1-L7 and LED light and power supply are connected, allows to light;Wherein, L1-L7 and light emitting diode instruction That site is bright in lamp, and by U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content is determined, in the t1 period, Byte0<7, and 0 The 1st L1 is lighted in >=11111110, i.e. U2/Q0=0, and prepares scanning key K1;
Judge input signal cable KEY_SCAN=0 or KEY_SCAN=1, if key K1 is not switched on, input signal cable KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if key K1 connect, input signal cable KEY_SCAN by K1 with U2/Q0 is connected, KEY_SCAN=0.
2. the sequential control method of display as described in claim 1 and key scan, which is characterized in that described to enter interruption journey After sequence, judgement belongs to 8 segment encodes at present and shows display and key scan period of t1 to the t8 in totally 8 periods, comprising:
Into after interrupt routine, setting interrupt identification or software mark come by way of realizing and not judging, judgement belongs to 8 at present Segment encode shows display and key scan period of t1 to the t8 in totally 8 periods.
3. the sequential control method of display as described in claim 1 and key scan, which is characterized in that described in the t1 period The 2.5ms incipient stage, execute signal wire OFF_DIS set 1 instruction, after OFF_DIS=1, make all displays L1-L7 and hair The shutdown of optical diode indicator light, comprising:
In the 2.5ms incipient stage of t1 period, executes signal wire OFF_DIS and set 1 instruction, after OFF_DIS=1, pass through pass The mode of disconnected triode P9 turns off all displays L1-L7 and light emitting diode lamp.
4. the sequential control method of display as described in claim 1 and key scan, which is characterized in that the bidirectional data line Signal wire and clock cable carry out shifting function under the control of central processing unit software, to U1 and U2 two panels shift register Preset times realize Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, U1/ after refreshing Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 is ready in L1 shows Hold, U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1, comprising:
Bidirectional data line signal wire and clock cable are under the control of central processing unit software, using bidirectional data line signal wire The mode for sending data content, clock cable tranmitting data register pulse signal, shifts U1 and U2 two panels shift register Preset times are operated, realize Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, U1/ after refreshing Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 is ready in L1 shows Hold, U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1.
5. the sequential control method of display as described in claim 1 and key scan, which is characterized in that the Word0 (byte1+byte0) after Refresh Data, signal wire OFF_DIS clear command is executed, after OFF_DIS=0, makes all displays Device L1-L7 and LED light and power supply are connected, and allow to light, comprising:
After Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command, OFF_DIS=0 are executed Afterwards, by connecting triode P9 saturation conduction, all displays L1-L7 and LED light and power supply is connected, allows to light.
6. the time sequence control device of a kind of display and key scan characterized by comprising
Key scan unit, serial shift unit, position menu member;
The key scan unit, after entering interrupt routine, judgement belongs to 8 segment encodes at present and shows t1 to t8 totally 8 time Display and key scan period in section;Wherein, different time sections realize display and the key scan of different positions, take turns in order Stream carries out;
The serial shift unit executes signal wire OFF_DIS and sets 1 instruction for the 2.5ms incipient stage in the t1 period, After OFF_DIS=1, turn off all displays L1-L7 and light emitting diode lamp;
The key scan unit is also used to the control in bidirectional data line signal wire and clock cable in central processing unit software Under system, shifting function preset times are carried out to U1 and U2 two panels shift register, realize the Word0 of 1 word totally 2 bytes (byte1+byte0) Refresh Data, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7 after refreshing, 0>, U2/ Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 gets out L1 and shows content, and the 1st L1 and preparation are lighted in U2/Q0=0 preparation Scan key K1;
The serial shift unit is also used to after Word0 (byte1+byte0) Refresh Data, executes signal wire OFF_ DIS clear command after OFF_DIS=0, connects all displays L1-L7 and LED light and power supply, allows to light;Its In, that site is bright in L1-L7 and light emitting diode lamp, by U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>in Hold and determines, in the t1 period, Byte0<7,0>=11111110, i.e. U2/Q0=0, the 1st L1 is lighted, and prepare scanning key K1;
Institute's rheme menu member, for judging input signal cable KEY_SCAN=0 or KEY_SCAN=1, if key K1 does not have It connecting, input signal cable KEY_SCAN is pulled up by resistance R17, KEY_SCAN=1, if key K1 is connected, input signal cable KEY_SCAN is connected by K1 and U2/Q0, KEY_SCAN=0.
7. the time sequence control device of display as claimed in claim 6 and key scan, which is characterized in that the key scan list Member is specifically used for:
Into after interrupt routine, setting interrupt identification or software mark come by way of realizing and not judging, judgement belongs to 8 at present Segment encode shows display and key scan period of t1 to the t8 in totally 8 periods.
8. the time sequence control device of display as claimed in claim 6 and key scan, which is characterized in that the serial shift list Member is specifically used for:
In the 2.5ms incipient stage of t1 period, executes signal wire OFF_DIS and set 1 instruction, after OFF_DIS=1, pass through pass The mode of disconnected triode P9 turns off all displays L1-L7 and light emitting diode lamp.
9. the time sequence control device of display as claimed in claim 6 and key scan, which is characterized in that the key scan list Member is specifically used for:
In bidirectional data line signal wire and clock cable under the control of central processing unit software, using bidirectional data line signal Line sends the mode of data content, clock cable tranmitting data register pulse signal, moves to U1 and U2 two panels shift register Bit manipulation preset times realize Word0 (byte1+byte0) Refresh Data of 1 word totally 2 bytes, U1/ after refreshing Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0>, U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>, U1 is ready in L1 shows Hold, U2/Q0=0 preparation lights the 1st L1 and prepares scanning key K1.
10. the time sequence control device of display as claimed in claim 6 and key scan, which is characterized in that the serial shift Unit is specifically used for:
After Word0 (byte1+byte0) Refresh Data, signal wire OFF_DIS clear command, OFF_DIS=0 are executed Afterwards, by connecting triode P9 saturation conduction, all displays L1-L7 and LED light and power supply is connected, allows to light.
CN201910435162.0A 2019-05-23 2019-05-23 Time sequence control method and device for display and key scanning Active CN110176201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910435162.0A CN110176201B (en) 2019-05-23 2019-05-23 Time sequence control method and device for display and key scanning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910435162.0A CN110176201B (en) 2019-05-23 2019-05-23 Time sequence control method and device for display and key scanning

Publications (2)

Publication Number Publication Date
CN110176201A true CN110176201A (en) 2019-08-27
CN110176201B CN110176201B (en) 2023-02-28

Family

ID=67691984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910435162.0A Active CN110176201B (en) 2019-05-23 2019-05-23 Time sequence control method and device for display and key scanning

Country Status (1)

Country Link
CN (1) CN110176201B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4014012A (en) * 1975-04-07 1977-03-22 Texas Instruments Incorporated Segment scanning method for calculator display system
CN2786743Y (en) * 2004-12-24 2006-06-07 李勇 Improved digital display screen module
CN101344767A (en) * 2008-04-18 2009-01-14 上海海事大学 Non-encoded keyboard and display interface of watercraft embedded micro-controller
CN202887672U (en) * 2012-10-19 2013-04-17 杭州浙宝微电脑技术有限公司 Dynamic display device
CN103761942A (en) * 2014-02-14 2014-04-30 福州福大海矽微电子有限公司 Digital tube display and key control chip with array display multiplexing algorithm
CN203746396U (en) * 2014-02-14 2014-07-30 福州福大海矽微电子有限公司 Nixie tube display and key control chip with array type display multiplexing algorithm
CN104077990A (en) * 2014-07-02 2014-10-01 福州福大海矽微电子有限公司 LED nixie tube display and key control chip using time division multiplexing technology
CN104424873A (en) * 2013-08-19 2015-03-18 鸿富锦精密电子(天津)有限公司 Nixie tube display control circuit
CN105188229A (en) * 2015-10-19 2015-12-23 福建船政交通职业学院 Adaptive segmentally controlled tunnel illumination control system and method
CN106016079A (en) * 2016-07-22 2016-10-12 福建船政交通职业学院 Tunnel lamp and control method thereof

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4014012A (en) * 1975-04-07 1977-03-22 Texas Instruments Incorporated Segment scanning method for calculator display system
CN2786743Y (en) * 2004-12-24 2006-06-07 李勇 Improved digital display screen module
CN101344767A (en) * 2008-04-18 2009-01-14 上海海事大学 Non-encoded keyboard and display interface of watercraft embedded micro-controller
CN202887672U (en) * 2012-10-19 2013-04-17 杭州浙宝微电脑技术有限公司 Dynamic display device
CN104424873A (en) * 2013-08-19 2015-03-18 鸿富锦精密电子(天津)有限公司 Nixie tube display control circuit
CN103761942A (en) * 2014-02-14 2014-04-30 福州福大海矽微电子有限公司 Digital tube display and key control chip with array display multiplexing algorithm
CN203746396U (en) * 2014-02-14 2014-07-30 福州福大海矽微电子有限公司 Nixie tube display and key control chip with array type display multiplexing algorithm
CN104077990A (en) * 2014-07-02 2014-10-01 福州福大海矽微电子有限公司 LED nixie tube display and key control chip using time division multiplexing technology
CN105188229A (en) * 2015-10-19 2015-12-23 福建船政交通职业学院 Adaptive segmentally controlled tunnel illumination control system and method
CN106016079A (en) * 2016-07-22 2016-10-12 福建船政交通职业学院 Tunnel lamp and control method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张江波: "基于ATmega64的LED霓虹灯控制器设计", 《2008全国LED显示应用技术交流暨产业发展研讨会文集》 *

Also Published As

Publication number Publication date
CN110176201B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
CN110136621A (en) The display of reduction central processing unit mouth line resource and key scanning method and device
CN103295526B (en) A kind of LED display control program and method thereof
CN101753222A (en) Visible light communication apparatus and visible light communciation method
CN103165083A (en) Light emitting diode (LED) backlight drive circuit, liquid crystal display device and drive circuit
CN110176201A (en) It is a kind of display and key scan sequential control method and device
CN110148370A (en) A kind of novel scanning circuit
CN109859454B (en) Infrared code sending circuit, chip, remote control equipment and air conditioner based on infrared protocol
CN105162952B (en) A kind of application affairs based reminding method and intelligent terminal
CN207264755U (en) LED display
CN2809777Y (en) Display circuit for motor vehicle gauge
CN101394703B (en) Time clock recovery system and method
CN105161044A (en) Display unit scanning driving method in electric appliance terminal control panel
CN201355878Y (en) System for implementing synchronous renovation
CN202887672U (en) Dynamic display device
CN205508356U (en) LED display driver unit and LED display module
CN206849474U (en) LED display
CN203013219U (en) Segment type liquid crystal display drive circuit having point flickering function
CN204288763U (en) A kind of display screen control system based on CPLD
CN2927597Y (en) Luminescent diode network controlling system
CN211209989U (en) L ED control chip for power line data transmission
CN107093400A (en) LED display and its driving method
CN103760826B (en) Towards the PCI multifunctional digital control system of high speed embedded control system
CN208433204U (en) LED display and horizontal drive circuit
CN103186978B (en) Control the circuit structure of Infrared Remote-Control Sending
CN2932069Y (en) Control device of pointolite light

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