{"id":63,"date":"2013-03-26T16:04:13","date_gmt":"2013-03-26T16:04:13","guid":{"rendered":"http:\/\/nofl.biz\/blog\/?p=63"},"modified":"2013-03-26T16:04:13","modified_gmt":"2013-03-26T16:04:13","slug":"rgpio-lcd-screens","status":"publish","type":"post","link":"https:\/\/beneford.com\/Blog\/index.php\/2013\/03\/26\/rgpio-lcd-screens\/","title":{"rendered":"RGPIO &#8211; LCD Screens"},"content":{"rendered":"<p>Common Character LCD Screens can be controlled with\u00a0between 6 and 11 GPIO pins. RGPIO L-Mode contains simple support for a 6-pin or 7-pin solution. The 6 or 7\u00a0pins are D4,D5,D6,D7,EN,RS with an optional RW (for most uses RW can be hard-wired to GND).<\/p>\n<p>Initialize RGPIO with the ports:<\/p>\n<pre>L&lt;RS&gt;,&lt;RW&gt;,&lt;EN&gt;,&lt;D4&gt;,&lt;D5&gt;,&lt;D6&gt;,&lt;D7&gt;D<\/pre>\n<p>For the PiBoard, the initialization is (RW is hardwired to GND, and we use 0 for that pin:<\/p>\n<pre>L17,0,11,22,23,24,25C<\/pre>\n<p>The initialization will reset the the screen and clear it.<br \/>\nSome screens need additional initialization which need to be sent to the screen separately.<br \/>\nTo write characters to the LCD:<\/p>\n<pre>LDHello world<\/pre>\n<p>To send special codes, use \\Cxx or \\Xxx where xx is a hexadecimal pair. \\C for a command (RS=1) and \\X for a character (RS=0). For example, to write to the screen&#8217;s top-left, prefix with \\C80. (the beginning of row 2 is often \\CA0 on a 2-line screen).<br \/>\nSpecial positioning commands include \\C01 (clear screen); \\C02 (go to top left)<br \/>\nWhen sending \\ using a command shell or programming language that uses \\ as an escape character, you will need to double it:<\/p>\n<pre>.\/p LD\\\\C80<\/pre>\n<p>These screens usually have a built-in font with most of the characters you need, and with the ability to add your own characters at code positions 00-07 or 00-0F.<br \/>\nTo add an elipsis at character position 00 (6 blank rows, one row of alternate bits,1 blank row):<\/p>\n<pre>LD\\C40\\x00\\x00\\x00\\x00\\x00\\x00\\x15\\x00\\xC80<\/pre>\n<p>To print a short line of elipsis characters<\/p>\n<pre>LD\\x00\\x00\\x00\\x00\\xC80<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Common Character LCD Screens can be controlled with\u00a0between 6 and 11 GPIO pins. RGPIO L-Mode contains simple support for a 6-pin or 7-pin solution. The 6 or 7\u00a0pins are D4,D5,D6,D7,EN,RS with an optional RW (for most uses RW can be hard-wired to GND). Initialize RGPIO with the ports: L&lt;RS&gt;,&lt;RW&gt;,&lt;EN&gt;,&lt;D4&gt;,&lt;D5&gt;,&lt;D6&gt;,&lt;D7&gt;D For the PiBoard, the initialization is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,4,5,1],"tags":[],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-linux","category-raspberry-pi","category-rgpio","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":0,"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"wp:attachment":[{"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}