{"id":268804,"date":"2015-11-23T17:49:02","date_gmt":"2015-11-23T14:49:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=268804"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=268804","title":{"rendered":"LCD 128\u00d764 \u2014 Arduino"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/413\/ab7\/7f8\/413ab77f8d314998b44e82d99f61878f.png\"\/><\/p>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u043d\u043e\u0445\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043f\u043b\u0435\u044f 128\u00d764 \u043a \u0410\u0440\u0434\u0443\u0438\u043d\u043e.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0412 \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0435\u0432, \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u043e\u043c\u0435\u0442\u0440\u043e\u043c (\u043a\u0440\u0443\u0442\u0438\u043b\u043a\u0430 \u0434\u043b\u044f \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0430) \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/istarik.ru\/uploads\/images\/00\/00\/01\/2015\/11\/16\/4c61d2.png\" alt=\"image\"\/><\/p>\n<p>  \u041c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445:<\/p>\n<p>  Vss \u0438\u043b\u0438 GND \u2014 GND.<br \/>  Vdd \u0438\u043b\u0438 VCC \u2014 5 \u0432\u043e\u043b\u044c\u0442.<br \/>  Vo \u2014 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u043e\u043c\u0435\u0442\u0440.<br \/>  D\/I \u0438\u043b\u0438 IRS \u2014 \u043f\u0438\u043d 12 (\u0430\u0440\u0434\u0443\u0438\u043d\u0430).<br \/>  R\/W \u0438\u043b\u0438 IR\/W \u2014 \u043f\u0438\u043d 11 (\u0430\u0440\u0434\u0443\u0438\u043d\u0430).<br \/>  E \u0438\u043b\u0438 IE \u2014 \u043f\u0438\u043d 10 (\u0430\u0440\u0434\u0443\u0438\u043d\u0430).<br \/>  CS1 \u0438\u043b\u0438 PSB \u2014 GND.<br \/>  A \u0438\u043b\u0438 BLA \u2014 3.3 \u0432\u043e\u043b\u044c\u0442\u0430 (\u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u044f).<br \/>  K \u0438\u043b\u0438 BLK \u2014 GND (\u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u044f).<\/p>\n<p>  <i>\u041f\u0438\u043d\u044b \u0430\u0440\u0434\u0443\u0438\u043d\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435.<\/i><\/p>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0441 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u043e\u043c\u0435\u0442\u0440\u043e\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/istarik.ru\/uploads\/images\/00\/00\/01\/2015\/11\/16\/2617a4.png\" alt=\"image\"\/><\/p>\n<p>  \u0411\u0435\u0437 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u043e\u043c\u0435\u0442\u0440\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/istarik.ru\/uploads\/images\/00\/00\/01\/2015\/11\/16\/a1b343.png\" alt=\"image\"\/><\/p>\n<p>  <i>\u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u043e\u043c\u0435\u0442\u0440 \u043e\u0442 2\u043a\u041e\u043c \u0434\u043e 20\u043a\u041e\u043c.<\/i><\/p>\n<p>  \u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"http:\/\/istarik.ru\/file\/u8glib_arduino_v1.18.1.zip\">u8glib<\/a>, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0432 \u0430\u0440\u0434\u0443\u0438\u043d\u0443 \u0441\u043a\u0435\u0442\u0447:<\/p>\n<pre><code>#include &quot;U8glib.h&quot;  U8GLIB_ST7920_128X64 u8g(10, 11, 12, U8G_PIN_NONE); \/\/ \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0438\u043d\u043e\u0432  int val = 2015; char val_to_char[5]={0,};  void setup()  {   u8g.setFont(u8g_font_6x10); \/\/ \u0412\u044b\u0431\u043e\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 }   void loop()  {   sprintf(val_to_char, &quot;%d&quot;,val); \/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f sprintf \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0451\u0442 \u0447\u0438\u0441\u043b\u043e \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432    u8g.firstPage();      do     {      u8g.drawStr(2, 10, &quot;geektimes.ru&quot;); \/\/ \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043d\u0430\u0434\u043f\u0438\u0441\u044c geektimes.ru      u8g.drawStr(2, 27, val_to_char); \/\/ \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0447\u0438\u0441\u043b\u043e 2015    }       while(u8g.nextPage());  }  <\/code><\/pre>\n<p>  \u0412\u044b\u0431\u043e\u0440\u0430 \u0448\u0440\u0438\u0444\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 (\u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438) utility\/u8g.h. \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0431\u043b\u043e\u043a <b>\/* font definitions *\/<\/b>, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445 \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0451 \u0432 <b>void setup()<\/b>.<\/p>\n<pre><code>... \/* font definitions *\/ extern const u8g_fntpgm_uint8_t u8g_font_m2icon_5[] U8G_FONT_SECTION(&quot;u8g_font_m2icon_5&quot;); extern const u8g_fntpgm_uint8_t u8g_font_m2icon_7[] U8G_FONT_SECTION(&quot;u8g_font_m2icon_7&quot;); extern const u8g_fntpgm_uint8_t u8g_font_m2icon_9[] U8G_FONT_SECTION(&quot;u8g_font_m2icon_9&quot;);  extern const u8g_fntpgm_uint8_t u8g_font_u8glib_4[] U8G_FONT_SECTION(&quot;u8g_font_u8glib_4&quot;); extern const u8g_fntpgm_uint8_t u8g_font_u8glib_4r[] U8G_FONT_SECTION(&quot;u8g_font_u8glib_4r&quot;);  extern const u8g_fntpgm_uint8_t u8g_font_6x12_75r[] U8G_FONT_SECTION(&quot;u8g_font_6x12_75r&quot;); extern const u8g_fntpgm_uint8_t u8g_font_6x13_75r[] U8G_FONT_SECTION(&quot;u8g_font_6x13_75r&quot;); <\/code><\/pre>\n<p>  \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 u8g.drawStr(2, 10, \u00abgeektimes.ru\u00bb);, \u043f\u0435\u0440\u0432\u0430\u044f \u0446\u0438\u0444\u0440\u0430 \u2014 \u043e\u0442\u0441\u0442\u0443\u043f \u0441\u043b\u0435\u0432\u0430, \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043e\u0442\u0441\u0442\u0443\u043f \u0441\u0432\u0435\u0440\u0445\u0443.<\/p>\n<p>  <b>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451 \u0438 \u0432\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/b>       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/geektimes.ru\/post\/266216\/\"> http:\/\/geektimes.ru\/post\/266216\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/413\/ab7\/7f8\/413ab77f8d314998b44e82d99f61878f.png\"\/><\/p>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u043d\u043e\u0445\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043f\u043b\u0435\u044f 128\u00d764 \u043a \u0410\u0440\u0434\u0443\u0438\u043d\u043e.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-268804","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/268804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=268804"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/268804\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=268804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=268804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=268804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}