Forums

Interfacing TSL1401CL Line-scan camera with atmega88

Started by Dineshmuthu97 2 months ago3 replieslatest reply 2 months ago32 views

Hi friends,

I am new in using Line-scan camera, I need to interface the TSL1401CL 128 pixel camera with Atmega-88 Microcontroller for my application. I have clocked the camera sensor using OCR1A pin at the frequency of 500KHz and used that pin to connect  T0 pin for clocking 8bit timer and generated SI pulse for camera sensor as per the integration time needed.

The formula to find the integration time as per sensor datasheet for the given clock is.,

    Tint(min) =( 1 / maximum clock frequency)*(n-18)pixels+20us

The problem is that I can't get the analog output from the camera sensor, when I met all the requirements for the sensor regarding the clock and SI pulse, always the analog output is zero even the integration time of the camera sensor is high. I have checked with the power supply and clock whether it has the noise or not ,but I don't know where I was wrong in my work. please do help me out to resolve this issue.

I have attached the sensor datasheet and my code below.

Please let me know if I am wrong in my code.

Thanks & Regards,

Dinesh 

TSL1401CL datasheet

main.c
[ - ]
Reply by doctekMay 12, 2019

How are you verifying the timing of the clock pulses? Using a scope would be the best. You need to be sure that your timing is correct. Also check the voltage levels of the signals and supplies. I know you said you checked this, but check it again. It's that important! Further, check for any enable or access signal requirements.

HTH.

[ - ]
Reply by Dineshmuthu97May 13, 2019

Thank you for your reply. Yes, I have checked the signals with digital oscilloscope, frequency of the clock signal is 500KHz and frequency of SI Pulse is 1KHz merely and the ON time of SI pulse is 1.2us and OFF time is 995us. Integration time is higher than it required  but I am getting low analog output signal. please do check with my code if possible .


Added to that I have connected OCR1A pin (clk signal of TSL1401CL) to T0 pin for generating SI pulse by running 8 bit timer.  

[ - ]
Reply by doctekMay 14, 2019

How are you reading the analog output? I don't see where that is done in your code. 

If it is the case that you are looking with your scope, but not seeing analog levels (which could be less than a volt or so), then the only thing I can think of is to verify the timing (rise, fall, and duration) of the SI pulse relative to the clock signal. The data sheet is very specific about where this pulse should fall with respect to the clock pulses. Your scope should show you this information.

I would also suggest simplifying your program to ONLY generate the clock and SI signals. Look for the analog out with your scope. When you get data coming out, then add the additional features you need.