1. Field of the Invention
The present invention relates to a video signal processing circuit, but more particularly, to a video signal processing circuit that utilizes a single pin of an integrated circuit to receive a video signal
2. Description of the Prior Art
The above mentioned video signal processing circuit 200 therefore needs two pads and two capacitances. This however, increases the cost of manufacture and reduces usable area of the circuit. The versatility of the video IC is also reduced since two pins of the video IC are occupied for this task. Therefore, a new invention is required to solve these problems.
Therefore, one objective of the present invention is to provide a video signal processing circuit requiring only one pad and one capacitor.
The present invention discloses a video signal processing circuit for processing a video signal with a data signal higher than a blanking level and a sync signal lower than the blanking level. The video processing circuit comprises: a first DC level adjusting circuit, coupled to the video signal, for adjusting a DC level of the video signal to generate a first adjusted video signal; a second DC level adjusting circuit, coupled to the video signal, for adjusting a DC level of the video signal to generate a second adjusted video signal; an analog to digital converter, coupled to the second DC level adjusting circuit, for sampling the data signal according to the second adjusted video signal and a target clock signal; a sync signal separating circuit, coupled to the first DC level adjusting circuit, for separating the sync signal from the first adjusted video signal; a sync signal processor, coupled to the sync signal separating circuit, for detecting an existence of the sync signal, and outputting a sync clock signal according to the sync signal if the sync signal processor detects the existence of the sync signal; a multiplexer, coupled to the analog to digital converter and the sync signal processor, for outputting one of the sync clock signal or a predetermined clock signal as the target clock signal according to a selecting signal; and a processor unit, coupled to the first DC level adjusting circuit, the second DC level adjusting circuit, the analog to digital converter, the sync signal processor and the multiplexer, for controlling the first DC level adjusting circuit, the second DC level adjusting circuit, and for generating the selecting signal.
The present invention also discloses a method for processing a video signal, which processes a data signal higher than a blanking level and a sync signal lower than the blanking level. The method comprises: (a) adjusting a DC level of the video signal to generate a first adjusted video signal; (b) separating the sync signal from the first adjusted video signal; (c) detecting if the sync signal exists; (d) sampling the video signal according to a predetermined clock signal to generate a first sampling result; (e) adjusting the video signal according to the first sampling result to generate a second adjusted video signal if the sync signal is detected in the step (c); (f) sampling the second adjusted video signal according to the predetermined clock signal to generate a second sampling result; (f) adjusting the first adjusted video signal according to the second sampling result to generate a third adjusted video signal; (g) detecting if there is a sync signal in the third video signal, if yes, sampling the second adjusted video signal according to a sync clock signal corresponding to the sync signal of the third adjusted video signal.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain terms are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, electronic equipment manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms “include” and “comprise” are used in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to . . . ”. Also, the term “couple” is intended to mean either an indirect or direct electrical connection. Accordingly, if one device is coupled to another device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
The buffer 309, which is coupled between the second DC level adjusting circuit 307 and the analog to digital converter 311, is used for buffering the video signal VS and the second adjusted video signal VS2. The analog to digital converter 311, which is coupled to the second DC level adjusting circuit 307, is used for sampling the data signal according to the second adjusted video signal VS2, and a target clock signal TCLK. The sync signal separating circuit 303, which is coupled to the first DC level adjusting circuit 301, is used for separating the sync signal SYNC from the first adjusted video signal VS1 and the third adjusted video signal VS3. The sync signal processor 305, which is coupled to the sync signal separating circuit 303, is used for detecting the existence of the sync signal SYNC, and outputting a sync clock signal SYNC-CLK according to the sync signal SYNC if the sync signal processor 303 detects the existence of the sync signal SYNC. The multiplexer 313, which is coupled to the analog to digital converter 311 and the sync signal processor 305, is used for outputting one of the sync clock signal SYNC-CLK, and a predetermined clock signal PCLK, as the target clock signal TCLK according to a selecting signal SS. The processor unit 315, which is coupled to the first DC level adjusting circuit 301, the second DC level adjusting circuit 307, the analog to digital converter 311, the sync signal processor 305 and the multiplexer 313, controls the first DC level adjusting circuit 301, the second DC level adjusting circuit 307, and generates the selecting signal SS.
The above description is only describes the function of each device of the video signal processing circuit 300. Operation of the entire video signal processing circuit 300, will now be described below. This is not intended to limit the scope of the present invention however. People skilled in the art may use a similar structure with a different operation order to obtain the same functionality, which also falls within the scope of the present invention.
First, the predetermined clock PCLK is utilized as the target clock signal TCLK. The second DC level adjusting circuit 307 is initially turned off. The processor unit 315 controls the first DC level adjusting circuit 301 to adjust the DC voltage level of the video signal VS for generating the first adjusted video signal VS1, such that the sync signal of the first adjusted video signal VS1 can be separated from the first adjusted video signal VS1. The analog to digital converter 311 samples the first adjusted video signal VS1 according to the target clock signal TCLK to generate a first sampling result SR1. At this time, a digital code corresponding to the blanking level B is obtained by the analog to digital converter 311. The digital code is sent to the processor unit 221. Then the sync signal processor 305 detects whether a valid sync signal SYNC exists. The sync signal processor 305 uses a first slicing level below the blanking level to detect the sync signal SYNC. After the sync signal processor 305 informs the processor unit 315 the existence of the sync signal SYNC, the processor unit 315 turns on the second DC level adjusting circuit 307 to adjust the video signal VS for the second adjusted video signal VS2, and the analog to digital converter 311 samples the second adjusted video signal VS2 according to the target clock signal TCLK to generate the second sampling result SR2. In this case, the first sampling result SR1 is just rough information for sampling the data signal. The second sampling result SR2 is accurate information for sampling the data signal to obtain the correct video data.
However, the first slicing level is no longer accurate because the DC level of the first adjusted video signal VS1 has been changed. The processor unit 315 informs the sync signal separating circuit 303 to adjust the first slicing level into a second slicing level. The second slicing level is able to correctly detect the sync signal SYNC. Then the sync signal separating circuit 303, separates the sync signal SYNC from the adjusted video signal VS2, and the sync signal processor 305 generates the sync clock signal SYNC-CLK. The processor unit 315 is then informed of the existence of the sync clock signal SYNC-CLK. After that, the processor unit 315 generates the selecting signal SS to select the SYNC clock signal SYNC-CLK as the predetermined clock signal TCLK. Finally, the analog to digital converter 311 samples the second adjusted video signal VS2 according to the predetermined clock signal TCLK (the SYNC clock signal SYNC-CLK according to the adjusted video signal VS2 ) to obtain the correct data. It should be noted that the buffer 309 can be omitted from the video signal processing circuit 300 if the analog to digital converter 311 can sample the first adjusted video signal VS1 and the second adjusted video signal VS2 accurately.
Adjust a DC level of the video signal VS to generate a first adjusted video signal VS1.
Separate the sync signal SYNC from the first adjusted video signal VS1.
Sample the first adjusted video signal VS1 according to a predetermined clock signal PCLK to generate a first sampling result SR1.
Detect if the sync signal SYNC of the first adjusted video signal VS1 exists. If yes, go to step 509, otherwise go back to step 507.
Adjust the first adjusted video signal VS1 according to the first sampling result SR1 to generate a second adjusted video signal VS2.
Sample the second adjusted video signal VS2 according to the predetermined clock signal PCLK to generate a second sampling result SR2.
Detect if the sync signal SYNC of the second adjusted video signal VS2 exists. If yes, go to step 517, otherwise go back to the step 515.
Sample the second adjusted video signal VS2 according to the sync clock signal SYNC-CLK corresponding to the sync signal SYNC of the second adjusted video signal VS2.
The method shown in
According the above-mentioned circuit and method, two DC level adjusting circuits can be jointly coupled to one device for receiving the video signal. Therefore one pin of the video IC can be saved if the circuit and method are utilized for a video IC. The video processing circuit according to the preferred of the present invention can also be applied for other systems or apparatuses except the Video IC.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.