This patent specification is based on Japanese patent application, No. 2004-239706 filed on Aug. 19, 2004 in the Japan Patent Office, the entire contents of which are incorporated by reference herein.
The present invention relates to a method and system for performing serial communication, and more particularly to a method and system for performing serial communications between host and slave apparatuses using half-duplex channel communication with a serial data signal superimposing a data signal on a clock signal.
Personal computers handle mostly parallel data with byte length and word length. To transmit parallel data through a cable, the cable is needed to be a multiple wire cable including eight wires for byte length data or sixteen wires for word length data. However, it is not cost effective to use the multiple wire cable especially when a transmission length becomes relatively long. Since a serial data communication method contributes reduction of the number of wires, variety of serial communication methods have been proposed. When byte data is transmitted, the byte data is broken down to bit data and the bit data is then transmitted.
Among the serial communication methods, a half-duplex channel communication method is frequently used because of its simplicity.
The slave transmitter circuit 206 is similarly configured to the master transmitter circuit 202. The slave receiver circuit 207 is also similarly configured to the master receiver circuit 203. Each of the master and slave control switches, 204 and 208, controls possession of transmission right which determines a transmission direction through the transmission path 209 between the master transmitter-receiver circuit 201 and the slave transmitter-receiver circuit 205.
When the master transmitter-receiver circuit 201 holds the transmission right, data is transmitted from the master transmitter circuit 202 to the slave receiver circuit 207. On the other hand, when the transmission right is held by the slave transmitter-receiver circuit 205, data is transmitted from the slave transmitter circuit 206 to the master receiver circuit 203.
In such conventional serial communication apparatus, relatively large slave circuits are required to be able to operate the same functionality as a circuit in the master side. Moreover, complicated switching circuits are needed to switch the direction of the transmission. Thus, there are increasing demands for an improved technique for transmitting serial data with a smaller circuit and less wires.
This patent specification describes a novel serial communication system between host and slave apparatuses using half-duplex channel communication.
According to one exemplary embodiment, a serial communications system comprises a host apparatus, a plurality of slave apparatuses, a master circuit, a plurality of slave circuits, and a transmission path. The host apparatus is configured to send first data. Each of the slave apparatuses is configured to return second data in response to the first data sent from the host apparatus. The master circuit is connected to the host apparatus, and performs (a) a first master operation using the first data from the host apparatus and (b) a second master operation to transmit to the host apparatus the second data sent from an arbitrary one of the slave apparatuses. The slave circuits are connected to the slave apparatuses on a one-to-one basis, and each of the slave circuits performs (i) a first slave operation to send the first data to the plurality of the slave apparatuses including a designated slave apparatus in response to the first master operation and (ii) a second slave operation to cause the master circuit to perform the second master operation. The transmission path connects the master circuit to the slave circuit.
According to another exemplary embodiment, the host apparatus transmits through the transmission path an identification signal generated by superimposing on a clock signal identification data for specifying a slave apparatus to be requested, after transmitting a preamble signal generated by superimposing successively repeated data pulse on the clock signal to the transmission path.
This patent specification further describes, according to another example, a novel feature of a serial communication system in which a designated slave apparatus matching with the identification signal transmits acknowledgement data, and an acknowledge signal generated by superimposing the acknowledgement data on the identification signal is returned.
This patent specification also describes a novel method for performing serial communication using half-duplex channel communication which includes the steps of transmitting through a transmission path a preamble signal generated by superimposing successively repeated data on a clock signal, transmitting a serial identification signal generated by superimposing on the clock signal identification data sent from a host apparatus after transmitting the preamble signal, extracting the identification data from the serial identification signal received through the transmission path, outputting the extracted identification data to a slave apparatus, transmitting through the transmission path a second serial data signal generated by superimposing on the serial identification signal second data sent from a designated slave apparatus, extracting the second data from the second serial data signal received through the transmission path and outputting the extracted second data to the host apparatus.
A more complete appreciation of the disclosure and many of the attendant advantages thereof will be readily obtained as the same becomes better understood by reference to the following detailed description when considered in connection with the accompanying drawings, wherein:
In describing preferred embodiments illustrated in the drawings, specific terminology is employed for the sake of clarity. However, the disclosure of this patent specification is not intended to be limited to the specific terminology so selected and it is to be understood that each specific element includes all technical equivalents that operate in a similar manner. Referring now to the drawings, wherein like reference numerals designate identical or corresponding parts throughout the several views, particularly to
The serial communication system 100 of
The master transmitter-receiver circuit 2 is connected to the host apparatus HC1, and the slave transmitter-receiver circuits SL1 to SLn are connected to the slave apparatuses SC1 to SCn, respectively. The transmission path 4 connects the master transmitter-receiver circuit 2 to the plurality of slave transmitter-receiver circuits SL1 to SLn. The transmission path 4 is configured to transmit a serial signal and may be formed by an electrically conductive wire. Moreover, the transmission path 4 may be a light path, or a radio wave path.
The master transmitter-receiver circuit 2 includes a master transmitter circuit 11 and a master receiver circuit 12. The slave transmitter-receiver circuit SL1, for example, includes a slave transmitter circuit SL13 and a slave receiver circuit SL14. The slave transmitter-receiver circuits SL2 to SLn use a similar circuit configuration to the slave transmitter-receiver circuit SL1. Similarly, one of the slave transmitter-receiver circuits SLk (k=1 to n) includes a slave transmitter circuit SLk3 (k=1 to n) and a slave receiver circuit SLk4 (k=1 to n). The master transmitter circuit 11 and the master receiver circuit 12 are connected to the slave transmitter circuits SLk3 and the slave receiver circuits SLk4 through the transmission path 4.
When the data is transmitted from the master transmitter-receiver circuit 2 to the slave transmitter-receiver circuit SLk, the master transmitter circuit 11 generates a serial data signal DATA1 by superimposing master data on a clock signal TCLK input from the host apparatus HC1 during a high level of the clock signal TCLK. The serial data signal DATA1 is then transmitted to the slave transmitter-receiver circuit SLk through the transmission path 4. The slave receiver circuit SLk4 extracts the master data from the serial data signal DATA1.
Further, when the slave transmitter-receiver circuit SLk transmits data to the master transmitter-receiver circuit 2, the slave transmitter-receiver circuit SLk writes slave data on the serial data signal DATA1 which was transmitted from the master transmitter-receiver circuit 2 through the transmission path 4. The slave transmitter circuit SLk3 is connected to the slave receiver circuit SLk4 and generates a serial data signal DATA2 by superimposing a slave data on the serial data signal DATA1 input through the transmission path 4 during a low level of the master clock signal TCLK and transmits the serial data signal DATA2 to the master transmitter-receiver circuit 2 through the transmission path 4. The master receiver circuit 12 then extracts the slave data from the serial data signal DATA2.
If this system is used in, for example, a mobile telephone, each slave apparatus can correspond to, for example, a temperature detection apparatus, a detection apparatus to detect remaining amount of battery, an identifying apparatus to identify battery type, etc. The slave apparatuses, the temperature detection apparatus and the detection apparatus can be connected to a battery embedded in a battery pack.
The slave apparatus SC1 to SCn receives the ID after the slave apparatus SC1 to SCn receives the clock pulse of the low level following the preamble transmission. Each of the slave apparatuses SC1 to SCn then judges whether the ID identifies its own ID. In this case, only the slave apparatus SC1 recognizes that the received ID matches its own specific ID, and in contrast the other slave apparatuses recognize that the ID is different from their own ID.
When the slave apparatus SC1 recognizes that the ID sent from the host apparatus is identical with its own ID, the slave apparatus SC1 returns an acknowledge signal ACK which is a recognition signal to the host apparatus HC1. When the host apparatus HC1 confirms that the acknowledge signal ACK is delivered on the transmission path 4 which is a wire line, the host apparatus HC1 now recognizes that the slave apparatus SC1 is connected to the wire line and is able to properly communicate with.
After this recognition, the host apparatus HC1 issues a command to the slave apparatus SC1. When the slave apparatus SC1 receives the command sent from the host apparatus HC1, the slave apparatus SC1 executes the command.
If the command includes a request to return a result of the execution, the slave apparatus SC1 executes in accordance with the command and returns the result of the execution. If the command requests to read data stored in a register at a specific address, the slave apparatus SC1 reads the data from the register and returns the data as a result of an execution of the command to the host apparatus HC1. When the host apparatus HC1 confirms reception of the data, one execution job has been completed. If the host apparatus HC1 keeps on executing a next job for the slave apparatus SC1 or other slave apparatus, the host apparatus HC1 starts to transmit a preamble signal again for the next job.
As described above, the wire bus communication method is a useful method for achieving cost reduction and is frequently used because devices used in a system are requested to be with small number of terminals. Circuitry used in the slave apparatus is desired not to be specific and is applicable for general purpose in order to achieve cost reduction. This is because cost reduction can be generally achieved by volume production.
In order to make the circuitry of the slave apparatus more general, however, various situations can be taken into consideration. If a slave apparatus is used for a different system, a different time period to the preamble signal may be requested from a time period requested for other slave apparatus. Therefore, the circuitry is preferably not configured to have a fixed time period of preamble signal but rather to be configured with a flexible time period during a preamble state.
For example, if the slave apparatuses SC1, SC2 and other slave apparatuses need a time more than 32, 20 and 16 clock pulses for setting the preamble state, respectively, 36 clock pulses for setting the preamble state may be used in consideration of taking noise margin. In this example, because each slave apparatus can enter the preamble state after receiving 36 clock pulses, the slave apparatus can be set into a ID detection state at the same time by sending a low level pulse following the preamble state.
If it is known that a slave apparatus to be selected is already connected to the one wire bus before starting a communication, the host apparatus HC1 can transmit a command to the slave apparatus after selecting the slave apparatus by issuing a specific ID for the slave apparatus. This procedure provides an advantage of a shorter communication time. However, it may not be applicable when the wire bus is open to outside of the system and a slave apparatus to be selected is connected to the wire bus from outside of the system. Accordingly, the host apparatus HC1 is requested to confirm whether a slave apparatus to be selected is connected to the wire bus at a starting point of the communication.
The host apparatus HC1 issues an ID following a preamble transmission and recognizes that a slave apparatus to be selected is connected to the wire bus by receiving a return signal from the slave apparatus. The return signal is an acknowledge signal ACK issued by the slave apparatus as a result of issuance by the host apparatus HC1 of the slave apparatus's identification. When the slave apparatus is connected properly, the slave apparatus works as a part of the system. If the host apparatus receives no return of an acknowledge signal ACK, the host apparatus recognizes that the slave apparatus is not connected and may manage the system to work without the slave apparatus. This procedure is useful especially in a case where a slave apparatus may be an optional apparatus.
When an error function takes place at the slave apparatus, it is requested to reset a system because both clock signal and data signal are transmitted through the one wire bus. In this case, however, the data communication itself may not be possible.
In order to solve the problem, the slave apparatus is configured to place itself in an initial state when successively repeated data of a level pulse is input for a period of time. In other word, it is possible to make the slave apparatus reset through this configuration. The host apparatus can initialize each slave apparatus connected to the wire bus to a preparation state for a preamble state, for example, by sending 128 successive pulses of high level. Also, the host apparatus can initialize by applying this procedure even when a slave apparatus is recognized by the host apparatus at the beginning of a system operation but suddenly stops returning an acknowledge signal ACK due to the error function after some interval.
In
The slave apparatus SC303 recognizes that the ID is its own ID, and then returns an acknowledge signal ACK to the transmission path 304. The other slave apparatuses, SC301 and SC302, do not return an acknowledge signal ACK because the ID does not match their own ID. When the host apparatus HC300 confirms reception of the acknowledge signal ACK from the slave apparatus SC303, the host apparatus HC300 starts to communicate with the slave apparatus SC303 because the slave apparatus SC303 is recognized as a device which holds the authentication ID.
The host apparatus HC300 starts to transmit a specific code to the slave apparatus SC303 which is the device holding authentication ID through the master transmitter-receiver circuit 302 and the transmission path 304. When the device which holds the authentication ID of the slave apparatus SC303 receives the specific code sent from the host apparatus HC300, the device encrypts the specific code and returns it to the host apparatus HC300.
The master transmitter-receiver circuit 302 receives the encrypted code from the slave apparatus SC303 and sends the encrypted code to the host apparatus HC300. The host apparatus, HC300 decrypts the encrypted code and recognizes that the device holding the authentication ID in the battery pack is the requested device. A similar protocol can be applied to identify the battery indicator which is the slave apparatus SC301 and to identify the temperature sensor which is the slave apparatus SC302.
Furthermore, it is implemented generally in a similar way to identify an arbitrary slave apparatus SCk (k=1 to n) through the wire bus and the transmission path 4 (
On the other hand, if a decryption result is not identical to the requested code, the host apparatus HC1 does not set an internal flag F to a high level. The host apparatus HC1 stops supplying a clock signal TCLK after a time period as a result of failure in an identifying process. In this case, the host apparatus HC1 also resets the master transmitter-receiver circuit 2. The host apparatus HC1 implements a next identification process when the host apparatus HC1 recognizes a necessity of a start for the next identification process.
According to the embodiment, using serial communication apparatus 10, the host apparatus HC1 transmits a serial data signal DATA generated by superimposing a master data on a clock signal TCLK to each slave apparatus SC1 to SCn after confirming an ID to specify a designated slave apparatus following a preamble transmission including a plurality of successively repeated data. Thus the host apparatus HC1 of the serial communication system 100 can communicate with the designated slave apparatus out of a plurality of slave apparatuses without using switching mechanism, and a compact and inexpensive system can be achieved.
Numerous additional modifications and variations are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims, the disclosure of this patent specification may be practiced otherwise than as specifically described herein. For example, elements and/or features of different illustrative embodiments may be combined with each other and/or substituted for each other within the scope of this disclosure and appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2004-239706 | Aug 2004 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
3993981 | Cassarino et al. | Nov 1976 | A |
5862354 | Curiger et al. | Jan 1999 | A |
5864872 | Lee et al. | Jan 1999 | A |
5978927 | Curry et al. | Nov 1999 | A |
6108751 | Lee et al. | Aug 2000 | A |
6239732 | Cusey | May 2001 | B1 |
6412072 | Little et al. | Jun 2002 | B2 |
6532506 | Dunstan et al. | Mar 2003 | B1 |
7143215 | Dunstan et al. | Nov 2006 | B2 |
20020101884 | Pohlmeyer et al. | Aug 2002 | A1 |
20040049616 | Dunstan et al. | Mar 2004 | A1 |
Number | Date | Country | |
---|---|---|---|
20060041631 A1 | Feb 2006 | US |