http://mondo-technology.com/
Go to the link. There are two pages "video...........". Study each! Mondo has good ideas!
The software has some pieces you need.
The PIC can not record video in real time. It can grab one pixel/ scan line.
Vertical sync is at the bottom of a picture.
Horizontal sync is at the end of a line.
input pixer1, line1, send to memory card.
input pixer1, line2, send to memory card.
repeat to bottom of picture.
input pixer2, line1, send to memory card.
input pixer2, line2, send to memory card.
repeat to bottom of picture.
Keeping doing this to you get to the right side of the picture.
This records the picture side ways. but you have a picture.
1. loop until vertical sync. "bottom of picture
2. loop until start of horizontal sync.
2a. Software delay (sync time + back porch time+n)
2b. use ADC to get on pixel. Save data.
2c. test vertical sync to see if at bottom of picture. Jump to 3.
2d. jump to 2.
3. write 'end of scan line' to video file.
3a. n=n+1 "need more time
3b. if n='max delay' then we are at the right side of picture so we are done. close file.
3c. n=0
4. done,