Hardware newbie here and I need to know how to connect my TSL 1401 line scan camera to an Arduino Mega so that I can send it the needed impulses. The Mega has a hundred different sockets and the Schema just scared me when I looked at it.
I just want to know which socket I can connect to the CLK and SI ports of my camera so that I can get and an analog output of pixels.
-
2Please edit your question to include a link to the datasheet of the TSL 1401 and the schema of the arduino mega that you are using.Bending Unit 22– Bending Unit 222016年05月30日 20:57:10 +00:00Commented May 30, 2016 at 20:57
-
Is this related to this question?Edgar Bonet– Edgar Bonet2016年06月08日 15:20:21 +00:00Commented Jun 8, 2016 at 15:20
1 Answer 1
It depends on the camera that you're using but you send in impulse just sending digital write signal, waiting a little bit and then turning it off. You do this over and over again until you have all the pixels. Here is an example where I send 128 impulses:
for(int i = 0; i < 128; i++)
{
digitalWrite(CLK, HIGH);
delay(1);
digitalWrite(CLK, LOW);
delay(1);
}
Depending on the hardware you are using you might have to send a SI (signal impulse) prior to the CLK impulses and the delay in between them will vary. The best thing to do is to read the documentation to find these figures.