This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LM98725 black calibration

Other Parts Discussed in Thread: LM98725

Hello!

We try to use AFE LM98725. We have some trouble with black calibration ("Black Calibration Only").

According to the documentation (Revision H), registor "Calibration # Lines" (Page[2], Addr [1] registor map) must set number of lines for calibration. We set infinity calibration (# Lines = 255), but it does not work continuously. We use RGB linear sensor with three lines. Initially (immediately after calibration is run), the level of black pixels in our RGB sensor is set by "Black Target" registor, but it does not hold over time (especially for blue line). The sensor's black level moves from "Black Target" with over time. So, we have to permanently restart calibration for holding black level on "Black Target". We have to regularly toggle pin CAL (or send SPI messages) for run calibration continuously.
We use old revision of AFE with brand NS (not Texas Instruments).
May be this reason? If no, how we can run black calibration with infinity mode?

Thanks.

  • Hi Elnur,
    Sorry about the delay in responding to your question.

    I've contacted somebody more familiar with the LM98725 about your question, but he won't be back in office until tomorrow Friday.
    I'll make sure I get a response from him and post it here when he returns to office.

    Regards,
    Hooman
  • Hi Elnur,

    In order to help you with your question, could you please provide / attach the datasheet for the CCD sensor, and the current LM98725 register settings (it could be a text or Excel file) you are using?

    If you cannot send the entire sensor datasheet, you could just provide the pixel information similar to what is shown in the diagram below (Optical Black pixels, Valid Photocell pixels, etc):

    Regards,

    Hooman

  • Hi Hooman,

    Thank you for your answer.

    Ofcourse I can send CCD datasheet and register settings.

    Register settings:


    // page 0

    SPI_Send_Cam(0, 0x00, pinnum);
    SPI_Send_Cam(1, 0x40, pinnum);
    SPI_Send_Cam(2, 0xC2, pinnum);
    SPI_Send_Cam(3, 0x46, pinnum);
    SPI_Send_Cam(4, 0x08, pinnum);
    SPI_Send_Cam(5, 0x40, pinnum);
    SPI_Send_Cam(8, 0x04, pinnum);
    SPI_Send_Cam(9, 0x14, pinnum);
    SPI_Send_Cam(10, 0x04, pinnum);
    SPI_Send_Cam(11, 0x14, pinnum);
    SPI_Send_Cam(12, 0x04, pinnum);
    SPI_Send_Cam(13, 0x14, pinnum);
    SPI_Send_Cam(14, 0x18, pinnum);
    SPI_Send_Cam(15, 0x28, pinnum);
    SPI_Send_Cam(16, 0x18, pinnum);
    SPI_Send_Cam(17, 0x28, pinnum);
    SPI_Send_Cam(18, 0x18, pinnum);
    SPI_Send_Cam(19, 0x28, pinnum);
    SPI_Send_Cam(20, 0x06, pinnum);
    SPI_Send_Cam(21, 0x18, pinnum);
    SPI_Send_Cam(31, 0x01, pinnum); // go to the page 1

    // page 1
    SPI_Send_Cam(0, 0x00, pinnum);
    SPI_Send_Cam(1, 0x61, pinnum);
    SPI_Send_Cam(2, 0x61, pinnum);
    SPI_Send_Cam(3, 0x61, pinnum);
    SPI_Send_Cam(4, 0x90, pinnum);
    SPI_Send_Cam(5, 0x00, pinnum);
    SPI_Send_Cam(6, 0x90, pinnum);
    SPI_Send_Cam(7, 0x00, pinnum);
    SPI_Send_Cam(8, 0x76, pinnum);
    SPI_Send_Cam(9, 0x00, pinnum);
    SPI_Send_Cam(10, 0x90, pinnum);
    SPI_Send_Cam(11, 0x00, pinnum);
    SPI_Send_Cam(12, 0x90, pinnum);
    SPI_Send_Cam(13, 0x00, pinnum);
    SPI_Send_Cam(14, 0x76, pinnum);
    SPI_Send_Cam(15, 0x00, pinnum);
    SPI_Send_Cam(31, 0x02, pinnum); // to page 2

    // page 2
    SPI_Send_Cam(0, 0x00, pinnum);
    SPI_Send_Cam(1, 0xFF, pinnum);
    SPI_Send_Cam(2, 0x0D, pinnum);
    SPI_Send_Cam(3, 0x00, pinnum);
    SPI_Send_Cam(6, 0x01, pinnum);
    SPI_Send_Cam(7, 0x02, pinnum);
    SPI_Send_Cam(8, 0x06, pinnum);
    SPI_Send_Cam(10, 0x10, pinnum);
    SPI_Send_Cam(11, 0x08, pinnum);
    SPI_Send_Cam(12, 0x42, pinnum);
    SPI_Send_Cam(13, 0x08, pinnum);
    SPI_Send_Cam(14, 0x78, pinnum);
    SPI_Send_Cam(31, 0x03, pinnum); // to page3

    // page 3
    SPI_Send_Cam(0, 0x014, pinnum);
    SPI_Send_Cam(1, 0x0A, pinnum);
    SPI_Send_Cam(2, 0x0A, pinnum);
    SPI_Send_Cam(3, 0x00, pinnum);
    SPI_Send_Cam(31, 0x04, pinnum); // to page 4

    // page 4
    SPI_Send_Cam(0, 0x01, pinnum);
    SPI_Send_Cam(1, 0x01, pinnum);
    SPI_Send_Cam(2, 0x01, pinnum);
    SPI_Send_Cam(31, 0x05, pinnum); // to page 5

    // page 5
    SPI_Send_Cam(0, 0x18, pinnum);
    SPI_Send_Cam(1, 0x0C, pinnum);
    SPI_Send_Cam(2, 0x04, pinnum);
    SPI_Send_Cam(31, 0x06, pinnum); // to page 6

    // page 6
    SPI_Send_Cam(12, 0x00, pinnum);
    SPI_Send_Cam(13, 0x00, pinnum);
    SPI_Send_Cam(14, 0x00, pinnum);
    SPI_Send_Cam(15, 0x1F, pinnum);
    SPI_Send_Cam(16, 0xFF, pinnum);
    SPI_Send_Cam(17, 0xFF, pinnum);
    SPI_Send_Cam(18, 0x01, pinnum);
    SPI_Send_Cam(19, 0xFC, pinnum);
    SPI_Send_Cam(20, 0x00, pinnum);
    SPI_Send_Cam(21, 0x00, pinnum);
    SPI_Send_Cam(22, 0x00, pinnum);
    SPI_Send_Cam(23, 0x00, pinnum);
    SPI_Send_Cam(31, 0x07, pinnum); // to page 7

    // page 7
    SPI_Send_Cam(8, 0xFF, pinnum);
    SPI_Send_Cam(12, 0xFF, pinnum);
    SPI_Send_Cam(16, 0xFF, pinnum);
    SPI_Send_Cam(31, 0x08, pinnum); // to page 8

    // page 8
    SPI_Send_Cam(2, 0x44, pinnum);
    SPI_Send_Cam(3, 0x44, pinnum);
    SPI_Send_Cam(5, 0x44, pinnum);
    SPI_Send_Cam(6, 0x40, pinnum);
    SPI_Send_Cam(8, 0x60, pinnum);
    SPI_Send_Cam(31, 0x00, pinnum); // to page 0

    // page 0
    SPI_Send_Cam(0, 0x03, pinnum); // Master mode
    KLI-2113-D.PDF

  • Hi Elnur

    Thanks for the detailed information, that is very helpful.

    I have reviewed the sensor datasheet and your register settings. The only register value I have some concern about is the Black Target (Page 2, Register 0x03h) value of 0 decimal. A value this low may cause the search/feedback algorithm to have some problems. Have you tried using larger values of Black Target? I would recommend a target value of at least 16 decimal. Or you could try starting with the default value of 0x40h (64 decimal) and then lower it until you find the point that problems occur.

    Best regards,

    Jim B

     

  • Hi Jim

    Thank you for your answer. We tried using larger values of Black Target from your recommendation. It works but with some shades. We found out that Black calibration works properly when our sensor board has warmed up. Maybe CCD sensor is needed to warm up for correct work. When board is cold black calibration does not work ideally. But when board is warm black calibration works perfectly even with lower values of Black Target.

    P.S. Black calibration works better with ADAC scalling = 1/2 (Page 2, register 2).