> >I wanted to do the phase comparator in software, which is somewhat > >complicated by the fact that it won't act in continuous time. I take 2 > >samples of the sync input one instruction apart: > > Why? Is a 74HC4046 too slow? (That would give you a choice of phase > detectors and VCO all in one package. ) > > What's the advantage of a software PLL in this application? > > (Maybe I'm missing the obvious. It happens to me all the time... ;-) A software phase comparitor may have an easier time stripping junk from the reference signal; this is necessary if you don't use a good sync detector with an /HSync output (the composite sync adds extra wierd stuff around vertical blanks). My other objection to the 4046 (as opposed to a trimmable RC) is that it requires a rock-solid lock to produce stable output whereas a nudgeable RC which is reset every line doesn't (if the RC is too fast or too slow, the image won't be quite the right size but it will still be "stable").