CN101226513A - Single line transmission interface and single byte operational keyboard display module - Google Patents
Single line transmission interface and single byte operational keyboard display module Download PDFInfo
- Publication number
- CN101226513A CN101226513A CNA2007100325573A CN200710032557A CN101226513A CN 101226513 A CN101226513 A CN 101226513A CN A2007100325573 A CNA2007100325573 A CN A2007100325573A CN 200710032557 A CN200710032557 A CN 200710032557A CN 101226513 A CN101226513 A CN 101226513A
- Authority
- CN
- China
- Prior art keywords
- controller
- display module
- drives
- transmission interface
- keyboard
- 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
Links
Images
Landscapes
- Input From Keyboards Or The Like (AREA)
Abstract
The invention discloses a keyboard display module of single-line transmission interface and single-bit operation, which is composed of a controller (1), a segment driver (2), a bit decoding drive (3), a 4x4 determinant keyboard (4) and a 8-bit 8-segment LED display (5), wherein a host (6) is embedded microcomputer system as 8, 16 or 32 bit MCU and DSP, as 80C51 series, AVR series, MSP430 series and 32 bit series with ARM cores, the host (6) uses one I/O signal line to interact with the keyboard display module, and the hot only needs to send one bit command to read button values and control display. The embedded microcomputer system uses the keyboard display module with single-line transmission interface and single-bit operation can save I/O resource of host (6) and simplify the software and hardware designs of the host (6).
Description
Technical field
The present invention relates to the circuit relevant with embedded system. relate in particular to the keyboard with single line communication interface and the display control module of working with embedded system.
Background technology
The electronic product relevant with embedded system, in many cases, all comprise the man-machine interface parts, two parts commonly used are keyboard and display, different with desktop PC computing machine, server, in order to reduce cost and to reduce volume, the less use of embedded system PS2 interface keyboard and USB interface keyboard, usually the keyboard that adopts is a determinant keyboard, especially in 8/16/32 low and middle-end Embedded Application; And the display in the embedded system more is to use 8 sections light-emitting diode displays in some positions or lattice type LCD display.Keyboard in the embedded system and circuit of display driving and interface mode nothing more than 2 kinds: parallel mode and serial mode.Parallel mode drives by host system bus, the circuit complexity, and line is many, and restriction is many, uses underaction, and many models stop production at present basically.Serial mode has SPI interface and I2C interface, uses 2~5 the I/O ports simulation SPI interface of main frame and the sequential of I2C interface to remove operation keyboard and display usually.These two kinds of serial modes all are a kind of multi-thread serial communication bus, as: the I2C interface comprises signal wire (SDA), clock line (SCL) at least.Up to the present, also there be not a kind of integrated keyboard and display that adopts the single serial communication mode.
Visitor in the invention
The objective of the invention is provides a kind of economical and practical in order to overcome the shortcoming of prior art, keyboard with single line communication interface and the display control module of utilizing an I/O signal wire to work with the embedded host system.
The embedded host system can be 8/16/32 the MCU system and the various Control Systems of Microcomputer of dsp system composition.In order to narrate conveniently, the various Control Systems of Microcomputer that are connected with keyboard display module are called main frame.
Purpose of the present invention is achieved through the following technical solutions:
The keyboard display module of a kind of single line transmission interface and single byte operation comprises that controller, section drive, driving, 4 * 4 determinant keyboards, 88 sections light-emitting diode displays are deciphered in the position; The input that the 1st 8 I/O port section of being connected to of controller drives, the section that the output that section drives is connected to 88 sections light-emitting diode displays drives the input section, 3 in the 2nd 8 I/O ports of controller are connected to the input that drives into position decoding, the position decoding that the output that position decoding drives is connected to 88 sections light-emitting diode displays drives the input section, high 4 lines that are connected to 4 * 4 determinant keyboards of the 3rd 8 I/O ports of controller, low 4 alignments that are connected to 4 * 4 determinant keyboards of the 3rd 8 I/O ports of controller; The RXD pin of controller is connected with the TXD pin of main frame; Controller is connected by an I/O signal wire with main frame.Described controller can be contain 8 8-digit microcontrollers of Control Software, also can be programmable logical device or special IC.
Controller among the present invention in the keyboard display module is carried out following 3 tasks: (1) scanning determinant keyboard, the monitoring key-press event takes place if any button, finishes the anti-shake processing of keyboard, and stores corresponding key assignments.(2) with the content of display buffer with dynamic scan mode periodic refreshing light-emitting diode display.(3) by the byte command word of single line transmission interface reception main frame side, resolve also and carry out.Command word is divided into and reads key commands and display command 2 classes, the controller in the keyboard display module receive command word through resolve to read key commands after, differentiate and have or not key-press event to take place, have, then return corresponding key value, have 16 keyboard codings; Do not have, then return 0xff.Controller in the keyboard display module receives command word after resolving to display command, then revises corresponding display buffer, and the order of reception is not returned any information and given main frame as being display command.
Keyboard display module and main frame adopt 1 two-way I/O line to carry out data communication among the present invention, in addition also need 1 common ground in fact between the two as the reference current potential, if keyboard display module does not dispose power supply, also need from main frame side's introducing power lead.But equal no datat stream in these lines that increased.
Technical scheme of the present invention compared with prior art, its beneficial effect is:
The interface mode that keyboard in most of embedded systems and circuit of display driving and controller adopt is based on parallel mode, and parallel mode is by the bus driver of controller system, the circuit complexity, line is many, restriction is many, uses underaction, and the present invention adopts serial line interface.Though the keyboard and the display interface device circuit of SPI and I2C serial mode are also arranged at present, but also need to use 2~5 the I/O ports simulation SPI interfaces of controller and the sequential of I2C interface to remove operation keyboard and display, these two kinds of serial modes all are a kind of multi-thread serial communication bus, and the present invention is a kind of keyboard and display module that adopts the single serial communication mode fully.The hardware of keyboard display module can be made up of 8 single-chip microcomputers and the universal integrated circuit of any cheapness, also can use programmable logic device (PLD) or special IC to constitute, form as 80C51 with the OTP specification that includes the 4KB byte, 5 yuan of its hardware cost less thaies, if adopt the MASK specification, then can further reduce the cost of module.In addition, the control command of keyboard and display module only needs single byte to finish, and is simply more a lot of than the keyboard and the software control of display interface device circuit of present existing serial mode.
Description of drawings
Fig. 1 is that the present invention forms synoptic diagram;
Fig. 2 is an example controller circuitry schematic diagram of the present invention;
Fig. 3 is that keyboard display module side of the present invention and main frame side use the software serial port to send data flowchart;
Fig. 4 is that main frame side of the present invention uses software serial port receiving data stream journey figure;
Embodiment
The invention will be further described below in conjunction with accompanying drawing.
Fig. 1 is that the present invention forms synoptic diagram, comprises that controller 1, section driving 2, position decoding drive 4,88 sections light-emitting diode displays 5 of 3,4 * 4 determinant keyboards.Main frame 6 can be embedded pc systems such as various 8,16 or 32 MCU and DSP, as 80C51 series, AVR series, MSP430 series, have 32 single-chip microcomputer series of ARM kernel etc., main frame 6 uses 1 signal wire and keyboard display module exchange message, and the command word that main frame need only send 1 byte promptly can read key value and control displaying contents.The 1st 8 I/O port section of being connected to of controller 1 drives 2 input, the section that the output of section driving 2 is connected to 88 sections light-emitting diode displays 5 drives the input section, 3 inputs that are connected to position decoding driving 3 in the 2nd 8 I/O ports of controller 1, position decoding drives the position decoding that 3 output is connected to 88 sections light-emitting diode displays 5 and drives the input section, high 4 lines that are connected to 4 * 4 determinant keyboards 5 of the 3rd 8 I/O ports of controller 1, low 4 alignments that are connected to 4 * 4 determinant keyboards 5 of the 3rd 8 I/O ports of controller (1); The RXD pin of controller 1 is connected with the TXD pin of main frame 6, controller 1 and main frame 6 also can use any one not the I/O of usefulness be connected.The control command word that main frame 6 need only send 1 byte promptly can read key value and control displaying contents.
Fig. 2 is an example controller circuitry schematic diagram of the present invention, with single-chip microcomputer SM8952 is that core expansion peripheral chip is formed, SM8925 contains inside program storage and data-carrier store, the P0 mouth of SM8952 is made signal power by the 74HC245 bidirectional bus driver and is amplified, according to actual operating position, the output of 74HC245 need not add current-limiting resistance and directly drive 8 sections LED.The P0 mouth of SM8952 is open-drain output, so increased pull-up resistor AR1 at P0 mouth deferent segment.Low 3 P2.0~P2.2 of the P2 mouth of SM8952 receive A, B, the C pin of BCD decoder driver 74LS145, the D pin ground connection of 74LS145, D is fixed as 0,88 sections LED charactron LED are the common cathode model, when the CBA=000 of 74LS 145, the output O0 of 74LS145 is a low level, and other is output as height, so 1 of the Far Left of 88 sections LED charactrons is lighted; When the CBA=001 of 74LS145, the output O1 of 74LS145 is a low level, and other is output as height, so 2 of the Far Lefts of 88 sections LED charactrons are lighted; When the CBA=111 of 74LS145, the output O7 of 74LS145 is a low level, and other is output as height, so 1 of the rightmost of 88 sections LED charactrons is lighted.74LS145 is output as open collector output, maximum output current during low level (inflow) reaches 80mA, electric current in the time of can absorbing 8 sections of light-emitting diode display fully and all light, according to the charactron model, digit current is generally 8 * (2~5) mA=(16~40) mA when all lighting.High 4 P1.4~P1.7 of the P1 mouth of SM8952 are connected to the alignment of 4 * 4 determinant keyboards, and low 4 P1.0~P1.3 of the P1 mouth of SM8952 are connected to the line of 4 * 4 determinant keyboards.Because the P1 mouth of SM8952 has had pull-up resistor in inside, external pull-up resistor can save.Two steps scanning diagnostic method is adopted in the identification of this determinant nonencoded keyboard button usually.The RXD pin of SM8952 is connected with the TXD pin of main frame 6, SM8952 and main frame 6 also can use any one not the I/O of usefulness be connected.The software control flow process is, after SM8952 receives that from RXD main frame 6 sends 1 byte control command from TXD, resolve this order, according to keyboard display module control command word code table (seeing Table 1), if " reading key value " control command word, then by RXD return key value to main frame 6 from the TXD port; If " 1, read key value " control command word carries out and return key set code, otherwise the LED display buffer is upgraded in other order in the execution list 1.
Led display unit circuit of the present invention uses 88 sections common cathode LED charactrons to form.Wherein the section of LED charactron drives and to be connected with the deferent segment of 74HC245 among Fig. 2, the LED charactron be that driving is connected with the deferent segment of 74LS145 among Fig. 2.
The keyboard display module control command word of single byte operation is as shown in table 1:
Table 1 keyboard display module control command word code table
Function | Main frame sends order (2 system) | Module is returned |
1, reads key value | 0000 XXXX | Rreturn value 00H-0FH, rreturn value is that 0FFH represents not have |
2, clear display | 0001 XXXX | No |
3, the position of operation radix point | 0010 D3 D2D1D0 D2D1D0: the position (0-7) of operation radix point; The D3=1 decimal is lighted, and the D3=0 radix point goes out | No |
4, show Err- | 0011 XXXX | No |
5, show PASS- | 0100 XXXX | No |
6, write 0~F to the display assigned |
1 D6D5D4 D3D2D1D0 D6D5D4: operation display position (0-7); D3D2D1D0: data (00H-0FH) | No rreturn value |
X: |
In the table 1, main frame sends order " 0000 XXXX " and reads the keyboard value, module rreturn value 00H, 01H ..., button " 0 ", " 1 ", " ... ", " 9 " on the corresponding keyboard of 09H, button "+", " statistics ", " cancellation ", ". ", " affirmation ", " function " on module rreturn value 0AH, 0BH, 0CH, 0DH, 0EH, the corresponding keyboard of 0FH.
The RXD termination main frame TXD mouth of SM8952, SM8952 receives the control command word can use interrupt mode, also can use inquiry mode, directly visits the serial ports receiving register and gets final product.What use but SM8952 sends data also is the RXD mouth, so can not use transmitter register to send, can use the software approach simulative serial port to send.Simulative serial port sends idiographic flow as shown in Figure 3.If do not use the TXD mouth in main frame side, and use the I/O mouth to communicate by letter with keyboard display module, the flow process that then sends data is identical with Fig. 3.The flow process that sends data is described below:
A) beginning
B) send start bit (low level)
C) time-delay
D) send the lowest order data bit
E) time-delay
F) send 8 (byte is not)? be to forward h to)
G) send byte and move to right 1, forward d to)
H) send position of rest (high level)
I) time-delay
J) withdraw from
, can not obtain by receiving register owing to use TXD or I/O mouth to communicate by letter in main frame side, receive data and can use software approach simulation asynchronous serial communication sequential to receive data, receive flow process as shown in Figure 4 so receive data with keyboard display module.The flow process that receives data is described below:
A) beginning
B) I/O is set to receive
C) receive start bit (low level)?, do not continue the test start bit
D) time-delay
E) receive 1 bit data position
F) dextroposition is handled
G) receive 8 (byte is not)? be to turn to i)
H) time-delay turns to e)
I) receive position of rest (high level)
J) time-delay
K) withdraw from
The advantage of example of the present invention is, keyboard display module and host interface only need 1 order wire can finish the data transmit-receive function, the main frame mode that has the initiative eventually soon, and main frame promptly transfers receive mode to after sending the control command word of a byte.As long as the communication protocol of keyboard display module satisfies keyboard display module control command word code table (table 1), module then can be made of the microcontroller of any model, and is not restricted to a certain concrete model.All chip hardware cost less thaies are 5 yuan in the example, well below the price of existing said function chip in the market, if adopt the MASK standard chip, then can further reduce the cost of module.The program code that the Control Software of keyboard display module adopts the C language to produce occupies the space less than 1KB.
Can better implement the present invention as mentioned above.
Claims (5)
1. the keyboard display module of single line transmission interface and single byte operation is characterized in that comprising that controller (1), section drive (2), position decoding drives (3), 4 * 4 determinant keyboards (4), 88 sections light-emitting diode displays (5); The 1st 8 I/O port section of being connected to of controller (1) drives the input of (2), the section that the output of section driving (2) is connected to 88 sections light-emitting diode displays (5) drives the input section, 3 in the 2nd 8 I/O ports of controller (1) are connected to the input that drives (3) into position decoding, the position decoding that the output that position decoding drives (3) is connected to 88 sections light-emitting diode displays (5) drives the input section, high 4 lines that are connected to 4 * 4 determinant keyboards (5) of the 3rd 8 I/O ports of controller (1), low 4 alignments that are connected to 4 * 4 determinant keyboards (5) of the 3rd 8 I/O ports of controller (1); The RXD pin of controller (1) is connected with the TXD pin of main frame (6); Controller (1) is connected by an I/O signal wire with main frame (6).
2. the keyboard display module of a kind of single line transmission interface according to claim 1 and single byte operation is characterized in that, controller (1) by cheapness, contain 8 8-digit microcontrollers of Control Software, perhaps be programmable logic device (PLD).
3. the keyboard display module of a kind of single line transmission interface according to claim 2 and single byte operation is characterized in that described controller (1) is a SM8952 type single-chip microcomputer, and program storage and data-carrier store are contained in SM8952 type single-chip microcomputer inside.
4. the keyboard display module of a kind of single line transmission interface according to claim 1 and single byte operation is characterized in that described section driving (2) is the 74HC245 bidirectional bus driver.
5. the keyboard display module of a kind of single line transmission interface according to claim 1 and single byte operation is characterized in that the decoding of described position drives (3) and is BCD decoder driver 74LS145.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100325573A CN100533424C (en) | 2007-12-14 | 2007-12-14 | Single line transmission interface and single byte operational keyboard display module |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100325573A CN100533424C (en) | 2007-12-14 | 2007-12-14 | Single line transmission interface and single byte operational keyboard display module |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101226513A true CN101226513A (en) | 2008-07-23 |
CN100533424C CN100533424C (en) | 2009-08-26 |
Family
ID=39858518
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2007100325573A Expired - Fee Related CN100533424C (en) | 2007-12-14 | 2007-12-14 | Single line transmission interface and single byte operational keyboard display module |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100533424C (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102522041A (en) * | 2011-11-15 | 2012-06-27 | 杨小莉 | DiZhi intelligent teaching robot |
CN103529741A (en) * | 2013-11-06 | 2014-01-22 | 刘宝成 | Method for realizing byte data display by using one LED |
CN104778916A (en) * | 2014-12-02 | 2015-07-15 | 深圳市视维科技有限公司 | All-character LED nixie tube display driving circuit |
CN110136621A (en) * | 2019-05-23 | 2019-08-16 | 福建船政交通职业学院 | The display of reduction central processing unit mouth line resource and key scanning method and device |
CN111237986A (en) * | 2020-01-13 | 2020-06-05 | 广东志高暖通设备股份有限公司 | Air conditioner display device and air conditioner |
-
2007
- 2007-12-14 CN CNB2007100325573A patent/CN100533424C/en not_active Expired - Fee Related
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102522041A (en) * | 2011-11-15 | 2012-06-27 | 杨小莉 | DiZhi intelligent teaching robot |
CN103529741A (en) * | 2013-11-06 | 2014-01-22 | 刘宝成 | Method for realizing byte data display by using one LED |
CN104778916A (en) * | 2014-12-02 | 2015-07-15 | 深圳市视维科技有限公司 | All-character LED nixie tube display driving circuit |
CN110136621A (en) * | 2019-05-23 | 2019-08-16 | 福建船政交通职业学院 | The display of reduction central processing unit mouth line resource and key scanning method and device |
CN111237986A (en) * | 2020-01-13 | 2020-06-05 | 广东志高暖通设备股份有限公司 | Air conditioner display device and air conditioner |
Also Published As
Publication number | Publication date |
---|---|
CN100533424C (en) | 2009-08-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100533424C (en) | Single line transmission interface and single byte operational keyboard display module | |
CN103823776A (en) | Unibus in communication with master equipment and slave equipment and communication method | |
CN203720837U (en) | Unibus for master-slave device communication | |
CN204331878U (en) | Control circuit in a kind of managing system of car parking | |
CN201438269U (en) | Motion control main board, motion control board and motion controller | |
CN201984777U (en) | LED (light-emitting diode) digital tube driving circuit | |
CN102110045B (en) | Simulator for displaying debugging information in real time | |
Yulin et al. | Design and research of embedded PLC development system | |
CN100378699C (en) | Method for reading and writing non-standard temporary register in standard interface devices | |
CN2510902Y (en) | Computer main board failure diagnosis card | |
CN111026620A (en) | Data visualization Processing system and method based on Processing | |
CN102254469A (en) | Experimental device based on embedded development platform | |
CN203251321U (en) | Communication conversion device between CAN bus and 1553B bus | |
CN102841878B (en) | Internet security and acceleration (ISA) interface internet protocol (IP) core based on processor local bus (PLB) | |
CN104977041A (en) | Air humidity and temperature alarm | |
CN209962237U (en) | M.2-form storage device based on PCIe signal conversion eMMC | |
CN201751923U (en) | Experimental apparatus based on embedded development platform | |
CN202995822U (en) | An automatic fare collection system master control unit | |
CN104598410B (en) | A kind of computer card for exempting to write driver and its development approach | |
CN102542872A (en) | Driving system based on embedded development platform | |
CN202694445U (en) | ARM-controlled man-machine interactive system of sorter | |
CN204556722U (en) | Digital voltmeter | |
Wu et al. | Design and Development of Circuit Board for Serial Interface Technology | |
CN204440881U (en) | A kind of character liquid crystal aobvious control modular device | |
CN207895439U (en) | A kind of multi-channel parallel UART circuitry |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090826 Termination date: 20111214 |