Hello,
I would like to know the polarity of the synchronization signals, because I try to have with interrupt and double buffer the frame with full resolution, and I need the polarity of HSYNC and VSYNC signals.
Thanks
Hello,
I would like to know the polarity of the synchronization signals, because I try to have with interrupt and double buffer the frame with full resolution, and I need the polarity of HSYNC and VSYNC signals.
Thanks
huh? Can you describe what you are trying to do? (more detail please)
thanks!
I want to strore frames with interruption (interrupt group and DMA) that is why I need the polarity (to correctly set the interruptions).
Then I want to implement a double buffer to not read and write at the same time in a memory area. In this way I could strore a piece of image (1280 * 50), and treat at the same time in the other buffer an other piece, and continu until the end of the frame.
With interruption and DMA, I can compute a part of the frame, and store an other part.
That’s why I would like to know the polarity of the synchronisation signals. (Even if I suppose it’s ‘1’)
Here’s some source that describes it — VSYNC pulses high and HSYNC pulses low.
#define CAM_PORT (LPC_GPIO_PORT->PIN[1])
#define CAM_VSYNC() (CAM_PORT&0x1000)
#define CAM_HSYNC() (CAM_PORT&0x800)
void vsync()
{
int v = 0, h = 0;
while(1)
{
h = 0;
while(CAM_VSYNC()!=0);
while(1) // vsync low
{
while(CAM_HSYNC()==0)
{
if (CAM_VSYNC()!=0)
goto end;
}
while(CAM_HSYNC()!=0); //grab data
h++;
}
end:
v++;
}
}