Abstract:
In a microcomputer including a central processing unit (CPU), at least one peripheral circuit, and buses connected between the CPU and the peripheral circuit, a latch circuit is connected to at least a specific one of the buses for generating a control signal for the peripheral circuit.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a microcomputer incorporating peripheral circuits. 
     2. Description of the Related Art 
     In a prior art microcomputer including a central processing unit (CPU), at least one peripheral circuit, and buses connected between the CPU and the peripheral circuit, special control signal lines for control signals are also connected between the CPU and the peripheral circuit, thus carrying out a read/write operation. This will be explained later in detail. 
     In the above-mentioned microcomputer, however, a large number of control signal lines are required. Since the control signal lines are generally very long, the large number of control signal lines is disadvantageous in view of the integration. Also, if the number of peripheral circuits incorporated into one chip is increased, the number of control signal lines is further increased, which further reduces the integration. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to enhance the integration of a microcomputer incorporating peripheral circuits. 
     According to the present invention, in a microcomputer including a CPU, at least one peripheral circuit, and buses connected between the CPU and the peripheral circuit, a latch circuit is connected to at least a specific one of the buses for generating a control signal for the peripheral circuit. 
     Thus, since a part of the buses serve as control signal lines, the number of control signal lines is reduced. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention will be more clearly understood from the description as set forth below, in comparison with the prior art, with reference to the accompanying drawings, wherein: 
     FIG. 1 is a block circuit diagram illustrating a prior art microcomputer; 
     FIGS. 2A through 2I are timing diagrams for showing the read operation of the microcomputer of FIG. 1; 
     FIGS. 3A through 3I are timing diagrams for showing the write operation of the microcomputer of FIG. 1; 
     FIG. 4 is a block circuit diagram illustrating a first embodiment of the microcomputer according to the present invention; 
     FIGS. 5A through 5J are timing diagrams for showing the read operation of the microcomputer of FIG. 4; 
     FIGS. 6A through 6J are timing diagrams for showing the write operation of the microcomputer of FIG. 4; 
     FIG. 7 is a block circuit diagram illustrating a second embodiment of the microcomputer according to the present invention; 
     FIGS. 8A through 8J are timing diagrams for showing the 16-bit data read operation of the microcomputer of FIG. 7; 
     FIGS. 9A through 9J are timing diagrams for showing the 16-bit data write operation of the microcomputer of FIG. 7; 
     FIGS. 10A through 10J are timing diagrams for showing the 8-bit data read operation of the microcomputer of FIG. 7; 
     FIGS. 11A through 11J are timing diagrams for showing the 8-bit data write operation of the microcomputer of FIG. 7; and 
     FIG. 12 is a block circuit diagram illustrating a third embodiment of the microcomputer according to the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Before the description of the preferred embodiments, a prior art microcomputer will be explained with reference to FIGS. 1, 2A through 2I and FIGS. 3A through 3I. 
     In FIG. 1, which illustrates a prior art microcomputer, a CPU 1 and a peripheral circuit 2 are connected by multiplex buses AD0 through AD15. In a 16-bit read mode, 10 address bits are supplied from the CPU 1 via the buses AD0 to AD9 to the peripheral circuit 2, and thereafter, 16 data bits are supplied from the peripheral circuit 2 via the buses AD0 through AD15 to the CPU 1. On the other hand, in a 16-bit write mode, 10 address bits are supplied from the CPU 1 via the buses AD0 to AD9 to the peripheral circuit 2, and thereafter, 16 data bits are supplied from the CPU 1 via the buses AD0 through AD15 to the peripheral circuit 1. Note, that, in an 8-bit read or write mode, 8 data bits are supplied between the CPU 1 and the peripherial circuit 2 via the buses AD0 to AD9. 
     In a read/write mode, the CPU 1 generates a latch signal LT, a strobe signal ST, a read/write selection signal R/W and a bus width signal BW. 
     Also, a decoder 3 is provided to decode the address bits on the buses AD0 to AD9 to generate a selection signal for selecting the peripheral circuit 2. The selection signal is latched by the latch signal LT in a latch circuit 4 which generates a selection signal SEL. The selection signal SEL of the latch circuit 4 as well as the strobe signal ST are supplied to AND circuits 5 and 6. Also, the read/write selection signal R/W is supplied directly to the AND circuit 5, and the read/write selection signal R/W is supplied via an inverter 7 to the AND circuit 6. The AND circuit 5 generates a read signal R, while the AND circuit 6 generates a write signal W. 
     Further, the bus width signal BW is supplied directly to the peripheral circuit 2. In this case, if BW=&#34;0&#34;(low), the peripheral circuit 2 enters a 16-bit access mode. On the other hand, if BW=&#34;1&#34;(high), the peripheral circuit 2 enters an 8-bit access mode. 
     The read operation of the microcomputer of FIG. 1 is explained next with reference to FIGS. 2A through 2I. Here, a read bus cycle is constructed by four timing periods B1, B2, B3 and B4. Also, as shown in FIG. 2E, the read/write selection signal R/W is &#34;1&#34;(high), and as shown in FIG. 2I, the bus width signal BW is &#34;0&#34;(low) indicating a 16-bit access. 
     In the timing periods B1 and B2, the CPU 1 generates an address indicating the peripheral circuit 2. As shown in FIG. 2A, this address is transmitted to the buses AD0 to AD9. As a result, the output of the decoder 3 is made high. Also, in the timing period B1, as shown in FIG. 2C, the CPU 1 generates a latch signal LT. As a result, in the timing period B2, as shown in FIG. 2D, the output of the decoder 3 is latched in the latch circuit 4 to generate a selection signal SEL. 
     In the timing periods B1 and B2, note that the potentials at the buses AD10 to AD15 are indefinite. 
     Next, in the timing periods B3 and B4, as shown in FIG. 2F, the CPU 1 generates a strobe signal ST, and as a result, as shown in FIG. 2G, the AND circuit 5 generates a read signal R due to the high levels of the read/write selection signal R/W and the selection signal SEL. Thus, as shown in FIGS. 2A and 2B, the peripheral circuit 2 generates 16-bit data on the buses B0 through B15. Then, the data on the buses B0 through B15 are taken into the CPU 1. 
     The write operation of the microcomputer of FIG. 1 is explained next with reference to FIGS. 3A through 3I. Here, a write bus cycle is also constructed by four timing periods B1, B2, B3 and B4. Also, as shown in FIG. 3E, the read/write selection signal R/W is &#34;0&#34;(low), and as shown in FIG. 3I, the bus width signal a BW is &#34;0&#34;(low) indicating a 16-bit access. 
     In the Liming periods B1 and B2, the CPU 1 generates an address indicating the peripheral circuit 2. As shown in FIG. 3A, this address is transmitted to the buses AD0 to AD9. As a result, the output of the decoder 3 is made high. Also, in the timing period B1, as shown in FIG. 2C, the CPU 1 generates a latch signal LT. As a result, in the timing period B2, as shown in FIG. 3D, the output of the decoder 3 is latched in the latch circuit 4 to generate a selection signal SEL. 
     In the timing periods B1 and B2, note that the potentials at the buses AD10 to AD15 are indefinite. 
     Next, in the timing periods B3 and B4, as shown in FIGS. 3A and 3B, the CPU 1 generates 16-bit data on the buses AD0 through AD15. 
     Also, in the timing period B4, as shown in FIG. 3F, the CPU 1 generates a strobe signal ST, and as a result, as shown in FIG. 3H, the AND circuit 6 generates a write signal W due to the low level of the read/write selection signal R/W and the high level of the selection signal SEL. Thus, the data on the buses AD through AD15 are written into the peripheral circuit 2. 
     In the microcomputer incorporating the CPU 1 and the peripheral circuit 2 into one chip, however, control signal lines for the signals LT, ST, R/W and BW are required. Since the control signal lines are generally very long, the large number of control signal lines is disadvantageous in view of the integration. Note that, if the number of peripheral circuits incorporated into one chip is increased, the number of control signal lines is further increased, which further reduces the integration. 
     In FIG. 4, which illustrates a first embodiment of the present invention, the control signal line for the read/write selection signal R/W of FIG. 1 is omitted, and instead of this, a latch circuit 8 is provided between the bus AD15 and the AND circuit 5 (the inverter 7). That is, in FIG. 4, when the bus AD15 is not used as a data bus, use is made of the bus AD15 as the control signal line for the read/write selection signal R/W of FIG. 1. 
     The read operation of the microcomputer of FIG. 4 is explained next with reference to FIGS. 5A through 5J. Here, a read bus cycle is constructed by four timing periods B1, B2, B3 and B4. Also, and as shown in FIG. 5J, the bus width signal BW is &#34;0&#34;(low) indicating a 16-bit access. 
     In the timing periods B1 and B2, the CPU 1 generates an address indicating the peripheral circuit 2. As shown in FIG. 5A, this address is transmitted to the buses AD0 to AD9. As a result, the output of the decoder 3 is made high. Simultaneously, the CPU 1 generates a high level signal on the bus B15. Also, in the timing period B1 as shown in FIG. 5D, the CPU 1 generates a latch signal LT. As a result, in the timing period B2, as shown in FIG. 5E, the output of the decoder 3 is latched in the latch circuit 4 to generate a selection signal SEL. Simultaneously, as shown in FIG. 5F, the high level signal at the bus AD15 is latched in the latch circuit 8 to generate a read/write selection signal R/W. 
     In the timing periods B1 and B2, note that the potentials at the buses AD10 to AD14 are indefinite. 
     Next, in the timing periods B3 and B4, as shown in FIG. 5G, the CPU 1 generates a strobe signal ST, and as a result, as shown in FIG. 5H, the AND circuit 5 generates a read signal R due to the high levels of the read/write selection signal R/W and the selection signal SEL. Thus, as shown in FIGS. 5A and 5B, the peripheral circuit 2 generates 16-bit data on the buses B0 through B15. Then, the data on the buses B0 through B15 are taken into the CPU 1. 
     The write operation of the microcomputer of FIG. 4 is explained next with reference to FIGS. 5A through 6J. Here, a write bus cycle is constructed by four timing periods B1, B2, B3 and B4. Also, and as shown in FIG. 6J, the bus width signal BW is &#34;0&#34;(low) indicating a 16-bit access. 
     In the timing periods B1 and B2, the CPU 1 generates an address indicating the peripheral circuit 2. As shown in FIG. 6A, this address is transmitted to the buses AD0 to AD9. As a result, the output of the decoder 3 is made high. Simultaneously, the CPU 1 generates a low level signal on the bus AD15. Also, in the timing period B1, as shown in FIG. 6D, the CPU 1 generates a latch signal LT. As a result, in the timing period B2, as shown in FIG. 6E, the decoder 3 is latched in the latch circuit 4 to generate a selection signal SEL. Simultaneously, as shown in FIG. 6F, the low level signal at the bus AD15 is latched in the latch circuit 8 to generate a read/write selection signal R/W. 
     In the timing periods B1 and B2, note that the potentials at the buses AD10 to AD14 are indefinite. 
     Next, in the timing periods B3 and B4, as shown in FIGS. 6A and 6B, the CPU 1 generates 16-bit data on the buses AD0 through AD15. 
     Also, in the timing period B4, as shown in FIG. 6G, the CPU 1 generates a strobe signal ST, and as a result, as shown in FIG. 6I, the AND circuit 6 generates a write signal W due to the low level of the read/write selection signal R/W and the high level of the selection signal SEL. Thus, the data on the buses AD0 through AD15 are written into the peripheral circuit 2. 
     Thus, in the microcomputer of FIG. 4, since the control signal line for the read/write selection signal R/W of FIG. 1 is unnecessary, the integration of the microprocessor of FIG. 4 can be enhanced as compared with that of FIG. 1. 
     In FIG. 7, which illustrates a second embodiment of the present invention, the control signal line for the bus/width signal BW of FIG. 1 is omitted, and instead of this, a latch circuit 9 is provided between the bus AD14 and the peripheral circuit 2. That is, in FIG. 4, when the bus AD14 is not used as a data bus, use is made of the bus AD14 as the control signal line for the bus/width signal BW of FIG. 1. 
     The 16-bit data read operation of the microcomputer of FIG. 4 is explained next with reference to FIGS. 8A through 8J. Here, a read bus cycle is constructed by four timing periods B1, B2, B3 and B4. Also, as shown in FIG. 8F, the read/write selection signal R/W is &#34;1&#34;(high). 
     In the timing periods B1 and B2, the CPU 1 generates an address indicating the peripheral circuit 2. As shown in FIG. 8A, this address is transmitted to the buses AD0 to AD9. As a result, the output of the decoder 3 is made high. Simultaneously, the CPU 1 generates a low level signal on the bus AD14. Also, in the timing period B1, as shown in FIG. 8D, the CPU 1 generates a latch signal LT. As a result, in the timing period B2, as shown in FIG. 8E, the output of the decoder 3 is latched in the latch circuit 4 to generate a selection signal SEL. Simultaneously, as shown in FIG. 8J, the low level signal at the bus AD14 is latched in the latch circuit 9 to generate a bus/width signal BW for a 16-bit data access. 
     In the Liming periods B1 and B2, note that the potentials at the buses AD10 to AD13 and AD15 are indefinite. 
     Next, in the timing periods B3 and B4, as shown in FIG. 8G, the CPU 1 generates a strobe signal ST, and as a result, as shown in FIG. 8H, the AND circuit 5 generates a read signal R due to the high levels of the read/write selection signal R/W and the selection signal SEL. Thus, as shown in FIGS. 8A and 8B, the peripheral circuit 2 generates 16-bit data on the buses AD0 through AD15. Then, the data on the buses B0 through AD15 are taken into the CPU 1. 
     The 16-bit data write operation of the microcomputer of FIG. 4 is explained next with reference to FIGS. 9A through 9I. Here, a write bus cycle is constructed by four timing periods B1, B2, B3 and B4. Also, as shown in FIG. 9F, the read/write selection signal R/W is &#34;0&#34;(low). 
     In the timing periods B1 and B2, the CPU 1 generates an address indicating the peripheral circuit 2. As shown in FIG. 9A, this address is transmitted to the buses AD0 to AD9. As a result, the output of the decoder 3 is made high. Simultaneously, the CPU 1 generates a low level signal on the bus B14. Also, in the timing period B1, as shown in FIG. 9D, the CPU 1 generates a latch signal LT. As a result, in the timing period B2, as shown in FIG. 9E, the output of the decoder 3 is latched in the latch circuit 4 to generate a selection signal SEL. Simultaneously, as shown in FIG. 9F, the low level signal at the bus AD14 is latched in the latch circuit 9 to generate a bus/width signal BW for a 16-bit data access. 
     In the timing periods B1 and B2, note that the potentials at the buses AD10 to AD13 and AD15 are indefinite. 
     Next, in the timing periods B3 and B4, as shown in FIGS. 9A and 9B, the CPU 1 generates 16-bit data on the buses AD0 through AD15. 
     Also, in the timing period B4, as shown in FIG. 9G, the CPU 1 generates a strobe signal ST, and as a result, as shown in FIG. 9I, the AND circuit 6 generates a write signal W due Lo the low level of the read/write selection signal R/W and the high level of the selection signal SEL. Thus, the data on the buses AD0 through AD15 are written into the peripheral circuit 2. 
     The 8-bit data read operation of the microcomputer of FIG. 4 is explained next with reference to FIGS. 10A through 10I. Here, a read bus cycle is constructed by four timing periods B1, B2, B3 and B4. Also, as shown in FIG. 10F, the read/write selection signal R/W is &#34;1&#34;(high). 
     In the timing periods B1 and B2, the CPU 1 generates an address indicating the peripheral circuit 2. As shown in FIG. 10A, this address is transmitted to the buses AD0 to AD9. As a result, the output of the decoder 3 is made high. Simultaneously, the CPU 1 generates a high level signal on the bus AD14. Also, in the timing period B1, as shown in FIG. 10D, the CPU 1 generates a latch signal LT. As a result, in the timing period B2, as shown in FIG. 10E, the output of the decoder 3 is latched in the latch circuit 4 to generate a selection signal SEL. Simultaneously, as shown in FIG. 10J, the high level signal at the bus AD14 is latched in the latch circuit 9 to generate a bus/width signal BW for an 8-bit data access. 
     In the timing periods B1 and B2, note that the potentials at the buses AD10 to AD13 and AD15 are indefinite. 
     Next, in the timing periods B3 and B4, as shown in FIG. 10G, the CPU 1 generates a strobe signal ST, and as a result, as shown in FIG. 10H, the AND circuit 5 generates a read signal R due to the high levels of the read/write selection signal R/W and the selection signal SEL. Thus, as shown in FIG. 10A, the peripheral circuit 2 generates 8-bit data on the buses AD0 through AD7. Then, the data on the buses AD0 through AD7 are taken into the CPU 1. Note that, even in the timing operiods B3 and B4, the potentials at the buses AD8 through AD15 are indefinite. 
     The 8-bit data write operation of the microcomputer of FIG. 4 is explained next with reference to FIGS. 11A through 11I. Here, a write bus cycle is constructed by four timing periods B1, B2, B3 and B4. Also, as shown in FIG. 11F, the read/write selection signal R/W is &#34;0&#34;(low). 
     In the timing periods B1 and B2, the CPU 1 generates an address indicating the peripheral circuit 2. As shown in FIG. 11A, this address is transmitted to the buses AD0 to AD9. As a result, the output of the decoder 3 is made high. Simultaneously, the CPU 1 generates a high level signal on the bus B14. Also, in the timing period B1, as shown in FIG. 11D, the CPU 1 generates a latch signal LT. As a result, in the timing period B2, as shown in FIG. 11E, the output of the decoder 3 is latched in the latch circuit 4 to generate a selection signal SEL. Simultaneously, as shown in FIG. 11F, the low level signal at the bus AD14 is latched in the latch circuit 9 to generate a bus/width signal BW for an 8-bit data access. 
     In the timing periods B1 and B2, note that the potentials at the buses AD10 to AD13 and AD15 are indefinite. 
     Next, in the timing periods B3 and B4, as shown in FIG. 11A, the CPU 1 generates 8-bit data on the buses AD0 through AD7. 
     Also, in the timing period B4, as shown in FIG. 11G, the CPU 1 generates a strobe signal ST, and as a result, as shown in FIG. 11I, the AND circuit 6 generates a write signal W due Lo the low level of the read/write selection signal R/W and the high level of the selection signal SEL. Thus, the data on the buses AD0 through AD7 are written into the peripheral circuit 2. 
     Thus, in the microcomputer of FIG. 7, since the control signal line for the bus/width signal BW of FIG. 1 is unnecessary, the integration of the microprocessor of FIG. 7 can be enhanced as compared with that of FIG. 1. 
     In FIG. 12, which illustrates a third embodiment of the present invention, the first embodiment as illustrated in FIG. 4 is combined with the second embodiment as illustrated in FIG. 7. 
     Thus, in the microcomputer of FIG. 12, since the control signal lines for the read/write selection signal R/W and the bus/width signal BW of FIG. 1 are unnecessary, the integration of the microprocessor of FIG. 12 can be further enhanced as compared with that of FIG. 1. 
     As explained hereinabove, according to the present invention, since the number of control signal lines between a CPU and at least one peripheral circuit is reduced, the integration can be enhanced.