{"id":19527,"date":"2017-04-04T10:00:12","date_gmt":"2017-04-04T17:00:12","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=19527"},"modified":"2021-06-11T10:36:55","modified_gmt":"2021-06-11T17:36:55","slug":"decoding-vga-on-the-digital-discovery","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/decoding-vga-on-the-digital-discovery\/","title":{"rendered":"Decoding VGA on the Digital Discovery"},"content":{"rendered":"<p>Recently we launched the <a href=\"https:\/\/digilent.com\/shop\/digital-discovery\">Digital Discovery<\/a>, a high speed debugging tool for embedded projects.\u00a0On the <a href=\"https:\/\/digilent.com\/reference\/instrumentation\/digital-discovery\/start#example_projects\">resource center <\/a>you&#8217;ll find tutorials telling you how to use the Logic Analyzer, but those don&#8217;t really tell you why you would use it. One such example is to decode a VGA signal. In this example, I run a script in the Script Editor, that takes the VGA data from the Logic Analyzer, and converts it into an image.<\/p>\n<figure id=\"attachment_19834\" aria-describedby=\"caption-attachment-19834\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-19834\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17668931_1376820089004824_469290035_o-600x450.jpg\" alt=\"\" width=\"600\" height=\"450\" data-wp-pid=\"19834\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17668931_1376820089004824_469290035_o-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17668931_1376820089004824_469290035_o-768x576.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17668931_1376820089004824_469290035_o-1024x768.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17668931_1376820089004824_469290035_o-800x600.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17668931_1376820089004824_469290035_o.jpg 2048w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-19834\" class=\"wp-caption-text\">A close up of the set up.<\/figcaption><\/figure>\n<p>This is just one example of the high speed applications that can be debugged with the logic analyzer and script editor working together on the Digital Discovery.<\/p>\n<p>For this example, I have a simple game of Tic Tac toe (written by GitHub user Verdoss) on the <a href=\"https:\/\/digilent.com\/shop\/nexys-4-ddr-artix-7-fpga-trainer-board-recommended-for-ece-curriculum\/\">Nexys 4<\/a>. The user plays using the buttons and the game is displayed via VGA. Along with sending the VGA signals to the VGA port, I sent the horizontal sync, vertical sync, and all four bits of the red, green, and blue signals to two Pmod ports on the Nexys 4. Then I hooked up 14 of the <a href=\"https:\/\/digilent.com\/shop\/digital-discovery\">Digital Discovery<\/a>&#8216;s High Speed inputs to the Pmod connectors. Since this application requires selecting 400MS\/s as the sample rate, I use the <a href=\"https:\/\/digilent.com\/shop\/digital-discovery-high-speed-adapter\/\">High Speed Adapter and High Speed Logic probes<\/a> to connect to the Pmod connectors. You can see the whole set up here:<\/p>\n<figure id=\"attachment_19833\" aria-describedby=\"caption-attachment-19833\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-19833\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17692243_1376820012338165_611448866_o-600x450.jpg\" alt=\"\" width=\"600\" height=\"450\" data-wp-pid=\"19833\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17692243_1376820012338165_611448866_o-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17692243_1376820012338165_611448866_o-768x576.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17692243_1376820012338165_611448866_o-1024x768.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17692243_1376820012338165_611448866_o-800x600.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/17692243_1376820012338165_611448866_o.jpg 2048w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-19833\" class=\"wp-caption-text\">The Digital Discovery, attached to the Nexys 4 in order to read and decode the VGA signals.<\/figcaption><\/figure>\n<p>In <a href=\"https:\/\/digilent.com\/shop\/waveforms-2015-download-only\/\">WaveForms 2015 <\/a>the Script Editor is used to run a script to control the Logic Analyzer and voltage levels through the power supplies. The script uses the Logic Analyzer to read the VGA lines from the Pmod ports, decodes them and creates an image.<\/p>\n<figure id=\"attachment_19835\" aria-describedby=\"caption-attachment-19835\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-19835\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/logic-analyzer-data-600x323.png\" alt=\"\" width=\"600\" height=\"323\" data-wp-pid=\"19835\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/logic-analyzer-data-600x323.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/logic-analyzer-data-768x413.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/logic-analyzer-data-1024x551.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/logic-analyzer-data-800x431.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/logic-analyzer-data.png 1919w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-19835\" class=\"wp-caption-text\">You can view one window of data on the Logic Analyzer.<\/figcaption><\/figure>\n<figure id=\"attachment_19836\" aria-describedby=\"caption-attachment-19836\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-19836\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/script-600x323.png\" alt=\"\" width=\"600\" height=\"323\" data-wp-pid=\"19836\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/script-600x323.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/script-768x413.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/script-1024x551.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/script-800x431.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/script.png 1919w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-19836\" class=\"wp-caption-text\">The Script that controls the acquisition.<\/figcaption><\/figure>\n<p>This takes a few minutes. Once it&#8217;s done, you can open the image and see what was displayed on the monitor.<\/p>\n<p><a href=\"The resulting image, which with the script comes out as a negative. I think negatives look super cool, so I kept it.\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-19837\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/img-600x450.jpg\" alt=\"\" width=\"600\" height=\"450\" data-wp-pid=\"19837\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/img-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/img.jpg 640w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>This is just one example of the embedded projects that can be aided by the Digital Discovery. To learn more about the <a href=\"https:\/\/digilent.com\/shop\/digital-discovery\/\">Digital Discovery,<\/a> check out the tutorials and <a href=\"https:\/\/digilent.com\/reference\/learn\/instrumentation\/tutorials\/digital-discovery-getting-started\/start\">getting started guide<\/a> on the <a href=\"https:\/\/digilent.com\/reference\/instrumentation\/digital-discovery\/start\">resource center<\/a>. For more detailed instructions on this example check out the <a href=\"https:\/\/www.instructables.com\/id\/Decoding-VGA-Signals-With-a-Portable-Logic-Analyze\/\">tutorial on instructables<\/a>.<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-19527 jlk' data-task='like' data-post_id='19527' data-nonce='1c819b3974' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-19527 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-19527 jlk' data-task='unlike' data-post_id='19527' data-nonce='1c819b3974' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-19527 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-19527 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Check out this quick tutorial on decoding VGA with the Digital Discovery!<\/p>\n","protected":false},"author":18,"featured_media":19840,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4325,4312,1563],"tags":[],"ppma_author":[4466],"class_list":["post-19527","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debug-validation-test","category-usb-scopes-analyzers-generators","category-guide"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2017\/04\/closeup.png","authors":[{"term_id":4466,"user_id":18,"is_guest":0,"slug":"kaitlyn","display_name":"Kaitlyn Franz","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/9276021eaa44781ce19f364cfca46ada25e1500769cf4803a095a5bae83c912a?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/19527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=19527"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/19527\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/19840"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=19527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=19527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=19527"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=19527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}