ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING PC interface expander. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Computers One of the most common ways of using a PC is the collection and processing of information about the state of sensors, the control of various mechanisms and technological systems. A typical problem that arises in this case is how to enter into the computer and output from it all the necessary signals, the number of which often reaches several hundred. It is often necessary to develop a special unit that receives sensor signals and converts them into signals from one of the standard interfaces that a computer is equipped with, for example, the RS-232C serial interface ("C2 Joint"). Usually, the same block also solves the inverse problem - it converts the signals of the standard interface into the form necessary to control the actuators. Unfortunately, this decision is not always justified. Firstly, the standard interface is often busy, for example, communicating with other computers, a printer, and similar devices. Secondly, the need to constantly receive and transmit a large number of signals through a relatively slow serial interface can greatly affect the speed of the system as a whole. Many computers, including the IBM PC, provide the ability to connect additional devices directly to the system bus. To do this, special sockets ("slots") are installed on the main board of the computer, into which additional boards can be inserted that perform the functions provided for by the initial configuration of the computer. The speed of the exchange of dm and them on the system bus is the maximum possible for a given computer and is mainly limited by the speed of its processor. Currently, a wide range of additional boards is being produced that perform a wide variety of functions, including expanding the capabilities of the computer's communication with external devices. If necessary, such boards can be made independently. A schematic diagram of a simple additional interface board is shown in fig. 1. It is built on the basis of the well-known parallel interface adapter KR580BB55A, which allows up to 24 logic signals to be input or output from the computer. On the chips DD2, DD3, a decoder is made, to which signals A4-A9 of the computer address bus are applied. When the computer executes read commands from ports with addresses from 00H to 30FH or writes to the same ports, a low logic level pulse is generated at pin 8 DD3, allowing the operation of the DD1 and DD4 microcircuits. The address bits A2 and A3 are not used, and the signals AO and A1 are fed directly to the address inputs DD4. Thus, port A of this microcircuit can be accessed at any of the addresses 00H, 304H, 308H 0CH; to port B - at addresses 301H, 305H, 309H, 0DH; to port C - at addresses 302H, 306H, 0AN, 0EN, and to the control word register - at addresses 303H, 307H, 30BH, 30FH. Read or write operations ARE PERFORMED according to the IOR or IOW signals generated by the computer processor. However, in a computer, these signals can be generated not only by the processor, but also by the direct memory access controller (DMA). To eliminate failures, the AEN signal was applied to the decoder, blocking it when the computer is operating in the DMA mode. A few words about the purpose of the bus shaper DD1. If the board is supposed to be used only for data output, then it is quite possible to do without this microcircuit: the computer's data bus buffer has sufficient load capacity to control the data bus of the DD4 microcircuit directly connected to it. However, for reverse transmission, the load capacity of this microcircuit is not enough, so a powerful bus driver is required. Sometimes it turns out that the duration of the write and read signals generated by the computer is too short for the reliable operation of relatively "slow" peripheral microcircuits (including the KR580BB55A). This situation is especially likely when accelerating the computer by increasing the processor clock frequency (the so-called turbo mode). To extend the write / read cycles to the required value, a special input for the signal of readiness of external devices RDY is provided in the system connector. If, after the start of a write or read pulse, a logic low level is set at this input, then the end of the pulse will be delayed until this level is removed. The RDY output is necessarily performed according to the "open collector" scheme, which, if necessary, allows you to combine these signals from different sources. The diagram of the RDY signal generation unit is shown in fig. 2. The pulse duration is set by selecting the capacitor C1. The need to use this node in the manufactured board is best checked experimentally. If you need to increase the number of pins for connecting external devices, you can install additional KR580VV55A chips on the interface board. Each of them will allow you to enter or output another 24 logic signals. The main difficulty that will be faced is how to fit a connector (or connectors) in the computer with enough pins to carry all these signals. Conclusions 5, 8, 9, 27-36, as well as power leads (7 and 26) of additional KR580VV55A microcircuits are connected in parallel with the corresponding outputs of the DD4 microcircuit. The address decoder (DD2.1-DD2.5, DD3) is replaced by a PROM chip 556RT7 or KR556RT18. The address inputs A2-A9 (pins 6-1, 23,22) of this microcircuit are connected to the corresponding circuits of the XP1 connector, the input A10 (pin 21) is connected to the AEN circuit, pins 7, 8, 20 are connected to a common wire, and pins 18, 19 - with a +5 V power supply through a 1 kΩ resistor. Pin 9 is connected to pins 19 DD1 and 13 DD2, and pin 10 is connected to pin 6 DD4 (its connection to DD1 and DD2 is broken). To conclusions 11, 13-17 connect the conclusions of six additional microcircuits KR580VV55A; thus, there can be up to seven of them in total (including DD4). To save space, instead of the decoder PROM chip programming table, we present a simple BASIC program that prints this table on a printer. 10 REM Auxiliary I/O port decoder 20 PA1=&H300: REM Port A address DD4 30 PA2=&H304: REM Port A address 1st add. BB55 40 PA3=&H308: REM Port Address A 2nd Option BB55 50 PA4=&H30C: REM Port Address A 3rd Option BB55 60 FOR A=0 TO 2047 70 X=&B11111111l 80 IF (A>=PA1) AND (A<=PA1+3) THEN X=&B11111100:GOTO 120 90 IF (A>=PA2) AND (A<=PA2 +3) THEN X=&B11111010 :GOTO 120 100 IF (A>=PA3) AND (A<=PA3+3) THEN X=&B11110110 :GOTO 120 110 IF (A>=PA4) AND (A<=PA4+3 ) THEN X=&B11101110 120 IF(A AND &HF)=0 THEN LPRINT: LPRINT HEX(A) 130 LPRINT" "; HEX(X); 140 NEXT 150 LPRINT The table is designed for a decoder for four KR580BB55A microcircuits, the port addresses of which are located in the 300H-30FH area. Having made obvious changes to the calculation program, it is not difficult to obtain a table for a different number of microcircuits and other addresses of their ports. However, when choosing addresses, you need to make sure that they are not already in use by the computer. In conclusion, we note that ROM chips of the K573 series cannot be used in the decoder due to insufficient performance. Let's move on to the features of computer programming. Any program designed to work with the described board must provide for the configuration of all KR580VV55A microcircuits installed on it. Without going into the known details of the operation of these microcircuits, we present a table of control words for the most commonly used mode 0. Table 1
One of these layers must be written to the control word register of each KR580BB55A chip before performing any other operations with it. For example, a command (in BASIC) OUT &H303, &H80 will configure the microcircuit to output on all 24 external circuits. The actual output can be done with similar commands: OUT &H300, &H55: REM Output of the constant 55H to port A OUT &H301,X: REM Output of the value of the variable X to port B OUT&H303,2*N+Z The last example illustrates the possibility of changing the state of individual bits of port C using special control words. Here N is the port C bit number (from 0 to 7) and Z is the value (0 or 1) to be set in that bit. Reading signals applied to external pins can be done with commands like the following: T=INP(&H302): REM Variable T is set to the value read from port C Naturally, the corresponding port must be configured for input. When programming in ASSEMBLE language, situations should be avoided when commands for accessing ports follow directly one after another. In such cases, it is necessary to insert "blank" commands between them. The printed circuit board for the described device is made of. double-sided foil fiberglass. Its approximate dimensions are 112x93 mm. Between the +5 V printed conductors and the common wire, as close as possible to the power terminals of each microcircuit, blocking capacitors not shown in the diagram with a capacity of at least 0.047 uF must be installed. The XP1 plug is a row of contact pads 10 mm long and about 2 mm wide on the edge of the board, which is inserted into the computer's system connector. Since the connectors on the IBM PC are in inches, the pads must be spaced in 2,54 mm (0,1 inch) increments. Contacts A1-A31 are located on the part installation side, and B1-B31 are on the soldering side. If possible, these areas should be coated with a special galvanic coating that provides reliable contact, in extreme cases, they should be tinned. Circuits for connecting external devices also lead to a plug-in connector, placing it on the edge of the board facing the back of the computer. The type of connector does not matter, the main thing is that it has a sufficient number of contacts and can be placed in the space allotted to it in terms of its size. In this connector, it is recommended to alternate signal contacts with contacts connected to a common wire (0 V circuit). Instead of microcircuits of the K555 series, their analogues from the K155, K531, K1533 series can be used. The bus shaper K555AP6 can be replaced by KR580VA86 or two K589AP16. Author: N. Vasiliev, Moscow; Publication: N. Bolshakov, rf.atnn.ru See other articles Section Computers. Read and write useful comments on this article. Latest news of science and technology, new electronics: Artificial leather for touch emulation
15.04.2024 Petgugu Global cat litter
15.04.2024 The attractiveness of caring men
14.04.2024
Other interesting news: ▪ Wireless charging of an electric car - fast and safe ▪ Smart window with low dimming time ▪ Molecular machines will provide a breakthrough in medicine ▪ Children learn to lie in order to live up to adults' expectations. News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the site Factory technology at home. Article selection ▪ article by Quintus Ennius. Famous aphorisms ▪ article Geyser at home. Children's Science Lab
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |