{"id":68537,"date":"2019-12-15T12:48:07","date_gmt":"2019-12-15T06:48:07","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=68537"},"modified":"2022-01-09T13:16:16","modified_gmt":"2022-01-09T07:16:16","slug":"stm-tft-%d0%b4%d0%b8%d1%81%d0%bf%d0%bb%d0%b5%d0%b9-spi-320x240-ili9341c","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=68537","title":{"rendered":"STM32 + TFT-\u0434\u0438\u0441\u043f\u043b\u0435\u0439 SPI 320\u00d7240 (ILI9341C)"},"content":{"rendered":"<p>TFT-\u0434\u0438\u0441\u043f\u043b\u0435\u0439 SPI 320\u00d7240 (ILI9341C) \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 \u043f\u043b\u0430\u0442\u043e\u0439 STM32 \u0431\u0430\u0437\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 STM32F103C8T6 \u0438\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 \u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0441 Arduino Nano. \u0420\u0430\u0431\u043e\u0442\u0430 \u043b\u043e\u0433\u0438\u043a\u0438 \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 3,3 \u0412, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a STM32.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/7538270973249.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-68538\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/7538270973249.png\" alt=\"\" width=\"508\" height=\"354\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/7538270973249.png 782w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/7538270973249-200x139.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/7538270973249-500x348.png 500w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/7538270973249-768x535.png 768w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/a><\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u043a STM32 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435:<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/0783749734.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-68539\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/0783749734.png\" alt=\"\" width=\"650\" height=\"530\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/0783749734.png 650w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/0783749734-200x163.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/0783749734-500x408.png 500w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n<p>\u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043b\u0430\u0442\u044b STM32 \u0432 Arduino IDE \u0442\u0430\u043a \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 TFT-\u0434\u0438\u0441\u043f\u043b\u0435\u0439 SPI 320\u00d7240 (ILI9341C).<\/p>\n<p>\u041a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043b\u0430\u0442\u0443 STM32 \u0432 Arduino IDE \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0432 &#8212; <strong><a href=\"http:\/\/rcl-radio.ru\/?p=68376\">STM32 Arduino IDE<\/a><\/strong><\/p>\n<div id=\"marketWidget\"><\/div>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">\/\/ \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/12\/Arduino_STM32-master.zip\">Arduino_STM32-master<\/a>.zip<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include \"SPI.h\"<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;Adafruit_GFX_AS.h&gt;   \/\/ http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/06\/Adafruit_GFX.zip<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;Adafruit_ILI9341_STM.h&gt;<\/span>\r\n\u00a0\r\n<span style=\"color: #808080; font-style: italic;\">#define TFT_CS         PA1                 <\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#define TFT_DC         PA2             <\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#define TFT_RST        PA3<\/span>\r\n\u00a0\r\nlong i;\r\n\u00a0\r\nAdafruit_ILI9341_STM tft = Adafruit_ILI9341_STM<span style=\"color: #66cc66;\">(<\/span>TFT_CS, TFT_DC, TFT_RST<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ Mosi - PA7, SCK - PA5 <\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n  tft.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>; \r\n  tft.<span style=\"color: #006600;\">setRotation<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span>;tft.<span style=\"color: #006600;\">fillScreen<\/span><span style=\"color: #66cc66;\">(<\/span>ILI9341_BLACK<span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #0066cc;\">void<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  tft.<span style=\"color: #006600;\">setCursor<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>, <span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">setTextColor<\/span><span style=\"color: #66cc66;\">(<\/span>ILI9341_RED<span style=\"color: #66cc66;\">)<\/span>;  tft.<span style=\"color: #006600;\">setTextSize<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"RCL-RADIO.RU\"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">setTextColor<\/span><span style=\"color: #66cc66;\">(<\/span>ILI9341_BLUE<span style=\"color: #66cc66;\">)<\/span>;  tft.<span style=\"color: #006600;\">setTextSize<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"RCL-RADIO.RU\"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">setTextColor<\/span><span style=\"color: #66cc66;\">(<\/span>ILI9341_GREEN<span style=\"color: #66cc66;\">)<\/span>;  tft.<span style=\"color: #006600;\">setTextSize<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"RCL-RADIO.RU\"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">setTextColor<\/span><span style=\"color: #66cc66;\">(<\/span>ILI9341_WHITE<span style=\"color: #66cc66;\">)<\/span>;  tft.<span style=\"color: #006600;\">setTextSize<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">4<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"RCL-RADIO.RU\"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n\u00a0\r\n  tft.<span style=\"color: #006600;\">fillRect<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">150<\/span>,<span style=\"color: #cc66cc;\">150<\/span>,<span style=\"color: #cc66cc;\">180<\/span>,ILI9341_BLACK<span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #006600;\">setTextSize<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n\u00a0\r\n  tft.<span style=\"color: #006600;\">setTextColor<\/span><span style=\"color: #66cc66;\">(<\/span>ILI9341_WHITE<span style=\"color: #66cc66;\">)<\/span>; \r\n  tft.<span style=\"color: #006600;\">setCursor<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>, <span style=\"color: #cc66cc;\">150<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  tft.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span>i++<span style=\"color: #66cc66;\">)<\/span>;\r\n\u00a0\r\n  delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>TFT-\u0434\u0438\u0441\u043f\u043b\u0435\u0439 SPI 320\u00d7240 (ILI9341C) \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 \u043f\u043b\u0430\u0442\u043e\u0439 STM32 \u0431\u0430\u0437\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 STM32F103C8T6 \u0438\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 \u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0441 Arduino Nano. \u0420\u0430\u0431\u043e\u0442\u0430 \u043b\u043e\u0433\u0438\u043a\u0438 \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0438\u043c\u0435\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 3,3 \u0412, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a STM32. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u043a STM32 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435: \u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043b\u0430\u0442\u044b STM32 \u0432 Arduino IDE [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":68538,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239],"tags":[],"class_list":["post-68537","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"views":29188,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/68537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68537"}],"version-history":[{"count":6,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/68537\/revisions"}],"predecessor-version":[{"id":111303,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/68537\/revisions\/111303"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/68538"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68537"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}