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”
And if you want I2C over USB, have a look at: https://github.com/harbaum/I2C-Tiny-USB/tree/master/digispark
My first thought, after thinking what a slick idea using a VGA cable, was “I wonder how much the Arduino’s clock jitter is slowing down the convergence”. It is slick though.
“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..
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.
You mean DVI?
HDMI has zero business existing outside an AV rack. DisplayPort, or DVI if you think latches are icky and want screw mounts.
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.
If you’ve never tried it, put a sniffer on the I2C lines to your monitor and check out the text dialog going on.
Long Live VGA!
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.
People claiming VGA is dead is like claiming a greyhair has croaked just because they’ve reached retirement age while still feeling fresh.
” 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.
Look at the cable though, if it’s not as thick as a pen, it’s probably only RGB H V and ground.
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?
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.
True. But that’s one that’s probably well enough known.
And it ain’t an acronym. :)
It’s an initialism. I’ll get me coat.
HDMI still has a i²c interface to do the same screen resolution negotiating as VGA.
I believe it is exactly the same protocol.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)