TVs. Consoles. Projectors and accessories. Technologies. Digital TV

Keyboards and mice for a desktop computer

Data transfer begins with checking the printer's readiness - the Busy line status. The data strobe can be short - a fraction of a microsecond, and the port ends its formation, not paying attention to the signal Busy. During the strobe, the data must be valid. Confirmation of receipt of a byte (character) is a signal Ack#, which is generated after receiving the strobe after an indefinite time (during this time the printer can perform some long surgery, for example, paper feed). Pulse Ack# is a printer request to receive the next byte; it is used to generate an interrupt signal from the printer port. If interrupts are not used, then the signal Ack# is ignored and the entire exchange is controlled by a pair of signals Strobe# And Busy. The printer can report its status to the port via lines Select, Error#, PaperEnd- using them you can determine whether the printer is turned on, whether it is working properly and whether there is paper. Formation of a pulse on the line Init# The printer can be initialized (in this case it will clear its entire data buffer). Mode automatic translation lines are usually not used, and the signal AutoLF# has a high level. Signal SelectIn# allows you to logically disconnect the printer from the interface.
Through the parallel port (LPT), the Centronics protocol can be implemented purely in software using standard port mode ( SPP), reaching transfer speeds of up to 150 KB/s when the processor is fully loaded. Thanks to the “advanced” port modes, the protocol can also be implemented in hardware ( Fast Centronics), while speeds of up to 2 MB/s are achieved with less processor load.
Majority modern printers with a parallel interface also support the IEEE 1284 standard, in which optimal mode transmission is ESR (see clause 1.3.4).
A Centronics cable suitable for all parallel modes is required to connect the printer. The simplest cable option - 18-wire with untwisted wires - can be used to operate in SPP mode. For a length of more than 2 m, it is desirable that at least the lines Strobe# And Busy were intertwined with separate common wires. For high-speed modes (Fast Centronics, ECP), such a cable may be unsuitable - irregular transmission errors are possible, occurring only with certain sequences of transmitted codes. There are Centronics cables that do not have a connection between pin 17 of the PC connector and pin 36 of the printer connector. If you try to connect a printer using the 1284 standard using this cable, a message will appear indicating that you need to use a “bidirectional cable.” The printer cannot tell the system that it supports advanced features, which is what the printer driver expects. Another manifestation of a missing connection is that the printer freezes after printing a job from Windows. This connection can be made by soldering an additional wire or simply replacing the cable.
Ribbon cables, in which signal circuits (control signals) alternate with common wires, have good electrical properties. But their use as an external interface is impractical (there is no second protective layer of insulation, high vulnerability) and unaesthetic (round cables look better).
The ideal option is cables in which all signal lines are intertwined with common wires and enclosed in a common shield - what is required by IEEE 1248. Such cables are guaranteed to operate at speeds of up to 2 MB/s with a length of up to 10 m.
In table 8.4 shows the wiring printer connection cable with connector X1type A (DB25-P) on the PC side and X2 type B ( Centronics-36) or type C (miniature from the printer side. Using common wires ( GND) depends on the quality of the cable (see above). In the simplest case (18-wire cable), all GND signals are combined into one wire. High-quality cables require a separate return wire for each signal line, however, there are not enough contacts in the type A and B connectors for this (Table 8.4 shows the contact numbers of the type A PC connector contacts in parentheses, which correspond to the return wires). In the type C connector there is a return wire ( GND) is available for each signal circuit; signal pins 1-17 of this connector correspond to pins GND 19-35.

An interface was developed for IBM PC AT keyboards, which used a five-pin DIN connector for connection to the system unit (Fig. 8, a), popular in household equipment. The length of the interface cable should be from 1 to 2 m. To improve consumer properties, the cable is twisted in the form of a spring.

Since the dimensions installed on system board the standard keyboard connector of the IBM PC AT is too large, then when the IBM corporation developed a line of computers such as the IBM PS/2, it was created new standard for the keyboard interface. A 6-pin Mini DIN connector was used for it (Fig. 8, b). True, IBM PS/2 computers turned out to be not very popular, but the standard for connecting a keyboard began to be used by other manufacturers.

Fortunately for users, electrical characteristics Both keyboard interface standards are the same (Table 7.1), therefore a keyboard with a DIN connector can be connected to a Mini DIN connector using an adapter, and vice versa. Note that you can connect and disconnect a keyboard from an ATX form factor motherboard using the PS/2 standard only when the computer's power is turned off.

Table - 1 Correspondence of keyboard interface connector pins

IN lately there has been a tendency to abandon even small-sized PS/2 connectors, in connection with this latest keyboards got a USB interface. IN wireless keyboards Infrared port can be used.

Mouse manipulator

A “mouse”-type manipulator (usually spoken and written more briefly everywhere as a mouse), the simplest and most popular means of entering information into a computer.
Posted on ref.rf
Moreover, work without a mouse in the operating room Windows environment With a graphical interface, it is almost impossible to understand what users feel when their tailed friend breaks down (the ball is dirty or the wire is broken).

The mouse manipulator after the keyboard is the most multifunctional device input. Using a mouse, the user controls the movement of the cursor on the screen in any direction, since when the mouse moves along the surface of the table, the cursor obediently moves in the same direction and at the same speed. Click on left button mouse in graphic editor, if, for example, the Pencil mode is set, it leaves a visible trace when moving the cursor. In the Windows operating system, by moving the mouse cursor to the image of a button, you can click the left mouse button to simulate a key press . According to statistics, today's users use a mouse more than 80% of the time they work at a computer. There are even proposals to abandon the use of the keyboard altogether, replacing character input from the keyboard with voice control.

Today, many users believe that the mouse was designed specifically for personal computers quite recently. But if you look at its first copies - angular, heavy, nondescript boxes that are not so easy to hold in your hand, then you immediately believe that it was invented in the early 60s of the last century. The author of the mouse, Douglas Engelbart, worked at Stanford Research Institute on a project on the development of human intelligence (at that time - ordinary science fiction), which was funded by NASA. The main goal of developing a new manipulator is to get a more convenient input tool graphic information into a computer than a light pen and joystick.

The design of the mouse manipulator was patented by the Stanford Institute, like many other devices, only to stake out this idea, because at that time it was difficult to imagine a bright future for the new device. As the author says, he only learned a few years later that the license was sold to Apple for $40,000.

In almost forty years, the design of the mouse has not undergone many changes. Only when the development of microelectronics made it possible to place all the electronic components of a mouse in one small chip did elegant and convenient cases appear. In Fig. 7.9 shows photographs of several representatives of the family of tailed assistants: from the simplest - with two buttons and a not too fancy body, to ergonomic models that fit comfortably in the hand, equipped with additional wheels and buttons.

Figure 9 - Mouse manipulators:

Two-button Genius Easy Pro with USB interface;

Three-button Logitech Pilot First;

Microsoft Inteljimouse PS/2 mouse

The most common and cheap mouse has two buttons (Fig. 7.14, a) - the left one, the most frequently used, and the right one, intended for calling auxiliary functions. A mouse with three buttons is almost also popular (Fig. 7.14, b), but the middle one is practically not used in the Windows environment. Recently, a model with a wheel has become popular (Fig. 7.14, c); it is used for vertical scrolling of a window; the scroll wheel can additionally serve as a button. In addition to the mice shown in Fig. 7.9, there are designs with one or four buttons (sometimes additional buttons placed on the side of the mouse), mice are also available with a second wheel for horizontal scrolling.


keyboards and mice
To desktop computer

Keyboards and mice, as well as all other paraphernalia
for a desktop computer - also different.

Modern keyboards and mice, for the most part,
have a USB connection.

In addition to widespread distribution, the advantage
USB interface is connectivity
to a running computer.

But in the description, I'll tell you a little
and other connections.

Connecting a keyboard with a USB connection to the system unit

Keyboard connection,
with USB connection,
to the system unit

Below is a diagram of the connection of the main blocks,
to the system unit of a desktop computer.

Click on the picture to enlarge.

As you can see in the diagram, there are two options
keyboard and mouse connections.

Interfaces for USB connection.
Interfaces for connecting PS/2.

In this section we will look at
keyboards with USB connection.

On a desktop computer, USB connectors may be located
both on the front panel of the system unit and on the rear. Occupy
both horizontal and vertical positions.

There is no need to show all existing keyboard options.
I will present to you only two of them

On the left is a keyboard with a detachable cable. Before you connect
it to the system unit - you need to connect the cable to the keyboard itself.
And then connect to the back panel system unit.

On the right is a keyboard with a built-in cable. You can immediately
connect to the USB port on the rear panel of the system unit.

And that's it... After turning on the computer and installing the Operating System
Windows system special drivers - you can work with the keyboard.

Connecting a mouse with a USB connection to the system unit

Connecting a mouse
with USB connection,
to the system unit

Mice with USB connection.
Wired and wireless.


Connecting a mouse to the system unit is very simple.
Insert the USB connector of the mouse into the USB port of the system unit.

And, when you connect for the first time, wait until Windows
will connect the mouse and report that it is ready for use.

Connections PS/2, Bluetooth and more, for keyboard and mouse

PS/2, Bluetooth connections
and others, for keyboard and mouse

If your keyboard has a PS/2 interface,
then you connect the keyboard to the PS/2 port.

The PS/2 interface is used on motherboards with ATX power supply.
It is a thin round connector – 6-pin miniDIN.
After connecting new equipment to the PS/2 port, you need

On the diagram of the rear panel of the system unit,
for keyboard and mouse, painted.

The PS/2 keyboard port is lilac.
And for the mouse - green.

It is possible to adapt the PS/2 keyboard and mouse interface,
to connect to USB port. Adapters are used for this purpose.

Keyboard interface

Keyboards can be wired or wireless (wireless, cordless, etc.). The latter, as the name suggests, do not require a cable connection (more precisely, I can; it can work both ways). They are rarely used because they are very expensive. They require batteries to operate, and are larger due to the placement of the receiver unit within it.

When talking about the interface, we mean wired keyboards. The following interfaces are used:

1. AT, also known as DIN. Used for. 1 mainboard with

AT power supply. It is a thick round connector -

5-pin DIN. Most often they write on such keyboards

AT, less often DIN, and sometimes they don’t plow anything at all (which means

expects AT, since PS/2 is always written).

2.PS/2. Used for powered system boards

ATX. It is a thin round connector - 6-pin

stroke miniDIN. The same one is used for PS/2 mouse, and,

so as not to confuse them, in the RS"99 specification for these units

kers are available in different colors: violet

Toy is for the keyboard and green is for the mouse.

3. USB. Can be used with all more or less but

new motherboards, since the latter have USB ports

you and BIOS support. Connector - flat, rectangular

Currently AT and PS/2 interfaces are presented equally, i.e. the same model is available with both interfaces. Since the AT and PS/2 ports are fully compatible, there are adapters in both directions that allow you to connect a keyboard to a port of a different type. You should choose not a solid short adapter, but one with a flexible cable.

The USB interface is more modern and provides more capabilities, especially since, according to the PC"2001 specification, ports operating via the ISA bus should not be supported: COM, LPT, PS / 2. All of them will be replaced by USB. In addition, the USB port has more throughput than the specified ports of older types, and allows you to connect other devices with a cable, for example, connect a mouse to the keyboard.

The book is dedicated to hardware interfaces used in modern personal computers and the devices around them. It discusses in detail universal external interfaces, specialized interfaces peripheral devices, interfaces for data storage devices, electronic memory, expansion buses, audio and video interfaces, wireless interfaces, communication interfaces, auxiliary serial interfaces. Information on interfaces includes the composition, description of signals and their location on connectors, timing diagrams, register models of interface adapters, methods of use in independently developed devices. The book is addressed to a wide circle specialists related to the operation of PCs, as well as developers of computerized hardware and their software support.

Book:

To connect the keyboard, a serial synchronous bidirectional interface is provided, consisting of two mandatory signals KB-Data and KB-Clock. Both lines on the system board are pulled up by resistors to the +5 V bus. On both sides of the interface, low-level output signals are generated by the outputs of open-collector (drain) elements, and the state of the lines can be read through the input lines of the controllers. The type of connectors (from the rear panel) and the assignment of contacts are shown in Fig. 8.1. Structurally, two connector options are possible - a regular 5-pin DIN socket (AT keyboard) or a small-sized mini-DIN socket (PS/2). The keyboard supply voltage of +5 V is supplied to the same connector through a fuse.


Rice. 8.1. Connectors (view from the contact side) for connecting keyboards: A- AT and b- PS/2

ATTENTION

Power from the keyboard connector is often used by devices such as external drives or adapters local networks connected to the parallel port. The fuse installed on the system board may not be able to withstand the surge current drawn by these devices. In this case, the keyboard will also refuse to work - its indicators will not even blink when turned on.

The processor communicates with the keyboard via keyboard interface controller- microcontroller 8042 or software compatible with it, installed on the system board. For information exchange, port 60h is mainly used, from which scan codes are received. The controller signals the processor about the need to read the scan code through the hardware interrupt IRQ1, the signal of which is generated for each keyboard event (pressing and releasing a key). Setting auto-repeat parameters, selecting scan code tables, managing LED indicators, as well as controlling the scanning mode of the key matrix and launching a diagnostic test is carried out by commands sent to the same port. The controller translates commands into messages sent to the keyboard.

The operation of the bidirectional interface is illustrated in Fig. 8.2, A, where signals generated by the controller are marked in gray, and signals generated by the keyboard are marked in black. IN original condition both lines are “released” by the output drivers to the state with high level. The keyboard can start transmitting data at any time when the interface is at rest. The keyboard generates the start bit ( low level) on the KB-Data line and the first pulse KB-Clock, which is a signal to the controller to start receiving. After KB-Clock rises, it outputs the 0th data bit on the KB-Data line, and then the next KB-Clock pulse. The controller must “latch” the received data bit on the fall of the KB-Clock. This transmits all 8 data bits and the parity bit, which complements the number of one bits to an odd number. After the parity bit clock keyboard controller must generate a KB-Clock pulse confirming the receipt of the byte (Ack). If the entire byte with the parity bit is not received by the controller within 2 ms, the controller stops receiving that byte and records a timeout error.


Rice. 8.2. Keyboard interface timing diagrams: A- receiving a message from the keyboard, b- sending a command to the keyboard

The reverse transmission - the output of the controller command to the keyboard - is somewhat more complicated (Fig. 8.2, b). From rest controller sets the KB-Clock low level to 250 µs and generates a start bit (low level) - this is a signal to the keyboard to receive a command. on him keyboard must respond with a series of 11 KB-Clock pulses. As the next clock pulse falls, the controller sets the next bit of data, and the keyboard “latches” it along the edge of the clock pulse it generates. After the parity bit (9th pulse) and the one stop bit (10th) on the 11th pulse keyboard generates a zero acknowledgment bit (Ack). After that controller generates a KB-Clock pulse (60 μs), which is a request to receive a keyboard response. The controller waits no longer than 20 ms for the response to this request to complete, and if the response does not arrive within this time, it will generate a timeout error. An error will also occur if the keyboard does not enter the first clock pulse within 15 ms from the start of the request or the controller does not receive data, including the stop bit, within 2 ms from the moment the bit 0 clock pulse appears.

There was no 8042 controller on the PC/XT motherboard, and the keyboard interface (unidirectional) was implemented by hardware logic - a shift register, the parallel output of which is connected to the inputs of port A of the 18255 system interface. Upon receiving a byte from the keyboard, a hardware interrupt IRQ1 is generated, the handler of which can read the received byte from port 60h. Using bits 7 and 6 of port 61h, software locking and resetting the keyboard are possible, respectively. The XT keyboard is reset by resetting the KB-Clock line.



Related publications