I have two input signals that change state every 30 msec. Let us say they are high (or low) for one msec every 30 msec.
I need to indicate on a number of leds (maybe bicolour ones) the phase difference between the two signals.It can vary from zero to 30 msec. We are especially interested in zero phase difference.
Software wise, do you know how to do this ?
I'm curious about where these signals come from?
how do you adjust the phase diff between the two signals?
Do you know in detail how video capture works ? That is what I thought, neither do I. As far as I know, no-one understands this, not even srsa_4c.
A signal is required that is related to video synch. We do not know of such a signal.
An led can be flashed VERY briefly in the code that deals with each frame, or alternatively, toggled on/off in each frame ... preferable because of lower processing 'overhead'.
For most cameras except recent ones, the A/V output can be monitored for vertical synch pulse. Easily done with LM1881 or with more modern, expensive chips. I believe some microcontrollers can also do this.However, not much use if NOT related to movie synch. Cannot get my head around how an A/V frame-rate can be generated that is different to movie capture frame-rate.
Quote how do you adjust the phase diff between the two signals?You tell me, this is what it is all about !
this could have up to 33 mSec of phase difference at 60 Hz - objectionable for stereoscopic viewing I assume?
I think I now realize that your real goal is to have two camera be able to sync when they start shooting each frame ?
I guess the fundamental questions is what initiates each frame once shooting starts - the ARM chip or the DSP or perhaps even some custom hardware? Unless its the ARM chip, this project is dead before it starts I think.
If I understand you, the idea is to have one camera generate a sync pulse at the start of each frame and the other camera to respond by shooting the next frame when the signal is received?
So one camera generates an LED blink and the other cam uses a phototransistor on the USB remote input line to read the signal?
you are hoping the A/V output is sync'd to the shooting frame rate. Seems like a reasonable assumption I guess.
That gives you a "sync" signal but not the other half of the puzzle - what to do with it.
The idea would be to keep restarting until the circuit tells you the cams started sync's and then keep shooting until the circuit tells you they have drifted too far apart ?
We know from Magic Lantern and CHDK that there are timers that can have their frequency changed and thereby affect frame-rate.I was thinking more of displaying synch error and by half-pressing on one camera gradually drift into synch by changing frame-rate.The latter part should be possible from info already published, though I did not manage to get it working when I tried.
So as long as we are dreaming here - if the external sync phase detector provides a feedback signal to the cameras ( USB remote style PWM data or PTP ) then the camera kbd.c code could adjust the "magic" register on the fly to achieve sync lock.
I am assuming the timer registers determine the division ratio of a phase-locked and hence timer output frequency.Derived from that signal may be an interrupt which ultimately sends a particular message to the movie capture task. Depends how near you can get to the source of that message. Presumably the nearer you are the more it truly represents frame-capture time.
The CCD circuitry must report that a new frame is ready, surely it must use an interrupt to report that to the firmware ?
Started by fudgey « 1 2 3 4 » Microfunguy's Builds
Started by Blooper « 1 2 » Creative Uses of CHDK
Started by Alarik « 1 2 ... 12 13 » General Discussion and Assistance
Started by David Ripple « 1 2 ... 6 7 » General Discussion and Assistance
Started by colombo11 « 1 2 3 4 » General Discussion and Assistance