FIELD OF THE INVENTION
[0001] The invention relates to a method of transferring serial data having a predetermined
data length between a control device such as a CPU and a device such as a semiconductor
IC to be controlled by the control device.
BACKGROUND OF THE INVENTION
[0002] A serial interface method is normally used in transferring predetermined data between
a control device such as a CPU and a peripheral device such as an IC.
[0003] A typical serial interface method uses three data lines, including a data line SI
for sending the serial data, a clock (CK) line, and a chip enablement (CE) line. Furthermore,
if it is necessary, for example, to control 8-bit data as it is, an extra signal line
for a data identification flag is needed to distinguish write data from command codes.
Therefore, in total four lines are needed.
[0004] A serial data transfer method, called Inter Integrated Circuit (IIC) bus system,
using only two data lines is also known in the art. In the IIC bus system, a master
device and a multiplicity of IIC bus slave devices are connected via an IIC bus for
exchange of address signals and data signals.
[0005] Fig. 1 shows a data format for use in an IIC bus system. As an example, in recording
data in a predetermined IIC bus slave device via the IIC bus, the IIC bus master device
raised a clock signal SCL to a HIGH level, while pulling data and address signals
(SDA) from a HIGH to a LOW level. This establishes satisfactory conditions for data
transfer, so that the bus master device sends an 8-bit address signal (A7-A1, R/W)
to the IIC bus slave device. The eighth bit of the address signal (which corresponds
to A0 bit) is reserved for a read/write (R/W) bit which specifies a read or a write
operation.
[0006] The IIC bus slave device addressed by the address signal returns an acknowledgment
(ACK) signal to the IIC bus master device by lowering the SDA signal to the LOW level
in the next clock subsequent to the eighth bit. Thus, the bus master device confirms
that the IIC bus slave device is in the normal operating condition.
[0007] Upon receipt of the ACK signal, the IIC bus master device sends an 8-bit SDA data
signal in synchronism with the clock signal SCL, which data signal is received and
stored by the addressed IIC bus slave device. Upon receiving the data correctly, the
addressed IIC bus slave device renders the SDA signal LOW, and returns an acknowledgment
signal ACK. The IIC bus master device, upon receipt of the acknowledgment signal ACK,
pulls up the SDA signals from the LOW to the HIGH level while the clock signal SCL
is HIGH and ends the bussing operation.
[0008] Thus, in the IIC bus system, data transfer can be performed between a IIC bus master
device and an arbitrary IIC bus slave device connected with the bus master device
by means of two data transfer lines.
[0009] However, although such a conventional IIC bus system as mentioned above can transfer
data using only two data lines, it require transfer of data amounting to a total of
18 bits in sending 8-bit data, including 7 bits slave device address and further bits
for a R/W signal and an acknowledgment signal ACK, as shown in Fig. 1. Moreover, in
a case where a further signal must be included to indicate whether the serial data
are data to be written in a device (referred to as write data) or a command code,
additional 8 bits for the signal and a 1 acknowledgment bit, amounting to a total
of 9 bits in a standard 8 bit data format, are needed for this purpose.
SUMMARY OF THE INVENTION
[0010] It is therefore an object of the invention to provide a simple and efficient data
transfer method in which serial data can be transferred, in a reduced data format,
between a control device such as a CPU and a device such as a semiconductor IC to
be controlled by the control device, using only two signal lines as in IIC data transfer
systems.
[0011] Thus, in one aspect of the invention, there is provided a serial data transfer method
utilizing one clock line and one serial data line, comprising steps of:
transferring a predetermined number of serial data bits on said serial data line,
with each bit in synchronism with a rise or a fall of a clock signal on said clock
line;
placing a chip enablement signal in synchronism with a particular fall or rise of
the clock signal associated with a particular one of said data bits; and
determining the range of said serial data based on said chip enablement signal.
[0012] It is noted that in transferring serial data from a control device such as a CPU
to a slave device such as ICs, the chip enablement signal is placed at a predetermined
bit position within the serial data bits, thereby reducing the data length to that
of the serial data passed by two signal lines as in conventional IIC data transfer,
thereby allowing simple yet efficient data transfer.
[0013] A data identification flag to distinguish serial data constituting a command code
from serial data constituting write data may also be placed in the data bit that follows
the chip enablement signal bit in synchronism with the falling or rising clock signal
associated with the data bit.
[0014] The chip enablement signal allows determination of the data range of the sequential
data. The data identification flag allows to distinguish write data from command codes.
[0015] In the data transfer system according to the invention, the above mentioned particular
data bit to which said chip enablement signal is associated may be the second bit
from the last in the serial data. This assures detection of the chip enablement signal.
[0016] The serial data bits may be sequentially read in and stored in registers by shifting
the data bits in synchronism with the rising or fall clock signal. The serial data
may be retrieved after the predetermined range of data bits are shifted in the registers
following the detection of the chip enablement signal.
[0017] It should be appreciated that signals received are sequentially shifted in the registers
and stored therein without querying whether the signals are valid sequential data
or not, and that the serial data are retrieved when its validity is verified, thereby
assuring receipt of the serial data by the addressed slave device in a simple and
safe manner.
[0018] In cases where one-way data transfer is required, serial data transfer method of
the invention is particularly useful.
BRIEF DESCRIPTION OF THE DRAWINGS
[0019]
Fig. 1 shows a data format for a conventional IIC bus system.
Fig. 2 shows a concept of a data transfer system according to the invention.
Fig. 3 shows a data format suitable for data transfer according to the invention.
Fig. 4 shows a circuit for use in data transfer according to the invention.
Fig. 5 shows a timing chart for use in data transfer according to the invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
[0020] Referring to Figs. 2 and 3, there is shown a concept of data transfer according to
the invention and data format therefor, respectively. Referring to Fig. 2, a CPU 11
serving as a control device supplies serial data SI and serial clock signals SCK to
an IC 14 of a peripheral display device, using two serial signal lines 12 and 13.
In the example shown herein, the data transfer is performed in one-way, so that the
display IC 14 only receives the data.
[0021] The data format shown in Fig. 3 is defined in terms of serial data SI and serial
clock signal SCK.
[0022] In the example shown herein, the serial data SI comprises a sequence of 8 data bits
D7 through D0. Each bit of the data D7-D0 is placed in a first half segment of the
bit so that it is synchronized to a rising clock signal. It is noted that the level
of each bit of the serial data D7-D0 is LOW during the second half segment of the
bit in correspondence with the fall of the clock signal.
[0023] A chip enablement signal CE is provided to determine the data range of the serial
data, and a data identification flag C/D is provided to distinguish serial data constituting
a command code from serial data constituting write data. The chip enablement signal
CE is placed in the second half segment of the seventh bit D1 of the serial data bits
D7-D0, while the data identification flag C/D is placed in the second half segment
of the eighth bit D0.
[0024] The serial data SI, cast in the data format as described above, and the serial clock
signal SCK are sent from the CPU 11 to the display IC 14 through the serial signal
lines 12 and 13, respectively.
[0025] The display IC 14 receives the transferred data as follows.
[0026] In synchronism with a rise of the clock signal, the levels (either HIGH or LOW) of
each first half segment of the latest bits, where data bits D7-D0 are embedded, is
read in registers for at least one data length of the serial data. This causes the
read data bits to be shifted through the registers. The level (either HIGH or LOW)
of the bit in the second half segment of each data bit of the serial data SI is also
read at every fall of the clock signal SCK to find a chip enablement signal CE placed
in serial data.
[0027] If the level changes from LOW to HIGH during the falling clock SCK, the HIGH level
portion of the bit is identified as the chip enablement signal. Since the chip enablement
signal CE is placed in the second half segment of the seventh data bit D1, the serial
data D7-D0 are identified to be the 7 bits that precedes the CE bit plus a subsequent
1 bit.
[0028] Then the status of the data identification flag C/D is checked by determining the
level of the data identification flag in the next falling clock signal SCK. If the
level is HIGH, the sequence of data D7-D0 is identified as a command code, but otherwise
the data are identified as write data (data to be written in the peripheral device).
[0029] After the identification of the flag C/D and before the next rise of the clock pulse
SCK, the serial data D7-D0 are stored in internal registers of the display IC in accordance
with the status of the data identification flag C/D. Then the chip enablement signal
CE and the data identification flag C/D are cleared since they have now finished their
roles.
[0030] Subsequently, similar storage, verification, and retrieval processing of the serial
data are performed for the display IC 14 to obtain necessary data.
[0031] It is noted that the sequential data bits are not recognized as valid serial data
SI unless a chip enablement signal having a HIGH level is detected for the serial
data bits during the fall of a certain clock pulse SCK. Invalid bits will not be accepted
by the display IC 14.
[0032] As describe above, the invention provides the data format in which serial data D7-D0
has a predetermined number of sequential data bits synchronized with the rising edges
of the clock signal SCK, and a chip enablement signal CE within the serial data in
synchronism with the fall of a clock pulse associated with the data bit D1, the chip
enablement signal CE determining the data range of the serial data D7-D0 with reference
thereto.
[0033] Provided in association with the fall of the clock signal SCK associated with the
data bit subsequent to the chip enablement signal CE, is a data identification flag
C/D for determining if the serial data D7-D0 is a command code or write data.
[0034] Thus, serial data transfer can be accomplished using only one signal line 12 for
the serial data SI and another signal line 13 for the clock signal SCK by including
a data identification flag C/D within the serial data D7-D0 to determine if the serial
data constitute a command code or write data.
[0035] Referring to Fig. 4, there is shown an exemplary circuit for use in the display IC
14 suitable for receiving serial data in the data format as described above. Fig.
5 is a timing chart for the circuit of Fig. 4. As shown in Fig. 5, the serial data
SI and the serial clock signal SCK are placed on the signal lines 12 and 13 by the
CPU 11 controlling the circuit.
[0036] Coming back to Fig. 4, each of D type flip-flops DF1-DF18, equipped with a reset
terminal R, reads data during a rise of clock signal entered to its clock terminal
CLK, and is reset by a low level reset signal entered at the reset terminal R. A flip-flop
DF19 also has a set terminal S. The flip-flop DF19 reads in data entered at a rise
of the clock signal CLK, and is set by a LOW set signal entered at the terminal S.
Inverters IV1 through IV7 are provided, coupled with NOR gates NR1 and NR2 as shown.
A line RESET is provided in the display IC 14 to supply reset signals as needed by
the IC 14.
[0037] The serial data transfer method of the invention will now be described by way of
example shown in Figs. 4 and 5.
[0038] Entering the system in synchronism with the clock signal SCK, each bit of the serial
data SI is sequentially read in the flip-flop DF1 at a rise of the clock signal SCK
and is shifted to the further flip-flops at the subsequent rises of the clock signal
SCK. The serial data SI are thus read in and shifted through the flip-flops DF1-DF8.
[0039] If a data bit of the serial data SI has a LOW level during a rise of inverted serial
clock signal

, the Q output of the D type flip-flop DF17 is LOW, the output of the inverter IV6
is HIGH, the output of the inverter IV7 is LOW, the Q output of the D type flip-flop
DF18 is LOW, the

output of the D type flip-flop DF18 is HIGH, the output of the NOR gate NR1 is HIGH,
and the output of the NOR gate NR2 is LOW.
[0040] Consequently, the D type flip-flops such as DF17, DF18, and DF19 will not change
their conditions, so that the serial data SI distributed in the first half segments
of the data bits are sequentially read in and shifted through the flip-flops DF1-DF8.
The data that has passed the last D type flip-flop DF8 will be shifted away to disappear.
[0041] After the last data bit D1 of the serial data SI has been read in, if the level of
the serial data SI is HIGH at the rise of the next inverted clock signal

, indicating that a chip enablement signal CE exists in the second half segment of
the data bit for D1, the D type flip-flop DF17 is inverted, generating a HIGH signal
at its Q output terminal and a LOW signal at its

output terminal, while the inverter IV6 pulls its output level from HIGH to LOW.
Therefore, the D type flip-flops DF9-DF16 will not read in the data from the flip-flops
DF1-DF8, since the former flip-flops are adapted to read the data at the rise of a
clock signal CLK.
[0042] Subsequently, as the data bit D0 of the serial data SI is read in, the D type flip-flops
DF1-DF8 now have the entire serial data D7-D0 registered therein. At the rise of the
next inverted serial clock signal

, the

output of the D type flip-flop DF17 is inverted by the inverter IV7, going from LOW
to HIGH, which is latched in the D type flip-flop DF18. The flip-flop DF18 then generates
a HIGH Q output and a LOW

output.
[0043] As the Q output of the D type flip-flop DF18 goes HIGH, a reset signal is supplied
via the NOR gate NR1 to the reset terminals R of the D type flip-flops DF17 and DF18
to reset these flip-flops.
[0044] Resetting the D type flip-flops DF17 and DF18 causes the inverter IV6 to pull up
its output level from LOW to HIGH, which is supplied to the clock terminals of the
D type flip-flops DF9-DF16 as a rising signal for them to read in the serial data
D7-D0 from the D type flip-flops DF1-DF8.
[0045] On the other hand, the LOW

output of the D type flip-flop DF18 and the LOW serial clock signal SCK are supplied
to the clock input terminal CLK of the D type flip-flop DF19 via the NOR gate NR2,
so that the current condition of the serial data SI, i. e. the status of the data
identification flag C/D appearing at the data input terminal D of the flip-flop DF19,
is read into the D type flip-flop DF18. As a result, the data identification flag
C/D is output from the

output terminal of the D type flip-flop DF18.
[0046] The serial data D7-D0 stored in the D type flip-flops DF9-DF16 and the data identification
flag C/D stored in the D type flip-flop DF19 are supplied to an appropriate section
of the display IC 14.
[0047] Subsequently, a reset signal is supplied to the reset terminal RESET prior to the
rise of the next serial clock signal SCK, to thereby initializing the circuit and
wait for the next serial data.
[0048] As described above, the serial data transfer of the invention utilizes two signal
lines for supplying a serial clock signal SCK and serial data SI, in which serial
data bits D7 -D0 are sequentially entered in D type flip-flops DF1-DF8 by reading
and shifting the serial data bits in synchronism with rise of the clock signal. A
data bit that is HIGH during the fall of the clock signal SCK is identified as a chip
enablement signal CE, which is used to determine the data range of the serial data
by defining the data bit that precedes the CE bit by 7 bits as the leading data bit
D7, and hence identifying the 8 bits that follow the bit D7 as the valid serial data
SI.
[0049] The level of the data bit subsequent to the chip enablement signal CE during the
fall of the next clock signal SCK is regarded as a data identification flag C/D to
distinguish serial data D7-D0 constituting a command code from serial data D7-D0 constituting
write data, depending on the level (HIGH or LOW) of the data identification flag.
Subsequent to the recognition of the data identification flag C/D, the serial data
D7-D0 are temporarily stored in internal registers until the next rise of the clock.
The chip enablement signal CE and the data identification flag C/D are then cleared.
[0050] It will be appreciated that, in accordance with the invention, efficient one-way
serial data transfer may be carried out using only two transmission lines, which is
faster than conventional IIC bus data transfer. This is the case especially when the
serial data constitute write data to a display. For example, in writing in a display
panel having 128 × 128 dots with 8-bit serial data, the inventive serial data transfer
requires a total of 16,384 clock pulses. In contrast, a conventional IIC bus data
transfer will requires a total of 18,441 clock pulses {7 (slave addresses) + 1 (R/W
command) + 1 (ACK signal) + 2,048 × (8 (bit per data) + 1 (ACK signal))}, with neglect
of all write commands.
[0051] Convention one-way serial data transfer can be controlled by 16,384 clock pulses,
provided that four signal lines are available for the data transfer.
[0052] It will be apparent to a person of skill that the data length is not limited to 8
bits, but instead it can be of any arbitrary length.
[0053] It will be also apparent to a person of skill that, contrary to the example described
above, the serial data can be read in at the falling edges of the clock signal SCK
and the chip enablement signal and the data identification flag C/D may be obtained
at rising edges of the clock pulses SCK.
1. A serial data transfer method utilizing a clock line and a serial data line, comprising
steps of:
transferring a predetermined number of serial data bits on said serial data line,
with each bit in synchronism with a rise or a fall of a clock signal on said clock
line;
placing a chip enablement signal in synchronism with a particular fall or rise of
the clock signal associated with a particular one of said data bits; and
determining the range of said serial data based on said chip enablement signal.
2. The serial data transfer method according to claim 1, wherein said particular one
of said data bits, to which said chip enablement signal is associated, is the second
bit from the last.
3. The serial data transfer method according to claim 2, wherein said serial data bits
are sequentially read in and stored by shifting the bits in synchronism with said
rise or fall of said clock signal, and wherein after said shifting of said serial
data subsequent to the detection of said chip enablement signal, said serial data
are retrieved.
4. The serial data transfer method according to claim 3, wherein said data are transferred
in one way.
5. A serial data transfer method utilizing a clock line and a serial data line, comprising
steps of:
transferring a predetermined number of serial data bits on said serial data line,
with each bit in synchronism with a rise or a fall of a clock signal on said clock
line;
placing a chip enablement signal in synchronism with a particular fall or rise of
the clock signal associated with a particular one of said data bits;
placing a data identification flag in the data bit that follows said chip enablement
signal in synchronism with the fall or rise of the clock signal associated with said
data bit, said data identification flag to distinguish serial data constituting a
command code from serial data constituting write data;
determining the range of said serial data based on said chip enablement signal.
6. The serial data transfer method according to claim 5, wherein said particular one
of said data bits, to which said chip enablement signal is associated, is the second
bit from the last.
7. The serial data transfer method according to claim 6, wherein said serial data bits
are sequentially read in and stored by shifting the bits in synchronism with said
rise or fall of said clock signal, wherein after said shifting of serial data subsequent
to the detection of said chip enablement signal, said serial data are retrieved.
8. The serial data transfer method according to claim 7, wherein data are transferred
in one way.