Eric Smith wrote: > > Cliff Griffin writes: > > I've got a use for a pair of crosshairs > > on a screen. Nothing fancy, no moving graphics or anything like that--just a > > couple of lines--but I need them as thin as possible. > > Overlaid on an existing video source? That will require some circuitry to > genlock the PIC's oscillator to the incoming video. > > > What is the thinnest line I can expect to get? I know the Pong game > > has a resolution of somewhere around 50 (or is it 150?) but I'd like > > something as thin as maybe 1/400th of the screen, X&Y. Anybody know if > > that's possible? > Horizontal line: > One vertical scan line with bad interlace flicker, > or two vertical scan lines (out of the 480 or so visible) > without so much flicker. So that's about 1/240 of the height. > There's not really any practial way to do better. The single horiz line (non-interlaced) will be a lot thinner, and can be made to look good if you interlace the vertical line on one frame and the horiz line on the other frame. The overall flickering is changed to a nice looking "targety" effect. I've actually done this, I made some nice looking crosshairs interlaced this way on a 640x480 video game screen. > > Vertical line: > One processor instruction cycle. For a 20 MHz PIC, that's 200 ns. > IIRC, the visible portion of the scan line is around 50 us, so that's > about 1/250 of the width. So it would be a little wider than the > two scan line horizontal line. > > If you use a Ubicom SX instead of a PIC, you can get 20 ns (50 MHz), > or even 10 ns (100 MHz). You can use a simple differentiator using one R,C, and Diode on any PIC output pin to give an extremely short output pulse. This will be quite workable to get a very fine vertical line. The freq response of the video power circuit in the TV or monitor will have limits, a quality monitor will have a much better vert line than a cheap one or one with an old tube. -Roman -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.