On 16 Sep 2002, at 15:05, Olin Lathrop wrote: > This is like asking is it possible to heat food without a microwave oven. > Early TVs are an existance proof that this can be done with analog > electronics without any integrated circuits. > > You first have to detect Hsync. This is easy as it is the deliberately the > most negative point of the waveform. Next low pass filter the Hsync pulses > and compare to a threshold. That will be Vsync. The Hsync pulses are > stretched during the vertical blanking interval. If you don't want the lag > from a low pass filter, just look at the length of Vsync pulses. Hsync > starts at the first long Vsync pulse. > Good reply. I have just had to do something similar with AVR. The pcb was already designed! They just used a LM31x (I forget) comparator with a pot to set the trip level in the centre of the sync pulse. I interrupted on each sync pulse and checked for a timer overflow - the timer is reset for 40uS so you can see if time between sync pulses was more or less than this.. The mark 2 pcb *WILL* use an LM1881 or Elantec equivalent to do the work fom me and remove the preset pot adjustment (user twiddle) problem. George Smith -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.