1. Technical Field
The present disclosure relates to communication technology, and particularly to a driver integrated circuit (IC) and method for updating a driving program for single program initiation (SPI) interface using an inter-IC communication (IIC) protocol.
2. Description of Related Art
A liquid crystal display (LCD) is driven by a timing controller (T-Con) IC. T-con IC includes an IIC interface and a SPI interface. A program executed by the T-con IC is stored in a flash storage which is using the SPI interface. T-con IC receives a driving command from a host IC via the IIC interface, and responds to the driving command by calling the program via the SPI interface to drive the LCD to display. However, the host IC does not contain a SPI interface and cannot directly access the flash storage. Thus, the host IC cannot update the program for the T-con IC stored in the flash IC.
Therefore, there is room for improvement within the art.
Many aspects of the embodiments can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present embodiments. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
The host IC 10 includes an IIC interface 11 and an instruction generating module 12. The instruction generating module 12 responds an operation to generate a drive instruction to drive the driver IC 20, and an update instruction to update the program 31. The driving instruction and the update instruction are both in an IIC protocol format. The update instruction includes a written instruction, a read instruction and a stop instruction. In detail, the written instruction is Start+IDw+10h+W1+data1+stop; the read instruction is “Start+IDw+10h+W1+stop and Start+IDw+11h+Start+IDr+data2+stop”; the stop instruction is “Start+IDw+12h+stop”. The 10h, 11h, and 12 h signals are respectively considered as identifying signals of the written, read, and stop instructions.
The IIC interface 21 receives a signal in the IIC protocol format from the host IC 10. The identifying module 23 determines whether the received signal in the IIC protocol format is the update instruction, and identifies whether the update instruction is the written instruction, the read instruction, or the stop instruction. In detail, when the identifying module 23 identifies that the received signal includes the 10h signal but does not includes the 11h signal, the identifying module 23 determines that the received signal is the written instruction. When the identifying module 23 identifies that the received signal includes the 10h and the 11h, the identifying module 23 determines that the received signal is the read instruction. When the identifying module 23 identifies that the received signal includes the 12h signal, the identifying module 23 determines that the received signal is the stop instruction.
The calculating unit 24 converts the update instruction, such as the written, the read, and the stop instruction in the IIC protocol format into a written, read, and the stop instructions in the SPI protocol format according to a predetermined converting rule, and transfers the update instruction in the SPI format to the storage 30 via the SPI interface 22. The written instruction in the SPI protocol format is “S_B_low+W1+data1”; the read instruction in the SPI protocol format is “S_B_low+W1+data1+data2” and the stop instruction in the SPI protocol format is “S_B_high”.
When the received signal is the written instruction in the IIC protocol format, the calculating module 24 converts the “Start+IDw+10h”signal into “S_B_low” signal of the written instruction in the SPI protocol format, converts the “W1” signal into the “W1” signal of the written instruction in the SPI protocol format, and converts “data1” signal into the “data 1” signal of the written instruction in the SPI protocol format.
When the received signal is the read instruction in the IIC protocol format, the calculating module 24 converts the “Start+IDw+10h”signal into “S_B_low” signal of the read instruction in the SPI protocol format, converts the “W1” signal into the “W1” signal of the read instruction in the SPI protocol format, and converts “data 1” signal into the “data 1” signal of the read instruction in the SPI protocol format, and converts the “data 2” signal into the “data 2” signal of the read instruction in the SPI protocol format.
When the received signal is the stop instruction in the IIC protocol format, the calculating module 24 converts the “Start+IDw+12h+stop” signal into “S_B_high” signal of the stop instruction in the SPI protocol format.
Step S301: receiving an instruction in the IIC protocol format from the host IC.
Step S302: determining whether the received instruction in the IIC protocol format contains the identifying signal. When the instruction in the IIC protocol format contains the identifying signal, the process goes to step S303, otherwise the process is ended.
Step S303: identifying the received instruction as an update instruction and analyzing the update instruction.
Step S304: converting the update instruction in the IIC protocol format into an update instruction in the SPI protocol format according to a predetermined rule, and transmitting the update instruction in the SPI protocol format to the storage via the SPI interface.
Even though relevant information and the advantages of the present embodiments have been set forth in the foregoing description, together with details of the functions of the present embodiments, the disclosure is illustrative only; and changes may be made in detail, especially in the matters of shape, size, and arrangement of parts within the principles of the present embodiments to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.
Number | Date | Country | Kind |
---|---|---|---|
2013100356721 | Jan 2013 | CN | national |