Clock circuit with master-slave synchronisation

Abstract: A synchronization circuit (1) for electronic devices and components, being of the type which comprises an internal synchronization signal (5) generator (4) and an input/output terminal (A) whereat an external synchronization signal (SINC) can be received, or the internal synchronization signal (5) can be supplied from the circuit (1), further comprises a comparator block (6) being input both said signals and having a control output for supplying said terminal (A) with the signal (SINC,5) corresponding to the master/slave mode of operation of the synchronization circuit. The invention also concerns a method of generating and supplying a synchronization signal to a plurality of electronic devices (18) being operated as slave devices to a synchronization circuit (1) acting as the master device.

Description: This invention relates to a synchronization circuit for electronic devices and components, the circuit being of the type which comprises an internal synchronization signal generator and an input/output terminal whereat an external synchronization signal can be received, or the internal synchronization signal can be supplied from the circuit. The invention also concerns a method of generating and supplying a synchronization signal to a plurality of electronic devices being operated as slave devices to a synchronization circuit acting as the master device, and wherein the synchronization circuit can, in turn, be operated in the slave mode to receive an external synchronization signal. Many applications require in the electronic industry that a number of electronic devices from the same circuit family, or from families of some different type, be rendered compatible with one another. This means that the devices should be capable of operating at the same working frequency to avoid the occurrence of intermodulation phenomena. This requirement is usually met by using a special synchronization circuit which enables one of the devices to act as the master device, while the other active devices operate in the slave mode. In essence, one of the devices -- referred to as the master -- functions as a synchronization circuit and impresses a synchronization signal clock which is picked up by all the slave devices to time their synchronization signals. A good synchronisation circuit should be able to receive or supply the synchronisation signal at/to a single output node, but should not form its synchronization signal at that node when operated in the slave mode. For a better understanding of this invention, some prior art solutions will now be reviewed in detail. Background Art A first known solution will be discussed with reference to Figure 1 of the drawings. In this prior art example, a synchronization circuit 10 includes a squaring or clipping circuit 11 connected after an oscillator 12. An input terminal IN of the oscillator 12 is applied an enable signal CSC which is also applied in parallel to the input of an ON/OFF switch 13 having an output which is active on the oscillator 12. The switch 13 can be regarded as being part of the synchronization circuit 10. The clipper 11 is effective to clip the saw-toothed signal output by the oscillator 12. The output of the clipper 11 is connected to a circuit node U supplying a synchronization signal SINC to other circuit components, which are generally designated 14 and internal of the circuit 10. The synchronization circuit 10 may be either operated in the master mode and, accordingly, may supply the signal SINC to electronic devices connected to the terminal A, or in the slave mode, whereby the signal SINC is received at the node U over a connection 15 from the terminal A connected to the output of another master device, not shown in the figure. In other words, when operated as a slave, no saw-toothed signal is generated, and the synchronization signal SINC is delivered from outside, i.e. from the terminal A. For controlling the master or slave mode of the synchronization circuit, the input terminal IN is utilised, whereto a capacitor or resistor is connected toward ground outside the oscillator. Both the capacitor and the resistor would normally be provided to form an RC circuit. This known solution has, however, the following shortcomings: a) a second terminal must be made available for controlling the synchronization circuit; b) when operating in the slave mode, the saw-toothed signal is not generated, so that this structure cannot be used in many applications to which that signal is essential (Pulse Width Modulators, ...). A second known solution is illustrated in Figure 2 wherein the components already mentioned in connection with Figure 1 are denoted by the same reference numerals. The circuit of Figure 2 can be implemented without a control terminal because the saw-toothed signal from the oscillator is controlled through the synchronization signal SINC alone. In fact, upon detection of the synchronization signal, the saw-toothed signal will be forced to discharge. That device which is first input the synchronization signal will also force the outputting of its synchronization signal, as generated by the clipper 11, after a predetermined time delay Td due to the delays of the oscillator 12 and the clipper 11. This means that, when the two synchronization signals have equal duration, the delay Td of the slave synchronization circuit will cause the synchronization signal to expand, thereby lowering the oscillation frequency. In addition, consumption is bound to increase due to the master circuit clipper tending to force the terminal to discharge, but meeting the opposition of the clipper incorporated to the slave which can deliver a larger current than the master can accept. If the duration of the synchronization signal of the slave is longer than that of the master, the frequency is further reduced and consumption increased accordingly. Where several devices are to be synchronized, these problems become more serious, also on account of the propagation delays introduced by the length of the layout connections. Plotted versus time in Figures 3A and 3B are the differences between an ideal synchronization (Figure 3A) and a real synchronization (Figure 3B). Designated SINC is the synchronization signal, and I (SINC) the current flowing through the terminal to which the signal SINC is applied. If the synchronization pulse is a very short one, it may be depleted by the time the slave synchronization signal arrives. In this case, the slave would turn into master and force a synchronization signal to the real master, causing the signal to bounce from one circuit to another and the system oscillation frequency to rise until the inverse of the propagation time Td. This phenomenon is illustrated in Figure 4, which shows the pattern of a synchronization signal whose period is equal to Td. The underlying technical problem of this invention is to provide a synchronization circuit and synchronization method which have such constructional and functional features as to overcome the limitations and drawbacks mentioned above in connection with the background art. Summary of the Invention The solution idea on which this invention stands is one of enabling the synchronization circuit to recognise the operating mode expected of it, that is, to tell the master mode from the slave mode. Based on this solution idea, the technical problem is solved by a synchronization circuit as previously indicated and defined in the characterising portions of Claim 1 and following. The technical problem is also solved by a method as indicated and defined in the characterising portions of Claim 6 and following. The features and advantages of the circuit and the method of this invention will be apparent from the following description of an embodiment thereof, given by way of nonlimiting example with reference to the accompanying drawing. Brief Description of the Drawings Figure 1 is a diagram representing schematically a prior art synchronization circuit. Figure 2 shows a second embodiment of a synchronization circuit according to the prior art. Figures 3A and 3B are respective plots versus time of an ideal synchronization signal and a synchronization signal present in the circuit of Figure 2. Figure 4 is a plot versus time of a synchronization signal as resulting from a malfunction condition of the circuit in Figure 2. Figure 5 is a diagram representing schematically a synchronization circuit according to the invention. Figure 6 is a more detailed diagram of the synchronization circuit in Figure 5. Detailed Description Referring to the drawing figures, and in particular to the example of Figure 5, generally and schematically shown at 1 is a synchronization circuit embodying this invention. The synchronization circuit 1 is associated with an oscillator 2 which is input a synchronization signal SINC, external or internal, being applied to an input/output terminal A, and outputs a saw-toothed signal 3. The circuit 1 includes a clipping circuit 4 connected to the output of the oscillator 2 to clip the saw-toothed signal 3 and output an internal synchronization signal 5. Accordingly, the clipper 4 can be regarded as a generator of the synchronization signal 5, internal of the circuit 1. According to the invention, the circuit 1 advantageously Includes a comparator block 6 which is input both the internal synchronization signal 5 and the external synchronization signal SINC. The output from the block 6 is active for closing a normally open switch 7. This switch 7 is included in the electric connection between the output of the clipper 4 and a circuit node U which is substantially coincident with the output of the synchronication circuit 1. The output U is connected to circuit components, generally designated 8, insice the circuit 1. But the output U is also substantially coincident with the terminal A whereto various electronic devices 18 are connected which act as slaves tied operatively to the synchronization signal presented at the node U when the circuit 1 is operated in the master mode. The solution proposed by the present invention is an improvement on the basic C circuit shown in Figure 2, of which it removes the drawbacks. The invention proposes essentially a method of distributing the synchronization signal, which method can be implemented using the synchronization circuit described above. In fact, the circuit 1 recognises if the external synchronization signal SINC has arrived and compares it with the internal synchronization signal 5. In this way, additionally to avoiding rebounds of the signal, the time base of the synchronization pulse will be unaltered, as will the operation frequency or the downstream circuits of the system consumption. The recognition is effected by a comparison of the external synchronization signal SINC and the internal synchronization signal 5. When the circuit 1 is to be operated in the slave mode, the discharge of the oscillator 2 is forced by the external synchronization signal SINC from another master. In this case, the output of the clipper 4 changes over after the arrival of the external synchronization signal SINC. The comparator block 6 is effective to control the two synchronization signals SINC and 5, and only enables the node U charging if the changeover of the clipper 4 output has occurred ahead of the external synchronization signal SINC . Shown in greater detail in Figure 6 is the construction of the synchronization circuit according to the invention. The example of Figure 6 is based on a synchronization circuit activated by the leading edge of the signal SINC and upon a saw-toothed signal 5 being generated by the charging of an R-C circuit associated with the oscillator 2. This RC circuit is designated 9 in Figure 6 and connected between a supply voltage reference Vcc and a signal ground. The point of interconnection of the resistor R and the capacitor C is a circuit node X which is connected directly to the inverting input of a comparator OA. The non-inverting input of the comparator OA is connected to a resistive divider 16 connected between the voltage reference Vcc and a voltage generator Vs which represents the lower threshold of the comparator OA. The output of the comparator OA is connected to one input of a logic NAND gate N1 having the other input connected to the negated output QN of a storage element F1 of the D type. An input CD of this element F1 receives the negated signal presented at the output of the comparator OA. The output of the NAND gate N1 is connected to the control terminal of an NMOS transistor Ma which has its drain terminal connected to the resistive divider 16 and its source terminal connected to the voltage generator Vs. The output of the comparator OA is further connected to one input of a two-input logic AND gate A1, one input of a two-input logic OR gate 01, and an inverter I1. The other input of the gate A1 receives the synchronization signal SINC presented at the terminal A. The output of the gate A1 is connected to a set input S of a storage element of the SR type designated F2 . The output Q of this element F2 is connected to the other input of the logic gate 01. The output of the inverter I1 is connected to a second inverter I2 and to the control terminal of an NMOS transistor Mb having its drain terminal connected to the node X and its source terminal to ground. The second inverter I2 has an output connected directly to the reset input R of the storage element F2. The output of the logic gate O1 is connected to the control terminal of a transistor M1 of the PMOS type which has its drain terminal connected to the terminal A and its source terminal held at a reference voltage Vref. A current generator I is connected between the terminal A and ground. The construction of the circuit in Figure 6 is completed by a Schmitt trigger 17 whose input is applied the synchronization signal SINC and whose output is connected to one input CP of the flip-flop F1. The voltage Vref is also present at the other input D of the flip-flop F1. The operation of the circuit shown in Figure 6 and its correspondence to the components shown schematically in Figure 5 will now be described briefly. The storage element F2 is a dominant set flip-flop responsive to the leading edges of the signals S and R. The P-channel transistor M1 is effective to output the synchronization signal and, accordingly, this transistor is an equivalent of the controlled switch 7. The transistor M1 is in the "on" state when its gate voltage is low. The terminal SINC is discharged through the current generator I. The logic OR gate O1 transmits the turn-on signal to M1 when both its inputs are low. The flip-flop F1 outputs the negated signal from the Schmitt trigger 17 only when the signal CD is at a high logic level. This can only occur if the synchronization signal SINC precedes the output from the comparator OA, thereby forcing the threshold to change and, consequently, the discharge of the saw-toothed synchronization signal 5. Under these conditions, until the comparator OA has time to change over its output, the AND gate A1 has two inputs high, so that the output Q of the flip-flop F2 will be forced to a high logic level, thereby holding M1 in the "off" state even when the other input of O1 goes low. The output Q of F2 only goes to a low logic level upon the output of the comparator OA becoming high again. In this way, turning on M1 when the circuit 1 is operating in the slave mode, and sending the synchronization signal to the master, can be avoided. On the ether hand, when operating in the master mode, the setting of the flip-flop F2 will occur subsequently to the changeover of the comparator OA, so that two signals at low logic values are presented at the input of O1 which will turn on M1. In this situation, the above circuit will send a synchronization pulse SINC to the terminal A.

Claims: A synchronization circuit (1) for electronic devices and components, the circuit being of the type which comprises: a bi-directional terminal (A) for receiving an external synchronization signal (SINC) in a first operating mode or supplying an internal synchronization signal (5) produced by the circuit (1) in a second operating mode; an internal synchronization generator (4) to provide said internal synchronization signal (5), characterised in that it further comprises a comparator block (6) receiving said internal synchronization signal (5) and said external synchronization signal (SINC), said comparator block (6) comparing said internal (5) and external synchronization signals (SINC) and having a control output to supply said bi-directional terminal (A) with said internal synchronization signal (5) when said synchronization circuit is operating in said second operating mode. A circuit according to Claim 1, characterised in that said internal generator includes a clipper (4) associated with an oscillator (2) in turn connected to said bi-directional terminal (A) , the output of said clipper (4) providing said internal synchronization signal (5). A circuit according to Claim 2, characterised in that said control output acts on a switch (7) included in the electric connection between the clipper (4) output and said bi-directional terminal (A), the comparator block (6) selectively providing said internal synchronization signal (5) to said bi-directional terminal (A) through control of said switch (7). A circuit according to Claim 3, characterised in that said switch (7) is a normally open PMOS transistor. A circuit according to Claim 1, characterised in that said comparator block (6) includes a logic network comprising logic gates (Al,O1,I1,I2) and at least one storage element (F2). A method of generating and supplying a synchronization signal to a plurality of electronic Slave devices (18) driven by a synchronization circuit (1) acting as the Master device, and wherein the synchronization circuit induces a bi-directional terminal (A), connected to said electronic Slave devices (18) and able to receive an external synchronization signal (SINC) in a first operating mode or supply an internal synchronization signal (5) generated by the synchronization circuit (1) in a second operating mode, characterised in that it provides comparison between said external synchronization signal (SINC) and said internal synchronization signal (5) for transmitting, to said bi-directional terminal (A), said internal synchronization signal (5) when said syncnronization circuit is operating in said second operating mode.

Inventors: FERRARIO BRUNO, MAGAZZU ANTONIO, FERRARIO, BRUNO, MAGAZZU, ANTONIO
Applicants: ST MICROELECTRONICS SRL, STMICROELECTRONICS S.R.L.
Application year: 1996
Main classification: H03L7
IPC codes: G06F1, H03L7, H04L7