Patent Publication Number: US-5835736-A

Title: Serial data transmission unit

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a serial data transmission unit for transferring serial data, and particularly to a serial data transmission unit to which a plurality of external slaves are connected via buses. 
     2. Description of Related Art 
     FIG. 3 is a block diagram showing a conventional serial data transmission unit. In this figure, the reference numeral 31 designates a master including a CPU 32 and a data transmitter 33. The CPU 32 is embedded in a 16-bit single chip microcomputer M31002, and outputs a bus clock signal BCLK. The data transmitter 33 comprises a transmission clock generator 34, a controller 35 and a data transmission portion 36. The reference numerals 37a-37n designate a plurality of external slaves connected to the transmission clock generator 34, controller 35 and data transmission portion 36 through buses 38 1 , 38 2  and 38 3 . 
     The transmission clock generator 34, receiving the bus clock signal BCLK from the CPU 32, generates a transmission clock signal SCLKO by dividing the bus clock signal BCLK by &#34;n+1&#34; using a dividing value &#34;n&#34; which is set in the controller 35, and by further dividing it by two. 
     FIG. 4 illustrates an example of transmission timings when the dividing value &#34;3&#34; is set in the controller 35 of the data transmitter 33. 
     Next, the operation will be described. 
     When the master 31 starts its operation, the CPU 32 outputs the bus clock signal BCLK, first. Receiving the bus clock signal BCLK, the transmission clock generator 34 of the data transmitter 33 divides the bus clock signal BCLK by &#34;3+1&#34; when the dividing value set in the controller 35 is &#34;3&#34;, and further divides the result by two, thereby generating the transmission clock signal SCLKO. 
     The controller 35, receiving a transmission data request signal CST from any of the external slaves 37a-37n through the bus 38 2 , has the transmission clock generator 34 and the data transmission portion 36 output the transmission clock signal SCLKO and transmitted data TXD, respectively. 
     The data transmission portion 36 has a counter, and outputs the transmitted data TXD bit by bit, amounting eight bits D7 . . . D0, to the external slaves 37a-37n via the bus 38 3  each time it detects the asserting edge AG of the transmission clock signal SCLKO. The external slaves 37a-37n, receiving the transmission clock signal SCLKO, each latch the transmitted data TXD at the negating edges NG of the transmission clock signal SCLKO. Although each one bit of the transmitted data is kept output during the time period from the asserting edge AG to the next asserting edge AG of the transmission clock signal SCLKO, the final bit enters a HiZ state after a short holding interval T beginning from the negating edge NG of the transmission clock signal SCLKO. Here, the HiZ states refers to a state in which the buses 38 1 , 38 2  and 38 3  are relinquished after completing the data transmission so that the buses can be used for other purposes. 
     The conventional serial data transmission unit with such an arrangement outputs the transmitted data bit by bit. In this case, the final bit is kept for only the fixed interval T after the negating edge NG of the transmission clock signal SCLKO. This presents a problem, when holding intervals of data differ among the external slaves, in that the dividing value of the bus clock signal BCLK set in the controller 35 must undergo a wide range of adjustment in accordance with the external slave that demands the longest holding interval. 
     SUMMARY OF THE INVENTION 
     The present invention is implemented to solve the foregoing problem. It is therefore an object of the present invention to provide a serial data transmission unit capable of varying the holding interval of the final bit of the transmitted data. 
     According to the present invention, there is provided a serial data transmission unit comprising a holding interval decision portion for determining a holding interval of a final bit of transmitted data in accordance with a predetermined integer multiple of a bus clock signal. This enables the holding interval of the final bit of the transmitted data to be determined freely by only changing a value set in the holding interval decision portion, thereby making it easy to adjust the holding interval when the external slaves having different holding intervals are connected to the serial data transmission unit. As a result, the buses can be quickly relinquished after the data transmission, which offers an advantage of improving the efficiency of the buses. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing a configuration of an embodiment 1 of a serial data transmission unit in accordance with the present invention; 
     FIG. 2 is a transmission timing chart of the serial data transmission unit as shown in FIG. 1; 
     FIG. 3 is a block diagram showing a configuration of a conventional serial data transmission unit; and 
     FIG. 4 is a transmission timing chart of the conventional serial data transmission unit. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The invention will now be described with reference to the accompanying drawings. 
     EMBODIMENT 1 
     FIG. 1 is a block diagram showing a configuration of an embodiment 1 of a serial data transmission unit in accordance with the present invention. In this figure, the reference numeral 1 designates a master including a CPU 2 and a data transmitter 3. The CPU 2 is embedded in the 16-bit single chip microcomputer M31002, and outputs a bus clock signal BCLK. The data transmitter 3 comprises a transmission clock generator 4, a controller 5, a data transmission portion 6 and a holding interval decision register 9 as a holding interval decision portion for determining the holding interval of the final bit of transmitted data TXD. The reference numerals 7a-7n designate a plurality of external slaves connected to the transmission clock generator 4, controller 5 and data transmitting portion 6 through buses 8 1 , 8 2  and 8 3 , respectively. 
     The transmission clock generator 4, receiving the bus clock signal BCLK from the CPU 2, generates a transmission clock signal SCLKO by dividing the bus clock signal BCLK by &#34;n+1&#34; using a dividing value &#34;n&#34; which is set in the controller 35, and by further dividing it by two. 
     FIG. 2 illustrates an example of transmission timings when the dividing value of the bus clock signal BCLK is set to &#34;3&#34; in the controller 5 of the data transmitter 3, and an integer multiple m of the bus clock signal BCLK is set to m=4 in the holding interval decision register 9. Here, the integer multiple of the bus clock signal BCLK can be set in the holding interval decision register 9 automatically based on a value read from a program by the CPU 2, or manually with an external set means not shown in this figure. In this case, the integer multiple of the bus clock signal BCLK can be set considering the longest one of the data holding intervals of the external slaves. 
     Next, the operation will be described. 
     When the master 1 starts its operation, the CPU 2 outputs the bus clock signal BCLK, first. Receiving the bus clock signal BCLK, the transmission clock generator 4 of the data transmitter 3 divides the bus clock signal BCLK by &#34;3+1&#34; when the dividing value set in the controller 5 is &#34;3&#34;, and further divides the result by two, thereby generating the transmission clock signal SCLKO. 
     The controller 5, receiving a transmission data request signal CST from any of the external slaves 7a-7n through the bus 8 2 , has the transmission clock generator 4 and the data transmitting portion 6 transfer the transmission clock signal SCLKO and transmitted data TXD, respectively. 
     The data transmitting portion 6 has a counter, and outputs the transmitted data TXD bit by bit, amounting eight bits D7 . . . D0, to the external slaves 7a-7n via the bus 8 3 , each time it detects the asserting edge AG of the transmission clock signal SCLKO. The external slaves 7a-7n, receiving the transmission clock signal SCLKO, each latch the transmitted data TXD at the negating edges NG of the transmission clock signal SCLKO. Although each bit of the transmitted data is kept output during the time period from the asserting edge AG to the next asserting edge AG of the transmission clock signal SCLKO, the holding interval T of the final bit is determined by the holding interval decision register 9. For example, when the value &#34;m&#34; set in the holding interval decision register 9 is four, the holding interval T is set at four times the period of the bus clock signal BCLK beginning from the negating edge NG of the transmission clock signal SCLKO, and the HiZ state is started after the holding interval T by the data transmitting portion 6 which is controlled by the output of the holding interval decision register 9. 
     According to the embodiment 1, since the holding interval of the final bit of the transmitted data TXD can be freely set by only changing the value set in the holding interval decision register 9, the connection of the external slaves 7a-7n having different holding intervals can be readily carried out.