[go: up one dir, main page]

CN101211322B - Keyboard controller and host data interchanging method and keyboard controller - Google Patents

Keyboard controller and host data interchanging method and keyboard controller Download PDF

Info

Publication number
CN101211322B
CN101211322B CN2006101716211A CN200610171621A CN101211322B CN 101211322 B CN101211322 B CN 101211322B CN 2006101716211 A CN2006101716211 A CN 2006101716211A CN 200610171621 A CN200610171621 A CN 200610171621A CN 101211322 B CN101211322 B CN 101211322B
Authority
CN
China
Prior art keywords
keyboard controller
main frame
port
group
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.)
Active
Application number
CN2006101716211A
Other languages
Chinese (zh)
Other versions
CN101211322A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN2006101716211A priority Critical patent/CN101211322B/en
Publication of CN101211322A publication Critical patent/CN101211322A/en
Application granted granted Critical
Publication of CN101211322B publication Critical patent/CN101211322B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

The invention discloses a keypad controller and a method for exchanging data between the keypad controller and a host computer. The method comprises the following steps: step 1, storing the exchanged data between the keypad controller and the host computer in a local memory which is capable of being accessed by the host computer without interrupting the operation of the keypad controller; and step 2, notifying the keypad controller or the host computer to read the exchanged data stored in the local memory through an idle third port in the keypad controller. The invention obviates the interruption of the keypad controller while transmitting every byte of data and solves the problems during frequent data exchange between the current keypad controller and the host computer without increasing the hardware cost.

Description

Keyboard controller and main frame carry out the method and the keyboard controller of exchanges data
Technical field
The present invention relates to the keyboard controller technology in the computing machine, particularly relate to method and keyboard controller thereof that a kind of keyboard controller and main frame carry out exchanges data.
Background technology
In notebook, KBC (keyboard controller) is a very important components, in present KBC chip, generally there are three interfaces to come to carry out communication with main frame, one is keyboard interface (0x60/0x64), be mainly used to transmit and keyboard, data that mouse is relevant, one is power-management interface (0x62/0x66), be mainly used to transmit the data relevant with power management, also has an interface that does not generally all have use: the 3rd group of port (0x68/0x6c, the address of port can be revised).The problem that main frame exists when carrying out exchanges data by these three interfaces and KBC is, between main frame and KBC, there are many data to need the frequent words that transmit, these three interfaces all are difficult to finish, this is because the working method of these three interfaces limits, transmitting a byte data with main frame by keyboard interface 0x60/0x64 is example to KBC: main frame read states register (0x64), see whether the main frame input port is empty, if be empty, then write an order of appointing to command register, and then this read states register, see that whether input port is still for empty, if be empty, the data that then write a byte are to keyboard interface 0x60, byte of every like this transmission all will be passed through such process, and,, all can trigger an interruption and interrupt the work of KBC whenever main frame writes data to keyboard interface 0x60/0x64 at the KBC end.If there is multibyte data to need between main frame and KBC, to transmit continually like this, can interrupt the work of KBC continually, and increase the weight of the burden of KBC, can cause the poor performance of system.Though above process also can realize the lifting of performance by one group of hardware register, realizes that the chip cost of this function is very high.
Summary of the invention
The object of the present invention is to provide a kind of keyboard controller and main frame to carry out the method and the keyboard controller of exchanges data, when the solution prior art needs the frequent exchange data between KBC and main frame, need the problem of higher hardware cost ability elevator system performance.
To achieve these goals, the invention provides the method that a kind of keyboard controller and main frame carry out exchanges data, wherein, comprising:
Step 1 is stored in the interaction data between keyboard controller and main frame that the work of break key disk controller just can be by in the self-contained storing devices of this keyboard controller of host access;
Step 2 comes notify keyboard controller or main frame to remove to read in the described self-contained storing devices described interaction data by the 3rd group of port in the keyboard controller; Described the 3rd group of port is chosen as power-management interface and other the idle interface of keyboard interface phase region that is had with keyboard controller.
Above-mentioned method, wherein, described self-contained storing devices be can be by input/output port or the mode by internal storage access by host access: the random access memory of the random access memory of keyboard controller, register or real-time clock.
Above-mentioned method wherein, sends to keyboard controller under the condition of described interaction data at main frame, and described step 1 comprises: main frame is written to the interaction data that needs transmit in the described self-contained storing devices; Described step 2 comprises: main frame is read the status register of described the 3rd group of port, if the input buffer of determining described the 3rd group of port according to described status register is for empty, then the command register toward the 3rd group of port writes an order of appointing and triggers an interruption to described keyboard controller, and described keyboard controller reads described order back and reads described interaction data from described self-contained storing devices.
Above-mentioned method wherein, sends to main frame under the condition of described interaction data in keyboard controller, and described step 1 comprises: the interaction data that keyboard controller will need to transmit is written in the described self-contained storing devices; Described step 2 comprises: keyboard controller sends a visit data to main frame by described the 3rd group of port, thus the sign that makes the status register of the 3rd group of port put output buffer full; After main frame is found the sign of described output buffer full, read described visit data, and read described interaction data from described self-contained storing devices.
In order to realize purpose of the present invention, the present invention also provides a kind of keyboard controller, carries out exchanges data with main frame, wherein, comprise: self-contained storing devices, the work of break key disk controller just can be used for the interaction data between storage keyboard controller and main frame by host access; The 3rd group of port is used for notify keyboard controller or main frame and goes described self-contained storing devices to read described interaction data; Described the 3rd group of port is power-management interface and other the idle interface of keyboard interface phase region that is had with keyboard controller.
Above-mentioned keyboard controller, wherein, described self-contained storing devices be can be by input/output port or internal storage access mode by host access: the random access memory of the random access memory of keyboard controller, register or real-time clock.
The invention has the advantages that:
Interaction data is deposited in the register of RTC sram or KBC ram or KBC, need not trigger the interruption of KBC,, write the back and told KBC to have data to send by the 3rd group of port of KBC to the not influence of work of KBC itself, need not whenever send a byte data like this, just interrupt KBC once.Existing problem when the present invention need not to use expensive chip just can solve to need between present KBC and the main frame more data frequent exchange does not need to increase the cost of hardware.
Description of drawings
Fig. 1 is the hardware structure diagram of keyboard controller of the present invention;
Fig. 2 is the flow chart of steps of the inventive method.
Embodiment
The present invention proposes the method that a kind of main frame and KBC carry out exchanges data, with reference to figure 1, in present KBC chip, RTC sram (static memory of real-time clock controller) 101 or share memory (shared storage) 102,103 or a pair of port one 04,105 for host access KBC ram (random access memory) are arranged usually, can visit RTC sram or KBC ram by these main frames, when main frame is visited the RTC sram of KBC or KBC ram in this way, the very little or not influence to the work influence of KBC.When main frame need transmit data to KBC, earlier by the way data are write RTC ram or KBC ram, then toward 106 orders of appointing of the 3rd group of port (0x68/0x6c), after KBC receives this order, just go RTC ram or KBCram to read the data that main frame sends.When KBC need transmit data to main frame, elder generation writes RTC ram or KBC ram to the data that needs send main frame to, send data to main frame by the 3rd group of port then, the sign of the output buffer full of KBC can be put like this, just can go RTC ram or KBC ram to go reading of data after main frame is seen.
Fig. 2 is the flow chart of steps of the inventive method, and as figure, keyboard controller of the present invention and main frame carry out the method for exchanges data, mainly may further comprise the steps:
Step 201 is stored in the interaction data between keyboard controller and main frame in the self-contained storing devices of keyboard controller;
Step 202 comes notify keyboard controller or main frame to remove to read in the described self-contained storing devices described interaction data by the 3rd group of idle in keyboard controller port.
Self-contained storing devices wherein, be meant the random access memory of the keyboard controller that main frame just can be visited by IO port or internal storage access mode without the work of break key disk controller, register, the random access memory of equipment, for example the random access memory of the real-time clock of keyboard controller can directly be visited by main frame by the IO port, the work of break key disk controller at every turn, the random access memory of the keyboard controller that has in addition can be mapped to the space of main frame, can directly visit random access memory that the keyboard controller that has then can be by one group of I/O port access keyboard controller and register and the not work of break key disk controller by the internal storage access mode from the face main frame.
The concrete workflow of the inventive method is as follows:
1) main frame is written to KBC RAM or RTC sram. to the data that needs transmit
2) main frame is read the status register of the 3rd group of port, judges according to status register whether input buffer (impact damper) is empty.If input buffer is empty, then the command register toward the 3rd group of port writes an order of appointing, can trigger an interruption like this and give KBC, and KBC reads this order back from KBC RAM or RTC sram reading of data.
3) KBC is written to KBC RAM or RTC sram with the data that needs send main frame to.
4) KBC returns data by the 3rd group interface and gives main frame, the full sign of output buffer of the status register of KBC the 3rd group interface is put (showing that with this KBC has data to give main frame).
5) after main frame sees that the full sign of output buffer of the status register of the 3rd group interface is put, read the data of returning from the 3rd group interface, and from KBC RAM or RTC sram reading of data.
Invention is deposited interaction data in the register of RTC sram or KBC ram or KBC, need not trigger the interruption of KBC, not influence of work to KBC itself, having write the back tells KBC to have data to send by the 3rd group of port of KBC, need not whenever send a byte data like this, just interrupt KBC once.The inventive method need not be used expensive chip just can solve needs more data frequent exchange between at present popular KBC and the main frame problem, does not need to increase the cost of hardware.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (6)

1. keyboard controller and main frame carry out the method for exchanges data, it is characterized in that, comprising:
Step 1 is stored in the interaction data between keyboard controller and main frame that the work of break key disk controller just can be by in the self-contained storing devices of this keyboard controller of host access;
Step 2 comes notify keyboard controller or main frame to remove to read in the described self-contained storing devices described interaction data by the 3rd group of port in the keyboard controller; Described the 3rd group of port is chosen as power-management interface and other the idle interface of keyboard interface phase region that is had with keyboard controller.
2. method according to claim 1, it is characterized in that, described self-contained storing devices be can be by input/output port or the mode by internal storage access by host access: the random access memory of the random access memory of keyboard controller, register or real-time clock.
3. method according to claim 1 and 2 is characterized in that, sends to keyboard controller under the condition of described interaction data at main frame,
Described step 1 comprises: main frame is written to the interaction data that needs transmit in the described self-contained storing devices;
Described step 2 comprises: main frame is read the status register of described the 3rd group of port, if the input buffer of determining described the 3rd group of port according to described status register is for empty, then the command register toward the 3rd group of port writes an order of appointing and triggers an interruption to described keyboard controller, and described keyboard controller reads described order back and reads described interaction data from described self-contained storing devices.
4. method according to claim 1 and 2 is characterized in that, sends to main frame under the condition of described interaction data in keyboard controller,
Described step 1 comprises: the interaction data that keyboard controller will need to transmit is written in the described self-contained storing devices;
Described step 2 comprises: keyboard controller sends a visit data to main frame by described the 3rd group of port, thus the sign that makes the status register of the 3rd group of port put output buffer full; After main frame is found the sign of described output buffer full, read described visit data, and read described interaction data from described self-contained storing devices.
5. a keyboard controller is carried out exchanges data with main frame, it is characterized in that, comprising:
Self-contained storing devices, the work of break key disk controller just can be used for the interaction data between storage keyboard controller and main frame by host access;
The 3rd group of port is used for notify keyboard controller or main frame and goes described self-contained storing devices to read described interaction data; Described the 3rd group of port is power-management interface and other the idle interface of keyboard interface phase region that is had with keyboard controller.
6. keyboard controller according to claim 5, it is characterized in that, described self-contained storing devices be can be by input/output port or internal storage access mode by host access: the random access memory of the random access memory of keyboard controller, register or real-time clock.
CN2006101716211A 2006-12-31 2006-12-31 Keyboard controller and host data interchanging method and keyboard controller Active CN101211322B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006101716211A CN101211322B (en) 2006-12-31 2006-12-31 Keyboard controller and host data interchanging method and keyboard controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006101716211A CN101211322B (en) 2006-12-31 2006-12-31 Keyboard controller and host data interchanging method and keyboard controller

Publications (2)

Publication Number Publication Date
CN101211322A CN101211322A (en) 2008-07-02
CN101211322B true CN101211322B (en) 2010-12-22

Family

ID=39611358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006101716211A Active CN101211322B (en) 2006-12-31 2006-12-31 Keyboard controller and host data interchanging method and keyboard controller

Country Status (1)

Country Link
CN (1) CN101211322B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6389495B1 (en) * 1999-01-16 2002-05-14 Cypress Semiconductor Corp. Dedicated circuit and method for enumerating and operating a peripheral device on a universal serial bus
CN1591299A (en) * 2003-08-29 2005-03-09 株式会社东芝 Information processing apparatus, keyboard controller, and method of key input determination

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6389495B1 (en) * 1999-01-16 2002-05-14 Cypress Semiconductor Corp. Dedicated circuit and method for enumerating and operating a peripheral device on a universal serial bus
CN1591299A (en) * 2003-08-29 2005-03-09 株式会社东芝 Information processing apparatus, keyboard controller, and method of key input determination

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开平6-103210A 1994.04.15

Also Published As

Publication number Publication date
CN101211322A (en) 2008-07-02

Similar Documents

Publication Publication Date Title
CN1316378C (en) Method and apparatus for managing translation mechanism in processor frame
CN115168259B (en) A data access method, device, device and computer-readable storage medium
CN106371807B (en) A method and apparatus for extending processor instruction set
US20020178333A1 (en) Method and system for adding compressed page tables to an operating system
CN103019955B (en) The EMS memory management process of PCR-based AM main memory application
US11010056B2 (en) Data operating method, device, and system
CN103744611A (en) Computer system based on solid state disc as cache and cache accelerating method
US12141075B2 (en) Address translation prefetching for input/output devices
CN102521179A (en) Achieving device and achieving method of direct memory access (DMA) reading operation
CN110377221A (en) Dual-port solid storage device and its data processing method
US20240020246A1 (en) Method for Generating Information Based on FIFO Memory and Apparatus, Device and Medium
CN109901909A (en) Method for virtualizing system and virtualizing system
CN102521161B (en) Data caching method, device and server
CN101211322B (en) Keyboard controller and host data interchanging method and keyboard controller
CN103488597A (en) First-in first-out buffer and data reading-writing method thereof
CN101441551B (en) Computer, external memory and method for processing data information in external memory
CN100409150C (en) Method for raising communication speed of HID equipment
CN117435251B (en) A post-quantum cryptographic algorithm processor and its system on chip
US7831780B2 (en) Operating system supplemental disk caching system and method
CN100357920C (en) Parallel input/output data transmission controller
CN102609240B (en) The method of processor circuit and reading data
CN102541808A (en) Soc (System on chip) chip system and method for realizing configurable buffer in Soc chip
CN208240009U (en) Data storage device and system
CN101576865A (en) Method, device and central processing unit for ensuring reading transaction bandwidth of memory
US6804754B1 (en) Space management in compressed main memory

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