Time Sync Through Your VGA Connector

While it might be in its twilight years, the venerable VGA video connector conceals a versatile interface that  can still provide the experimenter with the opportunity for a variety of hacks. We’ve not seen anything quite like [flok]’s one, in which he uses the VGA interface to insert timing information from which an NTPd instance gets its reference.

If this seems counter-intuitive because a VGA interface is an analogue output rather than a digital input, then you are correct to smell a rat. And he comes clean in his first sentence, as he’s not using the VGA lines themselves but the I2C interface that is a feature of all but the most basic of VGA cards. This is the means by which a plug-and-play operating system can identify a monitor’s capabilities, but there’s little to stop it being used for other purposes. In this case an Arduino fed by a 1-pulse-per-second timing signal from a temperature compensated crystal oscillator provides the I2C peripheral which is polled by NTPd.

This project should be of interest to any tinkerer because of its invaluable information on identifying and using the I2C interface on a VGA socket. So if you’ve used your VGA card as an SDR you might find it interesting, but hurry or you could have missed the boat entirely.

VGA plug image: Swift.Hg [CC BY-SA 3.0]

16 thoughts on “Time Sync Through Your VGA Connector

  1. “hurry or you could have missed the boat entirely.”
    As long as there are no properly shielded HDMI plugs you can fix to the monitors with screws, VGA will stay.
    At least in industrial environments with vibrations etc, just as COM ports and LPT ports..

    1. Not that it has the same presence as VGA in those settings, but DVI also fits the bill while providing a digital alternative while maintaining backwards compatibility with VGA.

      That being said, a full sized display port normally has connections hooks on the male end. Maybe not as sure a grip as a screw but I’ve yet to see one fall out on its own.

  2. I don’t think any “VGA” card will support that, came in 5 years into the SVGA era IIRC with the rest of the plug and pray stuff. You probably only need to worry about checking if you’re doing it to a 486 or early Pentium machine though.

  3. I wonder if use of I2C clock stretching could make this less “rubegoldbergesque”. I mean, if graphics card supported it, one could avoid having to do polling if any request simply completed on PPS.

  4. ” This is the means by which a plug-and-play operating system can identify a monitor’s capabilities” — FYI the I2C interface works over only a short distance, which is why it fails so often in places that have an overhead projector and a long cable and you are stuck with manually selecting the resolution.

  5. First, doesn’t any video have a sync signal? This may be a tape only thing, if so TFB.

    With regard to I2C, PLEASE FOR THE LOVE OF GOD HACKADAY adopt the common practice of saying “the thing (the acronym for ‘the thing’)” on the first occurrence of “the thing” in EACH ARTICLE.

    Example: “When we tried Internet to Colon (I2C) the results were astounding.”

    Would it kill you, Hackaday?

    1. While I like the idea of explaining acronyms, every so often the acronym is the name and it’s almost coincidental that it happens to be derived from some words.
      This article talks of I²C bus, VGA and NTPd. Each of these is the name for that thing. If we were to explain those things, I’d rather know they are a two-wire data bus, standard analogue computer display connection and a software for syncing computer clocks. The alternative would be Inter-Integrated Circuit bus, Visual Graphics Adapter and Network Time Protocol Daemon.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.