{"id":120,"date":"2025-05-19T20:50:26","date_gmt":"2025-05-19T18:50:26","guid":{"rendered":"https:\/\/pixion.be\/?p=120"},"modified":"2025-09-27T18:23:25","modified_gmt":"2025-09-27T16:23:25","slug":"pixions-video-output","status":"publish","type":"post","link":"https:\/\/pixion.be\/index.php\/2025\/05\/19\/pixions-video-output\/","title":{"rendered":"Pixion\u2019s video output"},"content":{"rendered":"\n<p><strong>Hello Pixioneers!<\/strong><\/p>\n\n\n\n<p>A short post today. Let\u2019s have a quick look at how Pixion will handle video output.<\/p>\n\n\n\n<p>As previously mentioned, I chose to use a VGA interface for its simplicity compared to more modern standards like HDMI or DisplayPort. VGA is well documented and can be implemented relatively easily from scratch on an FPGA.<\/p>\n\n\n\n<p>VGA requires five signals:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>3 analog color signals<\/strong>:\n<ul class=\"wp-block-list\">\n<li>red component<\/li>\n\n\n\n<li>green component<\/li>\n\n\n\n<li>blue component<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>2 digital synchronization signals<\/strong>:\n<ul class=\"wp-block-list\">\n<li>horizontal sync (HSYNC)<\/li>\n\n\n\n<li>vertical sync (VSYNC)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>Each color signal is analog, and in our case, we\u2019ve chosen to limit them to 4 levels per channel, that is, 2 bits per color. This means we need to convert digital values to analog voltages, which is the job of a DAC (Digital-to-Analog Converter).<\/p>\n\n\n\n<p>I explored a few DAC topologies (a non-exhaustive list is at the end of this post if you&#8217;re curious), and since we only need 2-bit precision, both the R-2R ladder DAC and binary-weighted resistor DAC were good candidates. I ended up choosing the binary-weighted resistor DAC, which is slightly simpler to implement.<br>This type of DAC uses an op-amp in an adder configuration, where the resistors are selected in powers of two (e.g. R, 2R, 4R).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"387\" height=\"236\" src=\"https:\/\/pixion.be\/wp-content\/uploads\/2025\/05\/Art03-BWR_DAC.png\" alt=\"\" class=\"wp-image-121\" srcset=\"https:\/\/pixion.be\/wp-content\/uploads\/2025\/05\/Art03-BWR_DAC.png 387w, https:\/\/pixion.be\/wp-content\/uploads\/2025\/05\/Art03-BWR_DAC-300x183.png 300w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><\/figure>\n<\/div>\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u26a0\ufe0f Note: While the binary-weighted DAC is simple for low resolutions like 2 bits, it becomes impractical for higher resolutions due to its sensitivity to resistor tolerances. But for this use case, it&#8217;s perfectly fine.<\/p>\n<\/blockquote>\n\n\n\n<p>One important detail: VGA cables can be quite long, and at the frequencies used to transmit pixel data, signal reflections can occur if the line isn&#8217;t properly terminated. VGA cables are typically matched to 75\u202f\u03a9 impedance, so we need to add a 75\u202f\u03a9 series resistor at the output of each DAC (one per color channel) to match the cable\u2019s impedance.<\/p>\n\n\n\n<p>However, this matching resistor, when paired with the monitor\u2019s internal 75\u202f\u03a9 input impedance, forms a voltage divider, which cuts the voltage in half.<br>Therefore, to achieve VGA\u2019s required maximum voltage of 0.7\u202fV on the line, our DAC must produce 1.4\u202fV in open circuit for the highest color level.<br>This voltage drop needs to be considered when scaling the output range of the DAC.<\/p>\n\n\n\n<p>Finally, to physically connect the VGA cable to the PCB, we\u2019ll use a D-sub DE-15 connector, commonly referred to as a VGA connector. Since monitors usually have a female socket and most VGA cables are male-to-male, we\u2019ll place a female connector on the Pixion board as well.<\/p>\n\n\n\n<p>Below is the pinout of the connector, with the relevant pins for our project highlighted:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"387\" height=\"248\" src=\"https:\/\/pixion.be\/wp-content\/uploads\/2025\/05\/Art03-VGA_conn.png\" alt=\"\" class=\"wp-image-122\" style=\"width:387px;height:auto\" srcset=\"https:\/\/pixion.be\/wp-content\/uploads\/2025\/05\/Art03-VGA_conn.png 387w, https:\/\/pixion.be\/wp-content\/uploads\/2025\/05\/Art03-VGA_conn-300x192.png 300w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><\/figure>\n<\/div>\n\n\n<p>That\u2019s it for today!<br>Next time, we\u2019ll explore how Pixion handles audio output, from digital generation to analog conversion and connector choices.<\/p>\n\n\n\n<p>Stay tuned,<\/p>\n\n\n\n<p class=\"has-text-align-right\">Pix\u2019<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Some DAC topologies encountered during my exploration:<br>R-2R ladder DAC, binary-weighted resistor DAC, string DAC, current-steering DAC, segmented DAC, switched-capacitor DAC, PWM DAC, delta-sigma DAC, charge-redistribution DAC.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello Pixioneers! A short post today. Let\u2019s have a quick look at how Pixion will handle video output. As previously mentioned, I chose to use a VGA interface for its simplicity compared to more modern standards like HDMI or DisplayPort. VGA is well documented and can be implemented relatively easily from scratch on an FPGA&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[24],"tags":[17,3,4,10,11,25,23],"class_list":["post-120","post","type-post","status-publish","format-standard","hentry","category-architecture","tag-architecture","tag-diy","tag-electronics","tag-hardware","tag-hobbyist","tag-vga","tag-video"],"_links":{"self":[{"href":"https:\/\/pixion.be\/index.php\/wp-json\/wp\/v2\/posts\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixion.be\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixion.be\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixion.be\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixion.be\/index.php\/wp-json\/wp\/v2\/comments?post=120"}],"version-history":[{"count":3,"href":"https:\/\/pixion.be\/index.php\/wp-json\/wp\/v2\/posts\/120\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/pixion.be\/index.php\/wp-json\/wp\/v2\/posts\/120\/revisions\/147"}],"wp:attachment":[{"href":"https:\/\/pixion.be\/index.php\/wp-json\/wp\/v2\/media?parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixion.be\/index.php\/wp-json\/wp\/v2\/categories?post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixion.be\/index.php\/wp-json\/wp\/v2\/tags?post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}