Abstract:
An interface circuit for a programmed controller disposed between the CPU of the programmed controller and an input/output unit includes eight N× 1-bit RAMs with simultaneous operating switching circuits for accessing the RAMs in parallel by the input/output unit and with sequential operating selecting circuits for accessing the RAMs serially by the CPU, whereby the interfacing process is sped up.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to an interface circuit interposed between a central processing unit (CPU) of a programmed controller and an input/output unit having a data link unit other than the CPU. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide an interface circuit for a programmed controller capable of speeding up the interfacing process. 
     According to one form of the present invention, there is provided an interface circuit used for interfacing a CPU of a programmed controller with an input/output unit having a CPU and a data link unit other than the first-mentioned CPU, wherein the circuit comprises a plurality of N×1-bit RAMs (Random Access Memory units), means operated by the controller CPU to individually access the RAMs one at a time, and means operated by the input/output unit to access in parallel all of the RAMs simultaneously. 
     Other objects and features of the present invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawing. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The FIGURE shows in block form the interface circuit for a programmed controller embodying the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The invention will now be described by way of illustrated embodiment. In the figure, reference number 1 denotes a CPU of an input/output unit, reference number 2 denotes a data bus input switch, reference number 3 denotes a data bus output switch, reference number 4 denotes an address bus switch, and reference number 5 denotes a control signal circuit, constituting in combination a parallel input/output data switching circuit for the input/output unit 1. Reference number 6 denotes a CPU of a programmed controller, reference number 7 denotes an address controlled selective data bus input switch or multiplexer, reference number 8 denotes an address controlled selective data bus output switch or demultiplexer, reference number 9 denotes an address bus switch, reference number 10 denotes a memory selection decoder, and reference number 11 denotes a control signal circuit, constituting in combination a serial or individual input/output data switching circuit for the CPU 6. Reference numbers 12-1 through 12-8 denote N×1-bit RAMs (Random Access Memory units) wherein N is greater than 1, and reference numbers 13 denote OR gates, arranged between the CPU 6 of the programmed controller and the CPU 1 of the input/outputt unit. Thus, the arrangement forms a 2-port RAM circuit which is accessed as individual N×1-bit RAMs by the CPU 6 of the programmed controller and, at the same time, accessed as a parallel 8-bit RAM by the input/output unit. 
     The operation of the above arrangement will be described. First, when the CPU 1 of the input/output unit makes access to the RAMs 12-1 through 12-8 for writing, the control signal circuit 5 enables the CPU data bus output switch 3 and CPU address bus switch 4, selects the RAMs 12-1 through 12-8 by the chip select signals CSL1-CSL8 through the OR gates 13, and issues a write pulse WRL. Then, the N×1-bit RAMs 12-1 through 12-8 are accessed simultaneously as an 8-bit RAM, and 8-bit data is written in parallel into the RAMs at the address on the CPUAB or address bus of the input/output unit. 
     When the CPU 1 reads out the RAMs 12-1 through 12-8, the control signal circuit 5 enables the CPU data bus input switch 2 and CPU address bus switch 4, and selects all of the RAMs by the chip select signals CSL1-CSL8 through the OR gates 13. Then, the N×1-bit RAMs 12-1 through 12-8 are accessed simultaneously as an 8-bit RAM, and 8-bit data is read out of them in parallel. 
     On the other hand, when the CPU 6 of the programmed controller makes access to the 1-bit RAMs 12-1 through 12-8 for writing, the control signal circuit 11 enables the selectine data bus output switch or demultiplexer 8 and address bus switch 9, selects in cooperation with the memory selection decoder 10 the 1-bit word RAMs sequentially by the chip select signals CSL1-CSL8 through the OR gates 13, and issues a write pulse WRL. Then, each of the RAMs 12-1 through 12-8 is accessed sequentially as a N×1-bit RAM, and bit data can be written to each of the RAMs. 
     When the CPU 6 reads out the RAMs 12-1 through 12-8, the control signal circuit 11 enalbes the selectine data bus input switch or multiplexer 7 and address bus switch 9, and selects in cooperation with the memory selection decoder 10 the N×1-bit RAMs 12-1 through 12-8 sequentially by the chip select signals CSL1-CSL8 through the OR gates 13. Then, each of the RAMs is accessed sequentially, and bit data can be read out of it. 
     Thus, the foregoing arrangement allows the eight N×1-bit RAMs to be accessed as an 8-bit RAM from the CPU 1 of the input/output unit and also as individual N×1-bit RAMs from the I/O bus of the CPU 6 of the programmed controller, whereby the interfacing process can be sped up. 
     According to the present invention, as described above, a 2-port RAM circuit is arranged so that the constituent RAMs are accessed as RAMs by the CPU of the programmed controller, while each of the same RAMs is accessed as an 8-bit RAM by the input/output unit, whereby the speed-up of the interfacing process for the programmed controller can be achieved.