Abstract:
Each section includes a data processing unit (1) provided with circuitry (7) for transmitting processed data to the other station, as well as circuitry (7) and (2) for reception of the data processed by the other station. The transmission occurs between the stations via only one connection 1 3 , plus a return connection such as 1 1 .

Description:
This is a continuation of application No. 262,607, filed May 11, 1981 now abandoned. 
    
    
     CROSS-REFERENCE TO RELATED APPLICATION 
     Devices in accordance with this invention are disclosed in embodiments of a portable machine comprising the subject matter of a commonly-assigned U.S. patent application, Ser. No. 262,606, filed May 11, 1981 now abandoned, by Ugon, et al and entitled &#34;PORTABLE MACHINE FOR CALCULATION OR DATA PROCESSING.&#34; 
     BACKGROUND OF THE INVENTION 
     The present invention relates to a device for the transmission of signals between two data processing stations. 
     More particularly, the invention relates to a device for the exchange of data between two microprocessors, at least one of which may be contained within a portable carrier. The connection between the two microprocessors is provided by means of electric contacts when the portable carrier is placed in contact or is coupled with data lines communicating with the device within which the other microprocessor is situated. 
     Such carriers and associated components are known, as for example are described in commonly-assigned UGON U.S. Pat. No. 4,211,919, issued July 8, 1980, and entitled &#34;PORTABLE DATA CARRIER INCLUDING A MICROPROCESSOR&#34;; and in commonly-assigned U.S. patent application Ser. No. 223,849, filed Jan. 9, 1981, now abandoned, by Michel UGON, and entitled &#34;ONE CHIP MICROPROCESSOR&#34;, which is a continuation of Application Ser. No. 030,548, filed Apr. 25, 1978, and now abandoned. The entire disclosures of U.S. Pat. No. 4,211,919 and Application Ser. No. 223,849 are hereby expressly incorporated by reference herein. As described, these carriers may assume the form of a small card of plastics material comprising a self-programmable microprocessor and means for connection to the machine in the form of simple electric contacts. 
     As a rule, a substantial number of conductors is needed to provide the connections between two microprocessors. Some connections incorporate up to sixteen conductors divided into so-called data and address lines, to which are added additional lines reserved for the transmission of control signals and synchronizing signals, as well as power supply conductors. These connections are unsuitable for devices wherein the connections between the microprocessors are not permanent for the reason that the relatively large number of contacts diminishes the reliability of the systems utilizing devices of this kind. 
     SUMMARY OF THE INVENTION 
     Accordingly, an object of the invention is to reduce the risks of faulty operation or of anomalies attributable to bad contacts or to failures of coupling means, by reducing their number to the minimum. 
     The invention provides a device for the transmission of signals between two data processing stations. Each of the stations includes a data processing means provided with means for transmitting the data processed to the other station, as well as means for receiving data processed by the other station. Each of the stations is arranged to be connected temporarily to the other station via coupling means. In accordance with the invention, data are transmitted between the two stations in both directions along a single electrical (or other, possibly non-electrical) connection. The data are transmitted by the variations of one and only one signal when both stations are coupled by the coupling means. In order to advise the transmitting station that the receiving station is ready to receive data, the single connection for data transmission is connected to a means for detecting a predetermined state of the connection. The device moreover includes a means situated at the transmitter location for transmitting a signal indicating the parity of the message transmitted. This signal is interpreted by the receiving station both as a parity bit and as an end of message signal. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention will now be further described, by way of example, with reference to the accompanying drawings, in which: 
     FIG. 1 illustrates the physical connections of the transmitter and receiver in accordance with the invention; 
     FIG. 2 illustrates a transmitter or receiver element utilized in an exemplary embodiment of the present invention; 
     FIG. 3 is a timing diagram corresponding to the transmission of a message comprising one octet, i.e., 8-bit word, in accordance with the invention; 
     FIG. 4 shows a bidirectional transceiver circuit employed as a port for transmission and reception of messages in accordance with the invention; 
     FIG. 5 is an illustration of the control circuits of FIG. 2; 
     FIG. 6 is an illustration of the working registers of an 8080 microprocessor CPU, such as for example sold by the INTEL Corporation, which may be employed in embodiments of the transmitters and receivers of the invention; 
     FIG. 7 is an exemplary flowchart depicting a suitable microprogram for data transmission on the transmission line; 
     FIG. 8 is an exemplary flowchart depicting a suitable microprogram for the logic state of the transmission line between two transmissions; and 
     FIGS. 9 and 10 are exemplary flowcharts depicting to the data read microprograms transmitted by the transmitter and received by the receiver. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 illustrates the connections utilized to connect the transmitter and receiver in accordance with the present invention. The stations P 1  and P 2  may each optionally perform the task of the transmitter or that of the receiver. One of these may supply current and voltage required to power the other. This power is supplied on the lines l 1   and l 2 . The line l 1  connects the earthing points M 1  and M 2  of the stations P 1  and P 2 , and at least one of the earthing prints is connected to one of the two output terminals of power supply S present in station P 2  in the FIG. 1 embodiment. The line l 2  is connected to the other output terminal of the power supply S and thus supplies the other station, P 1  in FIG. 1, to the other terminal of the power supply S. 
     The line l 3  transmits the data or items of information between the two stations P 1  and P 2 . These data are transmitted in a binary pattern, in the form of a series of logic &#34;0&#34; or &#34;1&#34; states, and are represented by variations of the current flowing in the line l 3  or by variations of the electrical potential of the conductor l 3  or by variations of the electrical potential of the conductor l 3  with respect to the conductors l 2  or l 1 . It will be appreciated the invention is not limited as to the kinds of electrical transmission, as other methods of transmission can be envisaged. In the case of optical transmission, use may be made of a connection by means of optical fibers. In the case of radio transmission, a waveguide, aerials or capacitive linkages can be employed. 
     FIG. 2 illustrates the transmission and reception device utilized in each of the two stations P 1  and P 2 . In the case of FIG. 2, it is assumed that the station illustrated is the station P 1 . This station comprises at least one microprocessor 1, associated with elements for controlling the input and output of the data entering or leaving the station. These elements include a storage device 2 in the form of a Random Access Memory (RAM), a lock or latch register 3, a time counter 4, a state register 5, a control circuit 6, a Programmable Read Only Memory (PROM) 7&#39;, and a bidirectional transceiver or port circuit 7 connected to the data line l 3  for transmission and reception of data. The control circuit 6 is described in detail hereinbelow with reference to FIG. 5, and the port circuit 7 is described in detail hereinbelow with reference to FIG. 4. The microprocessor 1 may be a microprocessor Type No. 8080 or 8085 sold by the INTEL Corporation, and others. This microprocessor 1 may be connected to elements other than those illustrated in FIG. 4, via its address lines A 8-15  and data lines AD 0-7 . 
     The eight data lines AD 0-7  are connected to the input terminal of the latch register 3 for addressing the random access memory RAM 2. 
     This memory RAM 2 for example has a capacity of 2K bits organized into 256×8 bits. It contains a register R7 to record the octet transferred via the port 7, and a register R8 for recording the parity bit corresponding to the octet transferred. 
     By the state of its outputs, the latch register 3 also selects the control circuit 6. 
     The control circuit 6 selects the port circuit 7 for transmission and reception of data when the binary pattern stored in the latch register 3 is XXXXX001. It selects the state register 5 when the binary pattern in the register 3 is XXXXX000. Finally, it selects the time counter 4 when the binary pattern in the register 3 is XXXXX100. 
     The time counter 4 has its inputs connected in parallel to the data lines AD 0-7  in such manner that it may be loaded at any instant with an initial time value by the microprocessor 1. 
     The state register 5 is also connected to the lines AD 0-7  in order to enable the same to store an instruction issued by the microprocessor 1. This is a register comprising eight flip-flops whose states enable the selection of either the input/output port circuit 7 or the time counter 4. 
     The line ALE connects the microprocessor 1 to the latch register 3 and carries the blocking signal to latch register 3 so as to give or refuse authorization to address the memory RAM 2 and the control element 6. 
     A line I0/M selects either the memory RAM 2 or the inpu-output circuit 7. The lines RD and WR control the read-write operations and are connected to the appropriate control circuits of the memory RAM 2 and of the port circuit 7. 
     The microprocessor 1 is synchronized by a clock Q comprising a quartz crystal. It transmits clock signals on the line CLK to the input IN of the time counter 4. The RESET OUT line is connected to the input of the port circuit 7 and enables initialization of the system into the input-output mode. 
     The microprocessor 1 is also connected via its data and address lines to the read-only memory 7&#39; in which are entered the microprograms needed for transmission and reception of data by the removable carrier M3 or the machine. 
     The processing element of the machine and processing element of the removable carrier M3 each comprise a set of devices such as are described above with reference to FIG. 4. 
     FIG. 3 illustrates the chronological sequence of a message transmitted on the data line l 3  in bit serial form. The transmission of a message comprising an octet (eight bits) occurs over ten intervals. The first interval is utilized to transmit the message START signal (START bit). The second through ninth intervals are utilized for transmission of the message as such (Cb7 through Cb0). The parity bit (PAR) is transmitted during the tenth interval. 
     The receiver receives the signals transmitted during these ten intervals and performs a parity check during an eleventh. The receiver signals the transmitter that it is ready to receive a message by placing the data line l 3  at a potential V 0  (signal PR). This signal PR occurs at least one interval prior to the transmission of the START bit. After reception and verification, if the parity check carried out on the message discloses that there was an error, the receiver places the line l 3  at a potential V 1 . If there is no parity error, indicating correct transmission and reception, the line l 3  is returned to the initial potential V 0 . 
     The eight bits comprising an octet are transferred in sequence on the conductor l 3  and are stored successively in the register R7 of the memory RAM 2. 
     This transfer is performed by successive reading of the port 7, successive transfer into the accumulator register of the receiving microprocessor, and transfer following alignment of the accumulator register into the register R7 of the memory RAM 2. Upon transfer of each new bit, a parity bit is calculated whilst making allowance for the parity of the bits already received. The result of the parity calculation is transferred into the register R8 of the memory RAM 2. The end of message bit which also acts as a parity bit for the message transmitted is compared with the parity bit calculated and stored in the register R8. The transmission is accepted as correct if the two bits are of equal value. If they are not, this anomaly is reported to the transmitter by transmission of the signal ER from the receiver. 
     FIG. 4 shows in detail the bidirectional transceiver or port circuit 7 of FIG. 2. This transceiver circuit 7 comprises tri-state output amplifiers 8 and 9 controlled by respective control gates 10 and 11. The output of the amplifier 8 is connected to the input of the amplifier 9. These two amplifiers 8 and 9 are connected to the line l 3  in such manner that the amplifier 8 may be utilized to transmit data (I/O) on the line l 3  and the amplifier 9 to receive the data (I/O) from on the line l 3 . 
     The gate 11 controls the amplifier 8 when it is selected both by the pattern XXXXX001 received from the control circuit 6, by the line IO/M, and by a write instruction WR transmitted by the microprocessor 1. Similarly, the gate 10 controls the amplifier 9 when it is selected by the pattern XXXXX001, by the line IO/M, and by a read instruction transmitted by the microprocessor 1. The amplifiers 8 and 9 are initialized by means of the RESET signal. 
     The FIG. 2 control circuit 6 is illustrated in detail in FIG. 5. This circuit is for decoding data contained in the FIG. 2 latch register 3. AND gate 12 and inverters 15 and 16 decode the address signal XXXXX001 to select the transceiver circuit 7. AND gate 13 and inverters 17, 18 and 19 decode the address signal XXXXX000 to select the state register 5. AND gate 14 and inverters 20 and 21 decode the address signal XXXXX10 to select the time counter 4. 
     FIG. 6 provides an illustration of the working registers contained in a microprocessor CPU of the 8080 or 8085 type. 
     Register A is the accumulator. Registers B, C, D, E are working registers and are adapted to receive data. Registers H and L are address registers. Register SP (Stack Pointer) contains the address of a cell register and is utilized during interrupt to point to the address of a memory location to save the contents of particular registers of the microprocessor or to resume interrupted processing operations. Register PC is the Program Counter and allows the passing to the next instruction during execution of a program. The register I is an Index register which enables data addressing by indexing. 
     The details relating to the functionality of these registers are given in the book entitled &#34;Les microprocesseurs&#34; by Pierre Le Beaux and Rodnay Zaak, published by the publishing company Sybex--313 rue Lecourbe 75015 PARIS--C 1977. 
     The flowchart of FIG. 7 illustrates the different steps necessary to execute the microprogram for a transmitting microprocessor, beginning at Step 100. 
     During Step 101, the transmitting microprocessor sets the connecting line l 3  to the logic state &#34;0&#34; and loads the time counter 4 with the bit time (1 ms) required for bit serial transmission of the START bit and the following octet in the manner illustrated in FIG. 5, and initializes N=8 for the eight bits of the octet. 
     The end of the START bit occurs when the time counter 4 interrupts the microprocessor 1. At step 102, the octet which is to be transferred, contained in the register R7 of the memory RAM 2, is loaded into the accumulator register A of the microprocessor 1 to test the value of the first bit. 
     Depending on this value, either Step 103 or Step 104 is entered to transmit the corresponding value of the first bit read in the register R7 on the conductor l 3 . 
     During Step 105, the parity bit corresponding to the message which is to be transmitted is calculated and transmitted into a bit position of the register R8 of the memory RAM 2. 
     In Step 106, N is decremented. If N is not yet zero, the program loops back, through Step 108. 
     During Step 108, the content of the register R7 is shifted to the left by one binary position. 
     This process repeats at each interrupt caused by the time counter 4, and is completed when all the bits of the octet have been delivered successively. 
     Step 107 checks that all bits have been transferred. 
     During Step 109, the parity bit stored in the register R8 is transferred in its turn. The receiver may then calculate the parity of the bits of the octet received, and compare the calculated parity bit with the received parity bit. 
     The transmission cycle is completed in case of coincidence (Step 112). In the absence of coincidence, the receiver signals the presence of an error to the transmitter (signal ER, FIG. 5) and another transmission cycle is performed starting at Step 101. 
     FIG. 8 is a program flowchart beginning at Step 113 showing the operations performed by the receiver when it is on standby (ready), waiting for a message coming from the transmitter. These tests are performed by repeated read operations of the logic state of the transmission line l 3 . 
     During Step 114, the port 7 is read repeatedly in a loop while the logic state of line l 3  is at &#34;0&#34;. 
     When the state of the line changes to logic &#34;1&#34; (Step 115), the time counter 4 is loaded to a predetermined time value (Step 116), in such manner as to cause a microprocessor interrupt and to cause the logic state of the port 7 to be read when this time value is exhausted. 
     This test occurs during Step 122. If, during this step, the logic state of the port 7 is &#34;1&#34;, the receiver is placed in readiness for the START signal. If, on the contrary, the logic state of the port 7 is &#34;0&#34;, it is inferred that the test performed during Step 115 had taken place on noise or other interference, and the receiver is then returned to Step 114. 
     FIG. 9 is a program flowchart showing the sequence for reception of the START signal or bit, beginning with step 124. 
     During Step 125, the receiver reads the logic state of the port 7. 
     At Step 127, the time counter 4 is loaded to a predetermined time value N 2  as soon as the conductor l 3  assumes the logic state &#34;0&#34;, as tested in Step 126. 
     This time value is decremented during Step 129 at the rate of the internal clock of the microprocessor until it reaches zero (Step 130). 
     The time counter 4 reaching zero causes an interrupt of the microprocessor, which then performs a read operation on the port 7 (Step 132). 
     If the conductor l 3  still has the logic state &#34;0&#34;, there is confirmation that the signal in question is an actual START signal, and not a noise or interference signal. The octet reading operation of FIG. 12 (beginning at Step 134) may then be performed. 
     FIG. 10 is a flowchart showing the octet read sequence, beginning with Step 134. 
     In Step 135, the time counter 4 is loaded to a time value corresponding to the period needed to read the eight bits transmitted. For example if the period of each bit is 1 ms, the value of the transmission time loaded into the time counter 4 is 8 ms. 
     Each transfer of a bit causes an interruption of the receiving microprocessor (Step 136) to authorize the latter, in Step 137, to store the bit read on port 7 in the register R7, to perform a parity calculation on the bits already received with regard with that just received, and to load the parity calculation result into the register R8. 
     When an octet has been transferred into the register R7, the time counter 4 reaches the zero state simultaneously with reception of the parity bit transmitted by the transmitter. 
     In Step 140, a comparison is then made between the bit transferred by the transmitter and the bit previously calculated and stored in the register R8 of the receiver. If there is correspondence between the two parity bits, the transmission has occurred without error and is considered as being completed (Step 141). If, on the contrary, the two parity bits are different, there is a transmission error, and this error is reported to the transmitter at Step 142 by writing a logic state &#34;0&#34; on the port connected to the line l 3 . The sequence for testing the state of the port 7 is then resumed (Step 113). 
     The system for scrutinizing the logic state of the line l 3  and for supplying signals makes it possible to synchronize the dispatch of the messages upon transmission with the operation of the receiving station. A dual level of asynchronism is thus accomplished which is independent of the functions processed at the level of each station since, apart from the interrupt periods, the stations lend themselves to performing other tasks wholly independent of each other, and independent of the programs of the receiver, since the interrupt may be initiated at any instant. 
     The program sequences which have been described with reference to the flowcharts of FIGS. 7, 8, 9 and 10 may be performed by means of the following specific exemplary instructions stored in the FIG. 2 PROM memory. The instruction set is that of the INTEL 8080 CPU. 
     
         ______________________________________Instructions     Remarks______________________________________TRANSMISSION100  OUT PA          Port A ← 0101  LHLD102  MOVA,M          (initialization of the time                counter)103  MOV CT, A       CT ← A104  LHLD105  MOV B,M         B ← 0INT             (time counter interruption)106  LDA             A ← 8107  SBB B108  JZ NEXT (113)109  LDA             A ← R710A  OUT Port A10B  MOV C,A         C ← A10C  ANA             mask 1 000 00010D  XRA,M           parity calculation A                A.sub.0 ← R8 + A.sub.010E  LHLD10F  MOV M,A         parity in R8110  MOV A,C         A ← R7111  RLC             shift R7112  MOV M,A         R7 ← A113  LDA             A ← R8114  OUT Port A115  NOP116  IN Port A117  CPI             if 1 = error118  JNC NEXT (100)119  RET             EndTEST PORT11A  IN Port A       A.sub.0 ← state of Port 711B  CMP M           Compare A.sub.0 to 1 and make                S = 1 in PSW if ≠11C  RM NEXT = (11A) If S = 1 return to 11A11D  LHLD            load H,L with memory contents                present at address gg and                PP. A ← N11E  MOV CT,A        CT ← N11F  RETSTART121  IN Port A122  CMP M           Make S ← 1 in PSW if ≠123  RM NEXT (121)   Return to 121 if S = 1124  LHLD125  MOV A,M126  MOV CT,A127  RETINT. START128  PUSH PSW        Save A and PSW129  IN Port A12A  CMP M           Make Z = 0 of PSW if gate = 012B  RM NEXT (128)   If Z = 1, return to 12812C  CNZ Read OctetREAD OCTET12D  LHLD12E  MOV A,M12F  MOV CT,A130  LX1 B           B ←  0131  RETINT132  LHLD133  MOV A,M134  RLC135  MOV D,A136  IN Port A137  MOV E,A138  LHLD            Addressing of R8139  XRA             Parity in A13A  MOV M,A         Parity in R813B  MOV AE13C  ORA D13D  LHLD            Addressing of R713E  MOV M,A         R7 ← A13F  INX B140  LDA             A ← 8141  SBB B142  JP              Z ← 1 of PSW upon = 0143  RET144  MOV A,E145  LHLD            Addressing of R8146  CMP M147  JZ NEXT (149)   Make Z = 1 of PSW if equality148  End149  OUT Port A150  CALL Port Test______________________________________ 
    
     The example which has been given of a preferred embodiment of the invention is in no way restrictive, and it is obvious that any one versed in the art who is well acquainted with the techniques of data transmission systems will be able to envisage other embodiments of the invention without thereby exceeding its scope.