1309719 (1) 九、發明說明 【發明所屬之技術領域】 本發明係關於檢測影像感測器訊號輸出接腳保護二極 體之方法及裝置。 【先前技術】 近年來,影像感測器積體電路1C大量應用於各式各 樣的電子產品中,例如數位相機、行動電話、筆記型電腦 相機、USB相機、等等。在影像感測器1C應用於或安裝 於電子產品時,保護二極體是非常重要的部份。假使保護 二極體故障(短路),則某些功能也會故障,所以,在製 造產品時,檢查保護二極體是否正常是非常重要的。 參考圖1 ,說明一般用於影像感測器積體電路1C的 二極體保護電路配置。圖la顯示二極體保護電路配置的 一實施例,如同所示,一二極體連接在Vcc與輸出之間, 另一二極體連接在接地與輸出接腳之間。圖lb顯示二極 體保護電路配置的另一實施例,如同所示,僅有一二極體 連接在接地與輸出接腳之間。 以往’爲了測試保護二極體是否正常,會使用大型的 硬體式開路/短路測試機,既佔空間又耗時。舉例而言, 在測試具有10支接腳的影像感測器1C的情形中,假使要 測試接腳1 ,將正電壓供給接腳1,並將其它接腳2至10接 地,然後量測流經接腳1的電流,接著,將接腳1接地,將 接腳2至10連接至電流源,然後,量測接腳1的壓降,如 4 - (4) 1309719 ,以及,將預定計數値爲614400。 【實施方式】 將於下參考附圖,說明根據本發明的實施例。 首先’說明影像感測器IC。一般而言,影像感測器 1C會提供資料匯流排/框有效/線有效/像素時脈等訊 號,以及,某些影像感測器具有數位訊號處理功能(DSP )。舉例而言,圖2顯示一影像感測器1C 201的腳位圖, 其中,接腳l(HSYNC)相當於線有效訊號之輸出接腳,接 腳21(VSYNC)相當於框有效訊號之輸出接腳,接腳18相當 於像素時脈訊號的輸出接腳,而接腳3、4、10至13、38、 3 9係相當於8位元資料匯流排的輸出,其中,以DO、D1、 D2、D3、D4、D5、D6、D7代表8位元中的個glj位元,而 接腳3及4分別爲D4及D5的輸出,接腳10至13分別爲位元 D3至DO的輸出,接腳38及39分別爲D7及D6的輸出。此 處,以8位元的感測器1C爲例以說明下述根據本發明的實 施例,當然,本發明亦可應用於例如4位元、16位元、32 位元等不同位元的影像感測器1C。 接著,說明根據本發明的實施例之檢測用於影像感測 器的輸出接腳之保護二極體的方法。 首先,如圖3所示,將待測的影像感測器1 c 3 0 1設於 感測器板302上,而感測器板302會經由例如USB控制器 等連接介面303而連接至例如個人電腦304。如此’完成用 於測試之連接。 -7 - (5) 1309719 接著,參考圖4,說明根據本發明之檢測影像感測器 1C的保護二極體之實施例。如圖4所示,在步驟401中, 取得影像感測器之相關輸出資料,這些資料包含多個不同 顏色的線有效訊號、框有效訊號、像素時脈訊號、資料匯 流排訊號。舉例而言,取得如圖5所示的一行8個不同顏色 的資料。接著,將代表8個顏色的線寬度之線有效訊號與 預定値比較,此處,將每一顏色預定爲80個像素寬,所以 ,總共8個顏色的預定寬度爲64〇個像素,此640個像素寬 即爲預定的線寬度値,當線有效訊號的値不等於此預定値 時,即代表用於線有效訊號的輸出接腳之保護二極體故障 ,若等於預定値時,代表正常。當然,預定寬度可以隨選 取的顏色數目及每一顏色的預定寬度而定,舉例而言,在 每一顏色寬度預定値爲k個像素且總共n個顏色的情形中 ,預定値= kxnx2。 繼續進行至下一步驟4〇3,檢查影像高度,亦即檢查 框有效訊號的値。在如圖5所示的彩色條狀圖中,每一顏 色的高度均預設爲480個像素高。因此,如果框有效訊號 的値的不等於480個像素高度,即代表用於該接腳的保護 二極體故障。此處,影像的預設高度雖爲480個像素高, 但是,影像的預設高度値可以依使用者之需求而定。 然後,進行至步驟4〇4,檢查像素時脈計數器的計數 。由於在顯示影像時,可依選定的影像寬度及高度,而產 生多個像素時脈,像素計數器會計數所產生的像素時脈數 目。舉例而言,在如圖5所示的8種顏色的情形中,根據本 (6) 1309719 貫施例,會產生640x 480 x 2 = 614400個像素時脈,其中 ’ 64〇係影像寬度,480係影像高度。在此情形中,像素時 脈計數器的計數應爲6 i 4400。因此,當檢查像素時脈計數 器中的値不等於此値時,即代表用於像素時脈輸出接腳的 保護二極體故障。 接著,進行至步驟4 0 5,檢查資料匯流排的各位元接 腳之保護二極體是否故障。由於保護二極體故障時,則受 其保護之輸出接腳的輸出訊號總是一直維持高位準(Hi)或 低位準(Lo),亦即一直維持〇或i,而不會有高低位準的變 化’亦即’ 0或1的變化。因此,依照資料滙流排的各個位 元是否有〇與1的變化,即可判斷相關接腳的保護二極體是 否故障。要在顯示器上產生一顏色時,影像感測器1C基 本上需要傳送三種資訊,分別爲亮度資訊(Y)、藍色色差 資訊(Cb)、紅色色差資訊(Cr)。因此,在如圖5所示的8 種顏色影像的顯示情形中,資料匯流排就會輸出8 X 3 = 24 個不同的資料値,利用此24個不同的數値,可以容易地偵 測8位元資料匯流排的狀態。舉例而言,在紅色影像時, 其各訊號的輸出値及對應的各位元値如表1所示: 表1 D7 D6 D5 D4 D3 D2 D 1 DO Y=0x4e 0 1 0 0 1 1 1 0 Cb = 0 X 6 6 0 1 1 0 0 1 1 0 Cr = 0x ce 1 1 0 0 1 1 1 0 -9 - (7) (7)1309719 在表1中,Y、Cb、Cr的値均爲十六進位’而各位元 D0至D7的値係〇或1之二進位値。 由表1中可知,在正常情況中,影像感測器輸出紅色 時,代表三個基本訊號Y、Cb、Cr的正別値分別爲0x4e 、0x66、及Oxce。接著,參考圖6所示的堪誤檢查表。在 圖6中,以紅色輸出爲例,如上所述,Y的正常値爲0x4e ,如果DO至D7中的一位元的保護二極體故障時,則Y的 値分別爲0x4f、0x4c、...Oxce。因此,當紅色的Y値不等 於預定値時,即代表這8個位元可能有位元故障,若所收 到的Y値可在堪誤檢查表找到,則可判斷那一位元故障, 若無,則繼續在紅色的Cb値、或Cr値之堪誤檢查表中搜 尋。注意,如果收到的代表一顏色之各訊號値等於預定的 資料値,並不代表資料匯流排的各位元接腳之保護二極體 正常,但是,若二者不相等時,即代表可能至少一位元的 接腳之保護二極體故障,因此,需要對其它顏色,根據堪 誤表來執行比較,如此,將可正確地找出不正常的接腳。 因此,依照上述方式,將各顏色的訊號値與堪誤表相 比較,來檢測這8個位元的保護二極體是否故障。較佳地 ’總共使用8個顏色訊號,即可可靠地檢測這8個位元的保 護二極體是否故障。 根據本發明,可以快速地、可靠地檢測影像感測器的 保護二極體是否故障。根據本發明,直接採用比對方法, 僅需使用簡單的連接硬體及個人電腦,在一顯示畫面上就 可以判斷1C所有腳位是否正常,不需笨重、佔空間的機 -10 - (8) 1309719 亦不需繁瑣耗時的開路/短路測試。因此,可以大幅 提高工作效率、降低成本。 在上述中,已參考較佳實施例特別地顯示及說明本發 B月’但是’習於此技藝者在不悖離發明的範圍及精神之下 ’可以作不同的改變及修改。因此,發明的範圍僅由後附 之申請專利範圍所決定。 【圖式簡單說明】 圖1 a及lb係分別顯示用於影像感測器1C的二極體保 護電路。 圖2係顯示影像感測器ic的腳位圖,用於根據本發明 的實施例說明之用。 圖3係方塊圖,顯示根據本發明的一實施例之連接方 式。 圖4係流程圖,說明根據本發明的一實施例之測試方 法。 圖5係顯示根據本發明的一實施例之不同顏色訊號顯 示時的寬度、高度、以及各顔色的亮度(γ)、藍色(Cb)、 紅色(C〇訊號的正常値。 圖ό係根據本發明的一實施例之圖5所示的各顏色的堪 誤檢查表。 【主要元件符號說明】1309719 (1) EMBODIMENT DESCRIPTION OF THE INVENTION [Technical Field] The present invention relates to a method and apparatus for detecting an image sensor output pin protection diode. [Prior Art] In recent years, the image sensor integrated circuit 1C has been widely used in various electronic products such as digital cameras, mobile phones, notebook computers, USB cameras, and the like. Protecting the diode is a very important part when the image sensor 1C is applied to or mounted on an electronic product. If the protection diode is faulty (short circuit), some functions may also malfunction. Therefore, it is very important to check whether the protection diode is normal when manufacturing the product. Referring to Fig. 1, a configuration of a diode protection circuit generally used for the image sensor integrated circuit 1C will be described. Figure la shows an embodiment of a diode protection circuit configuration. As shown, one diode is connected between Vcc and the output, and the other diode is connected between ground and output pins. Figure lb shows another embodiment of a diode protection circuit configuration, as shown, with only one diode connected between the ground and the output pins. In the past, in order to test whether the protection diode is normal, a large-scale hard-circuit open/short tester was used, which was both space-consuming and time-consuming. For example, in the case of testing an image sensor 1C having 10 pins, if the pin 1 is to be tested, a positive voltage is supplied to the pin 1, and the other pins 2 to 10 are grounded, and then the flow is measured. After the current of pin 1, then, pin 1 is grounded, pins 2 to 10 are connected to the current source, and then the voltage drop of pin 1 is measured, such as 4 - (4) 1309719, and the predetermined count will be The 値 is 614400. [Embodiment] An embodiment according to the present invention will be described below with reference to the drawings. First, the image sensor IC will be described. In general, the image sensor 1C provides signals such as data bus/frame active/line active/pixel clock, and some image sensors have digital signal processing (DSP). For example, FIG. 2 shows a pin map of an image sensor 1C 201, wherein the pin l (HSYNC) is equivalent to the output pin of the line valid signal, and the pin 21 (VSYNC) is equivalent to the output of the frame valid signal. The pin 18 is equivalent to the output pin of the pixel clock signal, and the pins 3, 4, 10 to 13, 38, 3 9 are equivalent to the output of the 8-bit data bus, wherein DO, D1 D2, D3, D4, D5, D6, D7 represent glj bits in 8-bit, while pins 3 and 4 are outputs of D4 and D5, respectively, and pins 10 to 13 are bits D3 to DO, respectively. Output, pins 38 and 39 are the outputs of D7 and D6, respectively. Here, the 8-bit sensor 1C is taken as an example to illustrate the following embodiments according to the present invention. Of course, the present invention can also be applied to different bits such as 4-bit, 16-bit, 32-bit, etc. Image sensor 1C. Next, a method of detecting a protective diode for an output pin of an image sensor according to an embodiment of the present invention will be described. First, as shown in FIG. 3, the image sensor 1 c 301 set to be tested is disposed on the sensor board 302, and the sensor board 302 is connected to the interface 303 via, for example, a USB controller or the like. Personal computer 304. So 'complete the connection for testing. -7 - (5) 1309719 Next, an embodiment of the protective diode for detecting the image sensor 1C according to the present invention will be described with reference to FIG. As shown in FIG. 4, in step 401, related output data of the image sensor is obtained, and the data includes a plurality of line effective signals, frame valid signals, pixel clock signals, and data bus signals of different colors. For example, a row of 8 different colors of data as shown in FIG. 5 is obtained. Next, a line effective signal representing a line width of 8 colors is compared with a predetermined ,, where each color is predetermined to be 80 pixels wide, so a predetermined width of a total of 8 colors is 64 像素 pixels, this 640 The pixel width is the predetermined line width 値. When the line valid signal is not equal to the predetermined 値, it represents the protection diode fault of the output pin for the line valid signal. If it is equal to the predetermined 値, it represents normal. . Of course, the predetermined width may depend on the number of colors selected and the predetermined width of each color. For example, in the case where each color width is predetermined to be k pixels and a total of n colors, the predetermined 値 = kxnx2. Proceed to the next step 4〇3 to check the image height, that is, check the valid signal of the frame. In the color bar graph shown in Fig. 5, the height of each color is preset to be 480 pixels high. Therefore, if the 有效 of the valid signal of the frame is not equal to 480 pixels in height, it means that the protection diode for the pin is faulty. Here, the preset height of the image is 480 pixels high, but the preset height of the image can be determined according to the needs of the user. Then, proceed to step 4〇4 to check the count of the pixel clock counter. Since a plurality of pixel clocks are generated depending on the selected image width and height when displaying an image, the pixel counter counts the number of generated pixel clocks. For example, in the case of the eight colors shown in FIG. 5, according to the (6) 1309719 embodiment, a 640x 480 x 2 = 614400 pixel clock is generated, where '64 影像 image width, 480 The image height. In this case, the count of the pixel clock counter should be 6 i 4400. Therefore, when the 値 in the pixel clock counter is not equal to this ,, it represents a protection diode failure for the pixel clock output pin. Next, proceed to step 405 to check if the protection diode of each of the element pins of the data bus is faulty. When the protection diode is faulty, the output signal of the output pin that is protected by it always maintains a high level (Hi) or a low level (Lo), that is, it maintains 〇 or i, and there is no high or low level. The change 'is also a '0 or 1 change'. Therefore, according to whether the bits of the data bus have a change of 〇 and 1, it can be judged whether the protection diode of the relevant pin is faulty. To generate a color on the display, the image sensor 1C basically needs to transmit three kinds of information, namely brightness information (Y), blue color difference information (Cb), and red color difference information (Cr). Therefore, in the display case of the eight color images as shown in FIG. 5, the data bus will output 8 X 3 = 24 different data frames, and the 24 different numbers can be easily detected. The status of the bit data bus. For example, in the case of a red image, the output 値 of the respective signals and the corresponding elements are as shown in Table 1: Table 1 D7 D6 D5 D4 D3 D2 D 1 DO Y=0x4e 0 1 0 0 1 1 1 0 Cb = 0 X 6 6 0 1 1 0 0 1 1 0 Cr = 0x ce 1 1 0 0 1 1 1 0 -9 - (7) (7) 1309719 In Table 1, the 値 of Y, Cb, and Cr are all ten The hexadecimal digits and the digits of the D0 to D7 are either 値 or 1 进. As can be seen from Table 1, in the normal case, when the image sensor outputs red, the positive values of the three basic signals Y, Cb, and Cr are 0x4e, 0x66, and Oxce, respectively. Next, referring to the error check list shown in FIG. In Fig. 6, taking the red output as an example, as described above, the normal 値 of Y is 0x4e. If the protection diode of one bit in DO to D7 fails, the 値 of Y is 0x4f, 0x4c, respectively. ..Oxce. Therefore, when the red Y値 is not equal to the predetermined defect, it means that the 8 bits may have a bit failure. If the received Y値 can be found in the error checklist, the one-bit failure can be judged. If not, continue searching in the red Cb値, or Cr値 erroneous checklist. Note that if the received signal representing a color is equal to the predetermined data, it does not mean that the protection diodes of the data pins of the data bus are normal, but if the two are not equal, it means that at least The one-pin pin protects the diode from malfunctioning. Therefore, it is necessary to perform comparisons on other colors according to the error table. Thus, the abnormal pins can be correctly found. Therefore, in accordance with the above method, the signal 値 of each color is compared with the error table to detect whether the protection diodes of the eight bits are malfunctioning. Preferably, a total of eight color signals are used to reliably detect whether the eight-bit protection diode is malfunctioning. According to the present invention, it is possible to quickly and reliably detect whether or not the protection diode of the image sensor is malfunctioning. According to the present invention, the comparison method is directly used, and only a simple connection hardware and a personal computer are needed, and it is possible to judge whether all the positions of the 1C are normal on a display screen, and it is not necessary to be bulky and occupying space - 10 - (8 1309719 There is no need for cumbersome open/short test. Therefore, work efficiency and cost can be greatly improved. In the above, the present invention has been specifically shown and described with reference to the preferred embodiments. However, various changes and modifications may be made without departing from the scope and spirit of the invention. Therefore, the scope of the invention is only determined by the scope of the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 a and lb show a diode protection circuit for an image sensor 1C, respectively. Figure 2 is a diagram showing the footprint of image sensor ic for use in accordance with an embodiment of the present invention. Figure 3 is a block diagram showing a connection method in accordance with an embodiment of the present invention. Figure 4 is a flow diagram illustrating a test method in accordance with an embodiment of the present invention. FIG. 5 is a diagram showing the width, height, and brightness (γ), blue (Cb), and red (the normal 値 of the C 〇 signal) of different color signals when displayed according to an embodiment of the present invention. An error check table for each color shown in Fig. 5 according to an embodiment of the present invention. [Description of main component symbols]
3 Ο 1 :影像感測器I C -11 - 1309719 (9) 302 :感測器板 3 0 3 :連接介面 304 :個人電腦3 Ο 1 : Image sensor I C -11 - 1309719 (9) 302 : Sensor board 3 0 3 : Connection interface 304 : PC