CN110148370A - A kind of novel scanning circuit - Google Patents

A kind of novel scanning circuit Download PDF

Info

Publication number
CN110148370A
CN110148370A CN201910436103.5A CN201910436103A CN110148370A CN 110148370 A CN110148370 A CN 110148370A CN 201910436103 A CN201910436103 A CN 201910436103A CN 110148370 A CN110148370 A CN 110148370A
Authority
CN
China
Prior art keywords
key
circuit
display
scan
data
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
Application number
CN201910436103.5A
Other languages
Chinese (zh)
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 CN201910436103.5A priority Critical patent/CN110148370A/en
Publication of CN110148370A publication Critical patent/CN110148370A/en
Pending legal-status Critical Current

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

Abstract

The invention discloses a kind of novel scanning circuits, it include: key scanning circuit, shift register, LED light display circuit and 8 sections of code display circuits, 8 sections of code display circuits, for exiting interrupt routine, after exiting interruption, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7, 0>and U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7, 0>content-data by registers latch, keep display data constant, until the generation that the preset time interrupts next time, into the t2 period, the data latch retention time is about t1-t11=t12, this is that L1 shows the time t12 being remain on.By the above-mentioned means, can be realized under the premise of reducing central processing unit mouth line resource to the greatest extent, greater amount of display, LED light lamp control and key scan are realized using common common component, and reduce hardware cost.

Description

A kind of novel scanning circuit
Technical field
The present invention relates to field of display technology more particularly to a kind of novel scanning circuits.
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, comprising:
Scheme one, is realized using special chip, and the special chip of early stage can only perhaps drive as display or can only As key scan, the two function is had concurrently few, the dedicated display control occurred at present and key scan chip, by The hard constraints that chip technology requires, it is inflexible for use, it is usually designed for the use of specific occasion, and higher cost.
The driving chip of scheme two, display realizes large-scale display drive control, this mode using communication modes It is driven more suitable for large-scale lattice LED display, being not suitable for charactron etc. needs the display driving control of display content System, moreover, this mode does not have the function of key scan generally simultaneously.
Scheme three, using a small amount of CPU (Central Processing Unit, central processing unit) mouth line, by more complex Algorithm realizes that the key scan of big quantity, such as 5 mouth lines realize that 25 key scans, four keys are pressed twice to realize 16 keys The modes such as scanning.This kind of mode increases the complexity of software algorithm, is unfavorable for promoting, and these schemes can only carry out key and sweep It retouches, there is no display driving function.
Summary of the invention
In view of this, can be realized it is an object of the invention to propose a kind of novel scanning circuit and reducing center to the greatest extent Under the premise of processor mouth line resource, greater amount of display, LED light lamp are realized using common common component Control and key scan, and reduce hardware cost.
According to an aspect of the present invention, a kind of novel scanning circuit is provided, comprising:
Key scanning circuit, shift register, LED light display circuit, 8 sections of code display circuits;
The key scanning circuit is respectively connected with the shift register, the LED light display circuit, the displacement Register is respectively connected with the key scanning circuit, the key scanning circuit, the LED light display circuit, the LED Lamp display circuit is respectively connected with the key scanning circuit, the shift register, 8 sections of code display circuits, institute 8 sections of code display circuits are stated to be respectively connected with the shift register, the LED light display circuit;
After the key scanning circuit enters interrupt routine, judgement belongs to 8 segment encodes at present and shows t1 to t8 totally 8 periods In display and the key scan period, wherein different time sections realize display and the key scan of different positions, in order in turn It carries out, the shift register executes signal wire OFF_DIS and set 1 instruction, in OFF_ in the 2.5ms incipient stage of t1 period After DIS=1, turn off all displays L1-L7 and light emitting diode lamp, the key scanning circuit, also in two-way number According to line signal wire and clock cable under the control of central processing unit software, U1 and U2 two panels shift register is shifted 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, and the shift register is also in Word0 (byte1+ Byte0) after Refresh Data, signal wire OFF_DIS clear command is executed, after OFF_DIS=0, makes all displays L1-L7 It is connected with 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 lights the 1st L1, and prepares scanning key K1, and the LED light display circuit judges 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,8 sections of codes Display circuit is exiting interrupt routine, after exiting interruption, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0>and U2/ Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content-data by registers latch, keep display data constant, until next The generation that the secondary preset time interrupts, into the t2 period, the data latch retention time is about t1-t11=t12, this is L1 Show the time t12 being remain on.
Wherein, the key scanning circuit, comprising:
Circuit and decision circuitry are set;
The setting circuit is connected with the decision circuitry;
The setting circuit setting interrupt identification or software mark, the decision circuitry pass through after entering interrupt routine The interrupt identification or software mark of the setting realize the mode not judged, judgement belongs to 8 segment encodes at present and shows t1 to t8 totally 8 Display and key scan period in a period.
Wherein, the shift register, comprising:
Execution circuit and breaking circuit;
The execution circuit is connected with the breaking circuit;
The execution circuit executes signal wire OFF_DIS and sets 1 instruction, the pass in the 2.5ms incipient stage of t1 period Deenergizing is after OFF_DIS=1, by way of turning off triode P9, indicates all displays L1-L7 and light emitting diode Lamp shutdown.
Wherein, the key scanning circuit, comprising:
Transmitting line and operation circuit;
The transmitting line is connected with the operation circuit;
The transmitting line under the control of central processing unit software, is adopted in bidirectional data line signal wire and clock cable Data content, clock cable tranmitting data register pulse signal are sent with bidirectional data line signal wire, the operation circuit is according to institute Transmitting line is stated in bidirectional data line signal wire and clock cable under the control of central processing unit software, using bi-directional data Line signal wire sends the mode of data content, clock cable tranmitting data register pulse signal, to U1 and U2 two panels shift register Shifting function preset times are carried out, 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 shift register, comprising:
Instruction execution circuit and power supply on-unit;
Described instruction execution circuit is connected with the power supply on-unit;
Described instruction execution circuit executes signal wire OFF_DIS after Word0 (byte1+byte0) Refresh Data Clear command, the power supply on-unit, by connecting triode P9 saturation conduction, make all displays after OFF_DIS=0 L1-L7 and LED light and power supply are connected, and allow to light.
Wherein, the key scanning circuit is single-chip microcontroller.
Wherein, the shift register is shift register 74HC164.
Wherein, the LED light display circuit is charactron.
Wherein, 8 sections of code display circuits are displays.
It can be found that above scheme, exits interrupt routine, after exiting interruption, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1 < 7,0>and U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content-data by registers latch, remain unchanged, until under The generation that the primary preset time interrupts, into the t2 period, the data latch retention time is about t1-t11=t12, this is The time t12 that L1 display is remain on can be realized under the premise of reducing central processing unit mouth line resource to the greatest extent, using normal The common component seen realizes greater amount of display, LED light lamp control and key scan, and reduces hardware cost.
Further, above scheme it is few to occupy CPU mouth line resource, it is only necessary to 4 mouth lines OFF_DIS, SDA, CLK, KEY_ SCAN is as signal wire, so that it may realize display control and key scan, in the case where not increasing control mouth line, pass through increasing Add shift register and part of devices, can also double " dilatation ", realizes the control of more multi-display and key scan, because using In the digital control circuit of CPU, all very rare preciousness of mouth line resource is controlled using this control method and is equipped with high-speed CPU, mesh Be guarantee Refresh Data time t11 it is not too large, few control mouth line may be implemented and realize fairly large display control System and key scan.
Further, above scheme needs hardware device to be used few, does not need dedicated devices, and hardware cost is low, with this For 8 positions of exemplary driving such as 78 sections of codes and 18 LED light display circuit and 8 key scanning circuits, 2 shift registers and several triodes, diode, resistance, capacitor etc. are only needed, used device is the common device in market Part, purchase are easy, cheap, the device type of above scheme, such as shift register 74HC164, triode 9012 can also To be replaced using other model devices with the same function.
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 is the structural schematic diagram of novel one embodiment of scanning circuit of the present invention;
Fig. 2 is the time diagram of novel one embodiment of scanning circuit of the present invention;
Fig. 3 is the time diagram of each scan period of novel one embodiment of scanning circuit of the present invention.
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 provides a kind of novel scanning circuit, can be realized in the premise for reducing central processing unit mouth line resource to the greatest extent Under, greater amount of display, LED light lamp control and key scan are realized using common common component, and are reduced Hardware cost.
It is the structural schematic diagram of novel one embodiment of scanning circuit of the present invention with Fig. 2 and Fig. 3, Fig. 1 referring to Figure 1, Fig. 2 is The time diagram of novel one embodiment of scanning circuit of the present invention, Fig. 3 are each of novel one embodiments of scanning circuit of the present invention The time diagram of scan period.As shown in Figure 1 and Figure 2 and Figure 3, the novel scanning circuit 10 include key scanning circuit 11, 13,8 sections of shift register 12, LED light display circuit code display circuits 14.
The key scanning circuit 11, 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 shift register 12 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 scanning circuit 11 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 12, realize 1 word totally 2 bytes Word0 (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 shift register 12 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.
The LED light display circuit 13, for judging input signal cable KEY_SCAN=0 or KEY_SCAN=1, if pressed 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 wire KEY_SCAN is connected by K1 and U2/Q0, KEY_SCAN=0.
8 sections of code display circuits 14, for exiting interrupt routine, after exiting interruption, U1/Q7Q6Q5Q4Q3Q2Q1Q0 =Byte1<7,0>and U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content-data by registers latch, keep aobvious Registration is according to constant, until the generation that the preset time interrupts next time, into the t2 period, data latch the retention time and are about T1-t11=t12, this is that L1 shows the time t12 being remain on.
Optionally, the key scanning circuit 11, 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 shift register 12, 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 scanning circuit 11, 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 sends the mode of data content, clock cable tranmitting data register pulse signal, to U1 and U2 two panels shift register 12 Shifting function preset times are carried out, 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 shift register 12, 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.
Optionally, the key scanning circuit 11 may include:
Circuit (not indicating in figure) and decision circuitry (not indicating in figure) are set;
The setting circuit is connected with the decision circuitry;
Interrupt identification or software mark is arranged in the setting circuit, which is set after entering interrupt routine by this The interrupt identification or software mark set realize the mode not judged, judgement belongs to 8 segment encodes at present and shows t1 to t8 totally 8 time Display and key scan period in section.
Optionally, the shift register 12 may include:
Execution circuit (not indicated in figure) and breaking circuit (not indicated in figure);
The execution circuit is connected with the breaking circuit;
The execution circuit executes signal wire OFF_DIS and sets 1 instruction in the 2.5ms incipient stage of t1 period, shutdown electricity Road is after OFF_DIS=1, by way of turning off triode P9, closes all displays L1-L7 and light emitting diode lamp It is disconnected.
Optionally, the key scanning circuit 11 may include:
Transmitting line (not indicated in figure) and operation circuit (not indicated in figure);
The transmitting line is connected with the operation circuit;
The transmitting line under the control of central processing unit software, is used in bidirectional data line signal wire and clock cable Bidirectional data line signal wire sends data content, clock cable tranmitting data register pulse signal, and the operation circuit is according to the transmission Circuit 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, carries out to U1 and U2 two panels shift register 12 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 shift register 12 may include:
Instruction execution circuit (not indicated in figure) and power supply on-unit (not indicated in figure);
The instruction execution circuit is connected with the power supply on-unit;
It is clear to execute signal wire OFF_DIS after Word0 (byte1+byte0) Refresh Data for the instruction execution circuit Zero instruction, the power supply on-unit, by connecting triode P9 saturation conduction, make all displays L1- after OFF_DIS=0 L7 and LED light and power supply are connected, and allow to light.
Optionally, which is single-chip microcontroller, and the present invention is not limited.
Optionally, which is shift register 12, and the present invention is not limited.
Optionally, which is charactron, and the present invention is not limited.
Optionally, which is display, and the present invention is not limited.
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.
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 Display or LED light is caused to flash interference when one step 12 Refresh Data of shift register.
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 12, 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.
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.
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, interrupt routine is exited.After exiting interruption, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,0> And U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content-data by registers latch, remain unchanged, until next time The generation that the 2.5ms time interrupts, into the t2 period.The data latch retention time is about t1-t11=t12, i.e. 2.5ms- 0.1ms=2.4ms, this is the time t12 that L1 display is remain on.
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 12 and part of devices can also double " dilatation ", realize the control of more multi-display and key scan.Because using CPU Digital control circuit in, control all very rare preciousness of mouth line resource.Using this control method, it is equipped with high-speed CPU, it is therefore an objective to Guarantee that Refresh Data time t11 is not too large, may be implemented few control mouth line realize fairly large display control with Key scan.
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 11 for, only Need 2 shift registers 12 and several triodes, diode, resistance, capacitor etc..Used device is the common device in market Part, purchase is easy, cheap.Device type in the present embodiment, such as shift register 1274HC164, triode 9012 Deng can also using other model devices with the same function replace.
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 12 on hardware, and welds 8 key scanning circuits 11 in its output end.Increase a word on software The position for saving (byte) selects information, exports in Refresh Data, and increase corresponding key scan program on software.Every increase A piece of shift register 12 can increase by 8 key scans.Therefore this programme is also quite suitable for needing high-volume key scan Occasion.
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 12 of every increase can increase by 8 sections of 8 positions code display or 8 LED lights of person.More it can need to increase by 12 quantity of shift register, to realize large batch of display or LED indication The drive control of lamp 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 such as this example of shift register 12 of transmission data equally also may be implemented to control.Then increase by 1, then 16 kinds of displays controls once may be implemented;Then increase by 2, then 24 kinds of displays control once etc. may be implemented Deng.
It can be found that in the present embodiment, interrupt routine is exited, and after exiting interruption, U1/Q7Q6Q5Q4Q3Q2Q1Q0= Byte1<7,0>and U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content-data by registers latch, remain unchanged, Until the generation that the preset time interrupts next time, into the t2 period, the data latch retention time is about t1-t11=t12, This is the time t12 that L1 display is remain on, and be can be realized under the premise of reducing central processing unit mouth line resource to the greatest extent, Greater amount of display, LED light lamp control and key scan are realized using common common component, and are reduced hard Part cost.
It can be found that above scheme, exits interrupt routine, after exiting interruption, U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1 < 7,0>and U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content-data by registers latch, remain unchanged, until under The generation that the primary preset time interrupts, into the t2 period, the data latch retention time is about t1-t11=t12, this is The time t12 that L1 display is remain on can be realized under the premise of reducing central processing unit mouth line resource to the greatest extent, using normal The common component seen realizes greater amount of display, LED light lamp control and key scan, and reduces hardware cost.
Further, above scheme it is few to occupy CPU mouth line resource, it is only necessary to 4 mouth lines OFF_DIS, SDA, CLK, KEY_ SCAN is as signal wire, so that it may realize display control and key scan, in the case where not increasing control mouth line, pass through increasing Add shift register 12 and part of devices, can also double " dilatation ", the control of more multi-display and key scan is realized, because adopting High-speed CPU is equipped with using this control method with mouth line resource all very rare preciousness in the digital control circuit of CPU, is controlled, Purpose is to guarantee that Refresh Data time t11 is not too large, and few control mouth line may be implemented and realize fairly large display Control and key scan.
Further, above scheme needs hardware device to be used few, does not need dedicated devices, and hardware cost is low, with this 8 positions of exemplary driving such as 78 sections of codes and 18 LED light display circuit and 8 key scanning circuits 11 are Example, it is only necessary to which 2 shift registers 12 and several triodes, diode, resistance, capacitor etc., used device is market Commonplace components, purchase are easy, cheap, the device type of above scheme, such as shift register 1274HC164, triode 9012 are waited and can also be replaced using other model devices with the same function.
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 12 on hardware, and weld 8 key scanning circuits 11 in its output end, increases by one on software The position of byte (byte) selects information, exports in Refresh Data, and increase corresponding key scan program, every increasing on software Add a piece of shift register 12,8 key scans can be increased, therefore this programme is also quite suitable for that high-volume key is needed to sweep The occasion retouched.
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 12 of every increase can increase by 8 sections of 8 positions code display or 8 LED lights of person more can need to increase by 12 quantity of shift register, to realize large batch of display or LED indication The drive control of lamp 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 such as this example of shift register 12 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 in piece;Then increase by 2, then 24 kinds of displays controls once may be implemented System etc..
It should be understood by those ordinary skilled in the art that: the discussion of any of the above embodiment is exemplary only, not It is intended to imply that the scope of the present disclosure (including claim) is limited to these examples;Under thinking of the invention, above embodiments Or can also be combined between the technical characteristic in different embodiments, step can be realized with random order, and be existed such as Many other variations of the upper different aspect of the invention, for simplicity, they are not provided in details.
In addition, to simplify explanation and discussing, and in order not to obscure the invention, it can in provided attached drawing It is connect with showing or can not show with the well known power ground of integrated circuit (IC) chip and other components.Furthermore, it is possible to Device is shown in block diagram form, to avoid obscuring the invention, and this has also contemplated following facts, i.e., about this The details of the embodiment of a little block diagram arrangements be height depend on will implementing platform of the invention (that is, these details should It is completely within the scope of the understanding of those skilled in the art).Elaborating that detail (for example, circuit) is of the invention to describe In the case where exemplary embodiment, it will be apparent to those skilled in the art that can be in these no details In the case where or implement the present invention in the case that these details change.Therefore, these descriptions should be considered as explanation Property rather than it is restrictive.
Although having been incorporated with specific embodiments of the present invention, invention has been described, according to retouching for front It states, many replacements of these embodiments, modifications and variations will be apparent for those of ordinary skills.Example Such as, discussed embodiment can be used in other memory architectures (for example, dynamic ram (DRAM)).
The embodiment of the present invention be intended to cover fall into all such replacements within the broad range of appended claims, Modifications and variations.Therefore, all within the spirits and principles of the present invention, any omission, modification, equivalent replacement, the improvement made Deng should all be included in the protection scope of the present invention.

Claims (9)

1. a kind of novel scanning circuit characterized by comprising
Key scanning circuit, shift register, LED light display circuit, 8 sections of code display circuits;
The key scanning circuit, 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 shift register 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 scanning circuit 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, after refreshing
U1/Q7Q6Q5Q4Q3Q2Q1Q0=Byte1<7,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;
The shift register 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, and by U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content is determined It is fixed, in the t1 period, Byte0<7,0>=11111110, i.e. U2/Q0=0, the 1st L1 is lighted, and prepare scanning key K1;
The LED light display circuit, 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;
8 sections of code display circuits, for exiting interrupt routine, after exiting interruption, U1/Q7Q6Q5Q4Q3Q2Q1Q0= Byte1<7,0>and U2/Q7Q6Q5Q4Q3Q2Q1Q0=Byte0<7,0>content-data by registers latch, keep display Data are constant, until the generation that the preset time interrupts next time, into the t2 period, the data latch retention time is about t1- T11=t12, this is that L1 shows the time t12 being remain on.
2. novel scanning circuit as described in claim 1, which is characterized in that the key scanning circuit, comprising:
Circuit and decision circuitry are set;
The setting circuit is connected with the decision circuitry;
The setting circuit setting interrupt identification or software mark, the decision circuitry is after entering interrupt routine, by described The interrupt identification or software mark of setting realize the mode not judged, judgement belong at present 8 segment encodes show t1 to t8 totally 8 when Between display in section and key scan period.
3. novel scanning circuit as described in claim 1, which is characterized in that the shift register, comprising:
Execution circuit and breaking circuit;
The execution circuit is connected with the breaking circuit;
The execution circuit executes signal wire OFF_DIS and sets 1 instruction, the shutdown electricity in the 2.5ms incipient stage of t1 period Road is after OFF_DIS=1, by way of turning off triode P9, closes all displays L1-L7 and light emitting diode lamp It is disconnected.
4. novel scanning circuit as described in claim 1, which is characterized in that the key scanning circuit, comprising:
Transmitting line and operation circuit;
The transmitting line is connected with the operation circuit;
The transmitting line in bidirectional data line signal wire and clock cable under the control of central processing unit software, using double Data content, clock cable tranmitting data register pulse signal are sent to data line signal line, the operation circuit is according to the hair Under the control of central processing unit software, believed using bidirectional data line in bidirectional data line signal wire and clock cable on power transmission road 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.
5. novel scanning circuit as described in claim 1, which is characterized in that the shift register, comprising:
Instruction execution circuit and power supply on-unit;
Described instruction execution circuit is connected with the power supply on-unit;
Described instruction execution circuit executes signal wire OFF_DIS and resets after Word0 (byte1+byte0) Refresh Data Instruction, the power supply on-unit, by connecting triode P9 saturation conduction, make all displays L1- after OFF_DIS=0 L7 and LED light and power supply are connected, and allow to light.
6. novel scanning circuit as described in claim 1, which is characterized in that the key scanning circuit is single-chip microcontroller.
7. novel scanning circuit as described in claim 1, which is characterized in that the shift register is shift register 74HC164。
8. novel scanning circuit as described in claim 1, which is characterized in that the LED light display circuit is charactron.
9. novel scanning circuit as described in claim 1, which is characterized in that 8 sections of code display circuits are displays.
CN201910436103.5A 2019-05-23 2019-05-23 A kind of novel scanning circuit Pending CN110148370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910436103.5A CN110148370A (en) 2019-05-23 2019-05-23 A kind of novel scanning circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910436103.5A CN110148370A (en) 2019-05-23 2019-05-23 A kind of novel scanning circuit

Publications (1)

Publication Number Publication Date
CN110148370A true CN110148370A (en) 2019-08-20

Family

ID=67592831

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910436103.5A Pending CN110148370A (en) 2019-05-23 2019-05-23 A kind of novel scanning circuit

Country Status (1)

Country Link
CN (1) CN110148370A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110136621A (en) * 2019-05-23 2019-08-16 福建船政交通职业学院 The display of reduction central processing unit mouth line resource and key scanning method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5193009A (en) * 1989-01-20 1993-03-09 Goldstar Co., Ltd. Signal switching method of a TV-VCR combination having two tuners
CN103761942A (en) * 2014-02-14 2014-04-30 福州福大海矽微电子有限公司 Digital tube display and key control chip with array display multiplexing algorithm
CN104077990A (en) * 2014-07-02 2014-10-01 福州福大海矽微电子有限公司 LED nixie tube display and key control chip using time division multiplexing technology
CN104332125A (en) * 2014-11-13 2015-02-04 梧州学院 Nixie tube panel and key control circuit and control method thereof
CN206517391U (en) * 2016-11-04 2017-09-22 广州邵安电子科技有限公司 A kind of button shows expanded circuit
CN208384969U (en) * 2018-07-02 2019-01-15 广东轻工职业技术学院 A kind of device of drive digital tube and button multiplexing
CN110136621A (en) * 2019-05-23 2019-08-16 福建船政交通职业学院 The display of reduction central processing unit mouth line resource and key scanning method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5193009A (en) * 1989-01-20 1993-03-09 Goldstar Co., Ltd. Signal switching method of a TV-VCR combination having two tuners
CN103761942A (en) * 2014-02-14 2014-04-30 福州福大海矽微电子有限公司 Digital tube display and key control chip with array display multiplexing algorithm
CN104077990A (en) * 2014-07-02 2014-10-01 福州福大海矽微电子有限公司 LED nixie tube display and key control chip using time division multiplexing technology
CN104332125A (en) * 2014-11-13 2015-02-04 梧州学院 Nixie tube panel and key control circuit and control method thereof
CN206517391U (en) * 2016-11-04 2017-09-22 广州邵安电子科技有限公司 A kind of button shows expanded circuit
CN208384969U (en) * 2018-07-02 2019-01-15 广东轻工职业技术学院 A kind of device of drive digital tube and button multiplexing
CN110136621A (en) * 2019-05-23 2019-08-16 福建船政交通职业学院 The display of reduction central processing unit mouth line resource and key scanning method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘胜;: "基于移位芯片的显示及键盘模块设计方法" *
张国锋;汪静甜;: "基于PIC12C508的LED显示电路" *
胡仁杰: "一种实用的数码显示与键盘扫描电路" *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110136621A (en) * 2019-05-23 2019-08-16 福建船政交通职业学院 The display of reduction central processing unit mouth line resource and key scanning method and device

Similar Documents

Publication Publication Date Title
CN110136621A (en) The display of reduction central processing unit mouth line resource and key scanning method and device
CN103295526A (en) Light emitting diode (LED) display control system and method thereof
CN110148370A (en) A kind of novel scanning circuit
CN201344454Y (en) Traffic light with variable patterns
CN202019479U (en) Novel single line cascade light-emitting diode (LED) driver integrated circuit
CN103813579B (en) Light emitting diode driving circuit and driving system of light emitting diode
CN102968963B (en) LED (light-emitting diode) backlight driving circuit, liquid crystal display and driving method
CN1601911B (en) Digital coding method using light flashing frequency to express information
CN204115587U (en) A kind of remote control fireworks setting-off device
CN207264755U (en) LED display
CN110176201A (en) It is a kind of display and key scan sequential control method and device
CN204906816U (en) Two -wire system LED drive control integrated circuit that power supply and signal combined together
CN106960647B (en) Energy-saving light-emitting nixie tube display driving circuit
CN105101574A (en) Two-wire light emitting diode (LED) driving control integrated circuit with power supply and signal combined
CN101394703B (en) Time clock recovery system and method
CN202887672U (en) Dynamic display device
CN203013219U (en) Segment type liquid crystal display drive circuit having point flickering function
CN106023603B (en) A kind of traffic intersection signal lamp indicating means
CN100437673C (en) LED indicating device and method
CN206849474U (en) LED display
CN103516552A (en) State indication method and state indication device of electronic device
CN112672472A (en) Flickering control method for beacon light quality
CN202285168U (en) Novel nixie tube with driver board
CN107346652B (en) LED display device and driving method thereof
CN202917007U (en) Light adaptive signal lamp

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