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.

LM98714 Initialization code

Other Parts Discussed in Thread: LM98714, SENSOREVAL

Hi Members.

I am new to LM98714

so pls help me to initialise LM98714,

Am trying to initialise the device in CMOS mode and with out CCD timing generator, my INCLK is 50Khz.

Regards

Govind Raj

  • Hi Govind,

    I've attached a register map for the LM98714 (but I don't have any details for the conditions / settings to share with you).

    5621.LM98714.txt
    <definition>
     <reg addr="0" value="F1"/>
     <reg addr="1" value="50"/>
     <reg addr="2" value="0"/>
     <reg addr="3" value="7"/>
     <reg addr="4" value="0"/>
     <reg addr="5" value="0"/>
     <reg addr="6" value="0"/>
     <reg addr="7" value="20"/>
     <reg addr="8" value="0"/>
     <reg addr="9" value="0"/>
     <reg addr="A" value="20"/>
     <reg addr="B" value="0"/>
     <reg addr="C" value="0"/>
     <reg addr="D" value="0"/>
     <reg addr="E" value="0"/>
     <reg addr="F" value="0"/>
     <reg addr="10" value="0"/>
     <reg addr="11" value="0"/>
     <reg addr="1F" value="0"/>
     <reg addr="20" value="54"/>
     <reg addr="21" value="54"/>
     <reg addr="22" value="54"/>
     <reg addr="23" value="54"/>
     <reg addr="24" value="54"/>
     <reg addr="25" value="80"/>
     <reg addr="26" value="0"/>
     <reg addr="27" value="80"/>
     <reg addr="28" value="0"/>
     <reg addr="29" value="80"/>
     <reg addr="2A" value="0"/>
     <reg addr="2B" value="80"/>
     <reg addr="2C" value="0"/>
     <reg addr="2D" value="80"/>
     <reg addr="2E" value="0"/>
     <reg addr="2F" value="40"/>
     <reg addr="30" value="40"/>
     <reg addr="31" value="40"/>
     <reg addr="32" value="40"/>
     <reg addr="33" value="40"/>
     <reg addr="3F" value="0"/>
     <reg addr="40" value="0"/>
     <reg addr="41" value="27"/>
     <reg addr="42" value="C8"/>
     <reg addr="43" value="88"/>
     <reg addr="44" value="0"/>
     <reg addr="45" value="0"/>
     <reg addr="47" value="0"/>
     <reg addr="48" value="15"/>
     <reg addr="4A" value="0"/>
     <reg addr="4B" value="15"/>
     <reg addr="4D" value="B"/>
     <reg addr="4E" value="D"/>
     <reg addr="50" value="10"/>
     <reg addr="51" value="13"/>
     <reg addr="53" value="0"/>
     <reg addr="54" value="0"/>
     <reg addr="56" value="0"/>
     <reg addr="57" value="0"/>
     <reg addr="59" value="0"/>
     <reg addr="5A" value="0"/>
     <reg addr="5C" value="0"/>
     <reg addr="5D" value="0"/>
     <reg addr="5E" value="0"/>
     <reg addr="5F" value="0"/>
     <reg addr="60" value="0"/>
     <reg addr="61" value="0"/>
     <reg addr="62" value="0"/>
     <reg addr="63" value="0"/>
     <reg addr="64" value="0"/>
     <reg addr="65" value="0"/>
     <reg addr="66" value="0"/>
     <reg addr="67" value="0"/>
     <reg addr="68" value="0"/>
     <reg addr="69" value="0"/>
     <reg addr="6A" value="0"/>
     <reg addr="6B" value="0"/>
     <reg addr="6C" value="11"/>
     <reg addr="6B" value="0"/>
     <reg addr="6D" value="3"/>
     <reg addr="6E" value="6"/>
     <reg addr="6F" value="0"/>
     <reg addr="70" value="12"/>
     <reg addr="6F" value="0"/>
     <reg addr="71" value="3"/>
     <reg addr="72" value="0"/>
     <reg addr="73" value="0"/>
     <reg addr="74" value="13"/>
     <reg addr="73" value="0"/>
     <reg addr="75" value="3"/>
     <reg addr="76" value="30"/>
     <reg addr="77" value="0"/>
     <reg addr="78" value="14"/>
     <reg addr="77" value="0"/>
     <reg addr="79" value="3"/>
     <reg addr="7A" value="30"/>
     <reg addr="7B" value="0"/>
     <reg addr="7C" value="15"/>
     <reg addr="7B" value="0"/>
     <reg addr="7D" value="3"/>
     <reg addr="7E" value="30"/>
     <reg addr="7F" value="0"/>
     <reg addr="80" value="2"/>
     <reg addr="81" value="0"/>
     <reg addr="82" value="3"/>
     <reg addr="83" value="1"/>
     <reg addr="84" value="1C"/>
     <reg addr="85" value="3C"/>
     <reg addr="86" value="0"/>
     <reg addr="87" value="80"/>
     <reg addr="88" value="1D"/>
     <reg addr="89" value="99"/>
     <reg addr="8A" value="1D"/>
     <reg addr="8B" value="B4"/>
     <reg addr="8C" value="FF"/>
     <reg addr="8D" value="FF"/>
     <reg addr="8E" value="FF"/>
     <reg addr="9F" value="0"/>
     <reg addr="A0" value="F"/>
     <reg addr="A1" value="7"/>
     <reg addr="A2" value="F"/>
     <reg addr="A3" value="7"/>
     <reg addr="A4" value="F"/>
     <reg addr="A5" value="7"/>
     <reg addr="A6" value="F"/>
     <reg addr="A7" value="7"/>
     <reg addr="A8" value="F"/>
     <reg addr="A9" value="7"/>
     <reg addr="AA" value="F"/>
     <reg addr="AB" value="7"/>
     <reg addr="AC" value="F"/>
     <reg addr="AD" value="7"/>
     <reg addr="AE" value="F"/>
     <reg addr="AF" value="7"/>
     <reg addr="BF" value="0"/>
    </definition>
    

    You may have mis-typed the INCLK (50kHz). Here are the INCLK values in the MHz range:

    Regards,

    Hooman

  • Hi Hooman Hashemi

    Thanks for your feedback..

    My INCLk is 50Khz only ,

    in the above table for INCLK = ADCLK minium clock is 5MHz

    but for INCLK = PIXCLK minium clock is  mentioned in the table.

    and the settings what you have provided is for which sensor CCD/CIS & in which mode CMOS or  LVDS.

    Regards

    Govind Raj

  • Hi Govind,

    As you have noted, the LM98714 would not work with INCLK of 50kHz. May be you can explain what you are trying to do and what dictates your low INCLK frequency and we will get back to you with your suggestions.

    Regards,

    Hooman

  • Hi Hooman Hashemi 

    As you have suggested, i made INCLK= 8MHz, and initialized the LM98714 according to the figure 64.

    My configuration details are given bellow.

    Page 0:

    Main Configuration 0 = 0xF1.(Mode 3 in forward mode and one color sequence).

    Main Configuration 1 = 0x05.(O/P format is CMOS, INCLK = ADCLK).

    Main Configuration 2 = 0x08.(Device active,O/P enable,Device fully powered).

    Page 2

    SH Mode = 0x80( SH o/P pin to tristate,SH source select to external).

    CMOS Data Mode = 0x20.(CLK10 is configured as CLKOUT).

    Am not using the CCD timing generator so i kept all other registers to default.

    After all this configuration, starting the scan by using start scan bit in

    Main Configuration 2 = 0x01.

    Am polling the ready bit after start scan, and it is working as expected (shown in fig 64).

    I am observing some pulses on output pins but am not getting any pulses on CLKOUT pin.

     

    Regards

    Govind Raj

     

  • Hi Govind,

    I think the following might be your current issue with the LM98714:

    1. You may have to do additional register settings to get the CLKOUT.

    a) Status Bit Enable: Set the Register Page 2, Address 11110, CMOS Data Mode Status Bit Enable, bit 5 to "1" (CLK10=CLKOUT), as shown below:

    b) Tristate Override Removal: You may have to additionally do the following to Register Page 3, address 00100, "Output Mapping CLK9/CLK10" bits [3:0]: Change to anything except 0000, as shown below:

    Please try these changes above and let me know if you are still having issues.

    Regards,

    Hooman

  • Hi Hooman.

    Thank you for your feedback.

    I made changes suggested by you.Now i am able see some pulses on CLKOUT pin and i captured some images from oscilloscope and same is shown bellow.

    Am observing some noise on the CLKOUT pin (fig 1).

    When i expand the time base ie shown in fig2.

    Frequency and period details are shown in right bottom corner of each image.

    Regards

    Govind Raj

  • Hi Govind,

    We are trying to think of reasons why you are getting the "noise" on your CLKOUT during the "hi" or "1" state and so far we do not have answer yet!

    I wanted to ask you to make sure that the board you are using has adequate supply decoupling caps and ground planes to make sure you have a low inductance ground path.

    • Does the noise change when you load the signal (e.g. 1k to ground)?
    • Is your probe ground lead short and grounded close to the pin?
    • What happens if you probe the pin with a series resistor (e.g. 100ohm) to minimize the impact of the scope probe capacitance on the pin?

    We'll discuss this further internally tomorrow and get back to you to see if we can find the source of the waveform noise.

    Regards,

    Hooman

  • Hello again Govind,

    Can you share the schematic your board (at least the LM98714, clocking, power supplies portion)?

    Here is my private email if you like to send it that way:

    hooman.hashemi@ti.com

    Regards,

    Hooman

  • Hi Govind,

    Thanks for the schematic that you emailed me. I don't see anything big standing out, but I have some comments:

    1. Wrong Period: I had noticed that the CLKOUT had a 146Hz repetition rate! Your problem is not just the "disturbance" on the high side but in fact completely wrong waveform. Repetition rate should either be the same as your INCLK (8MHz) or some multiple of it.

    a) Can you confirm that RESET_bar (CIS_0EB) is not being toggled at this rate which it should not be. Can you please confirm?

    2. Schematic dot missing: Please make sure the VR pin is tied to C29 (schematic dot is missing). Also, please confirm that DVB pin is only tied to C34 (and not connected to 3.3V). I'm hoping that your board layout does not get confused by this drafting issue?

    3. CLKOUT Probing things to try: Did you try the experiments (with regard to the way the CLKOUT is being probed)?

    a) What is nature of the oscilloscope probe you are using (e.g. normal 10Mohm 10x scope probe?, etc.)

    4. Waveform Capture(s): Can you capture the following waveforms simultaneously and share?

    INCLK+, CLKOUT, RESET_bar

    5. Missing large (4.7uF) caps: There are several 4.7uF caps (called for in the datasheet) that are missing on the following pins:

    VA, VCLP, VD

    You have shown 10uF caps on your schematic page 3 and I wonder if these are close enough to the LM98714 (they should be) to be effective?

    I would place the 4.7uF caps noted next to the pins as well as on 3.3VDVAC and 3.3VADC.

    6. Ground Separation not needed: You have kept AGND and DGND separate on your schematic and I think you use 0ohm resistors (R14 and R15) to tie them together probably near the LDO? Our general guidelines is to not separate the analog and digital grounds and have them tied to each other near the device. Is this something that you can implement and try (or at least use a scope to verify that the two grounds next to the LM98714 do not have large / fast transients)?

    Please let me know your findings from the list above.

    Regards,

    Hooman

  • Hi Hooman,

    The register dump has registers from address 0x0 to 0xBF.

    But as per datasheet LM98714 has only 5-bit address.

    Do the MSB 3-bit address from register dump represent page no.

    Regards

    Prasanna

  • Hi Prasanna,

    The active register page (5 total) is denoted by the value of register 1Fh three (3) LSB bits. This register is mirrored on all register pages.

    So, when you read back the register address / value, you must also refer to the content of register 1Fh to see which register page the data belongs to.

    The LM98714 register read should yield 5 bits of address and 8 bits of data per datasheet Figure 62. So, I'm not sure what you mean when you say the "register dump" because that is not a LM98714 function but rather relates to the tool you are using to read the LM98714 register contents. Therefore, I think this is an exercise in "deciphering" the dumped values by keeping track of the Page number from register 1Fh.

    Please let me know if I've not answered your question properly?

    Regards,

    Hooman

  • Hi Hooman,

    I was referring to "5621.LM98714.txt" file you shared in earlier post. It has register address from 0x0 to 0xBF.

    Is there any specific sequence for register programming.

    Regards

    Prasanna

  • Hi Prasanna,

    You must be referring to this file which I posted earlier:

    This file was generated by the SensorEval tool (image below) with file extension changed to *.txt:

    Here is a thread that includes the SensorEval installation file:

    Note: Using SensorEval with LM98xxx Imaging devices with Windows versions beyond Windows xp is limited to monitoring the register / device states. You cannot use this tool to read / write the LM98xxx device registers as it is not fully compatible with Windows 7, etc.

    The register address in the file combines the 5 bits of address that the chip has, with the page address setting used to create the upper bits.

     Here are some examples of different Page/Register value combinations as they would appear in the register file.

     

    Page Binary (0 to 5 decimal)

    Register Binary (00 to 1F hex)

    File Address Binary

    File Address Hex (00h to BFh)

    000

    0 0000

    0000 0000

    00h

    000

    0 1000

    0000 1000

    08h

    001

    1 1000

    0011 1000

    38h

    010

    0 0010

    0100 0010

    42h

    011

    1 0100

    0111 0100

    74h

    101

    1 1111

    1011 1111

    BFh

     

    Hope this makes things clearer.

    Regards,

    Hooman

  • Hi Hooman,

    I have difficulty understanding the values of registers PIX1 Start, PIX1 End, PIX2 Start, PIX2 End, PIX3 Start, PIX3 End, PIX4 Start, PIX4 End (Page 2 address 0x7 through 0x11).

    What is the reference for start/end? ADC clock or Pixel clock or something else.

    A value of 1 in register is equivalent to how much pulse width?

    My mapping/connections are as follows

    PIX1 = CLK1 = CCD clock phase 1

    PIX2 = CLK2 = CCD clock phase 2

    PIX3 = CLK3 = CCD reset gate

    PIX4 = CLK4 = CCD clamp gate

    Regards

    Prasanna

  • Hi Prasanna,

    Sorry about the delay in getting back to you.

    Question: What is the reference for start/end? ADC clock or Pixel clock or something else.

    Response: The reference point for Start and End values is from pixphase (which can take on 4 different values) as shown below from page 77:

    Figure 19-21 also show this with timing diagrams for different operating modes

    As noted above, all Start and End timings are relative to pixphase. The value entered in the register is the measure of number of clock edges from pixphase. This is also shown in Figure 33-34 with timing diagrams.

    BTW, here is some additional detail not easily captured from the datasheet for your reference:

    For MODE3, PIXn start and PIXn end values can be from 0 to 41

    For MODE2, PIXn start and PIXn end values can be from 0 to 27

    For MODE1, PIXn start and PIXn end values can be from 0 to 13

    The max values above are doubled if the 1/2 frequency mode is enabled for that PIX generator.

    Regards,

    Hooman

  • Thanks Hooman. I am able to generate the clock pulses as per my sensor timing.

    Regards
    Prasanna