[go: up one dir, main page]

CN100533424C - Keyboard display module with single-wire transmission interface and single-byte operation - Google Patents

Keyboard display module with single-wire transmission interface and single-byte operation Download PDF

Info

Publication number
CN100533424C
CN100533424C CNB2007100325573A CN200710032557A CN100533424C CN 100533424 C CN100533424 C CN 100533424C CN B2007100325573 A CNB2007100325573 A CN B2007100325573A CN 200710032557 A CN200710032557 A CN 200710032557A CN 100533424 C CN100533424 C CN 100533424C
Authority
CN
China
Prior art keywords
bit
keyboard
controller
display module
driver
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.)
Expired - Fee Related
Application number
CNB2007100325573A
Other languages
Chinese (zh)
Other versions
CN101226513A (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.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CNB2007100325573A priority Critical patent/CN100533424C/en
Publication of CN101226513A publication Critical patent/CN101226513A/en
Application granted granted Critical
Publication of CN100533424C publication Critical patent/CN100533424C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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

The keyboard display module of single line transmission interface and single byte operation
Technical field
The present invention relates to the circuit relevant, relate in particular to the keyboard with single line communication interface and the display control module of working with embedded system 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 connections in the 2nd 8 I/O ports of controller put in place and decipher the input that drives, 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 PO 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 PO mouth of SM8952 is open-drain output, so increased pull-up resistor AR1 at PO 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 74LS145, 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
In the table 1, main frame sends order " 0000XXXX " 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, ODH, OEH, 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、一种单线传输接口和单字节操作的键盘显示模块,其特征在于包括控制器(1)、段驱动(2)、位译码驱动(3)、4×4行列式键盘(4)、8位8段LED显示器(5);控制器(1)的第1个8位输入/输出口连接到段驱动(2)的输入,段驱动(2)的输出连接到8位8段LED显示器(5)的段驱动输入段,控制器(1)的第2个8位输入/输出口中的3位连接到位译码驱动(3)的输入,位译码驱动(3)的输出连接到8位8段LED显示器(5)的位译码驱动输入段,控制器(1)的第3个8位输入/输出口的高4位连接到4×4行列式键盘(5)的行线,控制器(1)的第3个8位输入/输出口的低4位连接到4×4行列式键盘(5)的列线;控制器(1)的RXD引脚与主机(6)的TXD引脚连接;控制器(1)和主机(6)通过一根I/O信号线连接。1. A keyboard display module with a single-line transmission interface and single-byte operation, characterized in that it includes a controller (1), a segment driver (2), a bit decoding driver (3), and a 4×4 determinant keyboard (4) , 8-bit 8-segment LED display (5); the first 8-bit input/output port of the controller (1) is connected to the input of the segment driver (2), and the output of the segment driver (2) is connected to the 8-bit 8-segment LED The segment driver input segment of the display (5), 3 bits in the second 8-bit input/output port of the controller (1) are connected to the input of the bit decoding driver (3), and the output of the bit decoding driver (3) is connected to The bit decoding drive input segment of the 8-bit 8-segment LED display (5), the upper 4 bits of the third 8-bit input/output port of the controller (1) are connected to the row lines of the 4×4 determinant keyboard (5) , the lower 4 bits of the third 8-bit input/output port of the controller (1) are connected to the column line of the 4×4 determinant keyboard (5); the RXD pin of the controller (1) is connected to the host computer (6) The TXD pin is connected; the controller (1) and the host (6) are connected through an I/O signal line. 2、根据权利要求1所述的一种单线传输接口和单字节操作的键盘显示模块,其特征在于,控制器(1)是含有控制软件的8位微控制器,或者为可编程逻辑器件。2. A keyboard display module with a single-wire transmission interface and a single-byte operation according to claim 1, wherein the controller (1) is an 8-bit microcontroller containing control software, or a programmable logic device . 3、根据权利要求2所述的一种单线传输接口和单字节操作的键盘显示模块,其特征在于所述控制器(1)为SM8952型单片机,SM8952型单片机内部含有程序存储器和数据存储器。3. A keyboard display module with a single-line transmission interface and single-byte operation according to claim 2, characterized in that the controller (1) is a SM8952 single-chip microcomputer, and the SM8952 single-chip microcomputer contains a program memory and a data memory inside. 4、根据权利要求1所述的一种单线传输接口和单字节操作的键盘显示模块,其特征在于所述的段驱动(2)为74HC245双向总线驱动器。4. A single-wire transmission interface and single-byte operation keyboard display module according to claim 1, characterized in that said segment driver (2) is a 74HC245 bidirectional bus driver. 5、根据权利要求1所述的一种单线传输接口和单字节操作的键盘显示模块,其特征在于所述的位译码驱动(3)为BCD译码驱动器74LS145。5. A single-line transmission interface and single-byte operation keyboard display module according to claim 1, characterized in that said bit decoding driver (3) is a BCD decoding driver 74LS145.
CNB2007100325573A 2007-12-14 2007-12-14 Keyboard display module with single-wire transmission interface and single-byte operation Expired - Fee Related CN100533424C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100325573A CN100533424C (en) 2007-12-14 2007-12-14 Keyboard display module with single-wire transmission interface and single-byte operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100325573A CN100533424C (en) 2007-12-14 2007-12-14 Keyboard display module with single-wire transmission interface and single-byte operation

Publications (2)

Publication Number Publication Date
CN101226513A CN101226513A (en) 2008-07-23
CN100533424C true 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 Keyboard display module with single-wire transmission interface and single-byte operation

Country Status (1)

Country Link
CN (1) CN100533424C (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
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
CN111237986B (en) * 2020-01-13 2022-01-04 广东积微科技有限公司 Air conditioner display device and air conditioner

Also Published As

Publication number Publication date
CN101226513A (en) 2008-07-23

Similar Documents

Publication Publication Date Title
CN107145430A (en) A kind of method for realizing NVMe SSD lightings by CPLD based on I2C interfaces
CN100533424C (en) Keyboard display module with single-wire transmission interface and single-byte operation
CN103823776A (en) Unibus in communication with master equipment and slave equipment and communication method
CN107066746A (en) The method for realizing PCA9555 functions by CPLD based on I2C interfaces
CN203720837U (en) Unibus for master-slave device communication
Chapweske The PS/2 mouse/keyboard protocol
CN201438269U (en) Motion control main board, motion control board and motion controller
CN201984777U (en) LED (light-emitting diode) digital tube driving circuit
CN102193860A (en) Microcontroller online debugging circuit and method as well as microcontroller
CN105590548A (en) Creative electronic perpetual calendar
CN108564859A (en) SCM Based Multifunctional experiment development system
CN201307346Y (en) PC-imitating single-chip microcomputer experimental board
CN102254469A (en) Experimental device based on embedded development platform
CN203251321U (en) Communication conversion device between CAN bus and 1553B bus
CN102520652A (en) Multifunctional control module for automobile instruments
CN101751115A (en) Method for solving data transmission matching of DSP and low-speed output device
CN104155891A (en) I2C-based networked transmitter and its communication implementation method
CN201751923U (en) Experimental apparatus based on embedded development platform
CN102542872A (en) Driving system based on embedded development platform
CN208432879U (en) A kind of adaptive multi-functional Internet of Things controller
CN104598410B (en) A kind of computer card for exempting to write driver and its development approach
CN201194395Y (en) Embedded multi-protocol communication module based on 485
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
CN204375017U (en) A kind of fingerprint attendance system

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