{"id":766,"date":"2015-05-26T16:07:17","date_gmt":"2015-05-27T00:07:17","guid":{"rendered":"http:\/\/www.beyond-circuits.com\/wordpress\/?p=766"},"modified":"2016-10-31T14:18:24","modified_gmt":"2016-10-31T22:18:24","slug":"timing-diagrams-with-wordpress","status":"publish","type":"post","link":"https:\/\/www.beyond-circuits.com\/wordpress\/2015\/05\/timing-diagrams-with-wordpress\/","title":{"rendered":"Timing Diagrams with WordPress"},"content":{"rendered":"<p>I saw a post yesterday on <a href=\"http:\/\/hackaday.com\/2015\/05\/25\/need-timing-diagrams-try-wavedrom\/\">Hackaday<\/a> about using a program called Wavedrom to edit timing diagrams on web pages. It looks like a great tool, but I have a couple of issues with it.<\/p>\n<p>First, I&#8217;m confused about the command line version of the tool. It exists, but there seems to be some issue with using it on Mac OS. I haven&#8217;t tried it on Linux yet, but most of my work is done on both, especially documentation, so I need to get that figured out.<\/p>\n<p>The second really big gotcha is that it doesn&#8217;t work with Internet Explorer 9 and earlier. That is a big one. Even though I personally never use IE, a lot of my readers do.<\/p>\n<p>Anyway, with those caveats in mind, I did some work to try to integrate Wavedrom with WordPress. Here is an example waveform:<\/p>\n<p><script type=\"WaveDrom\">\n{ signal : [ { name: \"clk\", wave: \"p......\" }, { name: \"bus\", wave: \"x.34.5x\", data: \"head body tail\" }, { name: \"wire\", wave: \"0.1..0.\" }, ]}\n<\/script><\/p>\n<p>Apologies if you use IE since you can&#8217;t see the waveform. You can check it out in Firefox or Chrome, though.<\/p>\n<p>You can see the full tutorial for WaveDrom <a href=\"http:\/\/hackaday.com\/2015\/05\/25\/need-timing-diagrams-try-wavedrom\/\">here<\/a> for more details. But for the example above, the code embedded in this page looks like this:<\/p>\n<pre><code>&lt;script type=\"WaveDrom\"&gt;\r\n{ signal : [\r\n{ name: \"clk\", wave: \"p......\" },\r\n{ name: \"bus\", wave: \"x.34.5x\", data: \"head body tail\" },\r\n{ name: \"wire\", wave: \"0.1..0.\" },\r\n]}\r\n&lt;\/script&gt;\r\n<\/code><\/pre>\n<p>I created a very simple plugin for WordPress which adds the right stuff to the HTML header for these pages. I will probably work on it a bit further if I can figure out how to support IE. If I can&#8217;t do that, maybe I can get the command line version working, and use it for PNG or SVG images at least.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I saw a post yesterday on Hackaday about using a program called Wavedrom to edit timing diagrams on web pages. It looks like a great tool, but I have a couple of issues with it. First, I&#8217;m confused about the &hellip; <a href=\"https:\/\/www.beyond-circuits.com\/wordpress\/2015\/05\/timing-diagrams-with-wordpress\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7],"tags":[],"class_list":["post-766","post","type-post","status-publish","format-standard","hentry","category-fpga","category-tools"],"_links":{"self":[{"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/posts\/766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/comments?post=766"}],"version-history":[{"count":14,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/posts\/766\/revisions"}],"predecessor-version":[{"id":1171,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/posts\/766\/revisions\/1171"}],"wp:attachment":[{"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/media?parent=766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/categories?post=766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/tags?post=766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}