{"id":12254,"date":"2023-01-07T07:45:46","date_gmt":"2023-01-07T07:45:46","guid":{"rendered":"https:\/\/www.qec.tw\/?p=12254"},"modified":"2024-11-16T11:09:38","modified_gmt":"2024-11-16T11:09:38","slug":"lcdinit","status":"publish","type":"post","link":"https:\/\/www.qec.tw\/ja\/ethercat\/api\/dmp\/lcd\/lcdinit\/","title":{"rendered":"EthercatDevice_DmpLCD.lcdInit()"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">[EthercatDevice_DmpLCD_Generic]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Description<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Initialize the LCD module on the EtherCAT slave device.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Derived Class:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes has-small-font-size\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Class Name<\/strong><\/td><td><strong>Vendor ID<\/strong><\/td><td><strong>Product Code<\/strong><\/td><\/tr><tr><td>EthercatDevice_QECR11UN01<\/td><td>0x00000bc3<\/td><td>0x0086d103<\/td><\/tr><tr><td>EthercatDevice_QECR00UN01<\/td><td>0x00000bc3<\/td><td>0x0086d100<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Syntax<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>int lcdInit(uint16_t lcd_id = ECAT_LCD_UNKNOWN_ID);<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Parameters<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>[in] uint16_t lcd_id<\/code><br>The ID of the LCD module to be initialized. The list of supported LCD modules is as follows, including the configuration of the touch pins (Xp, Yp, Xm, Ym):<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-table is-style-stripes has-small-font-size\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Definition<\/strong><\/td><td><strong>ID<\/strong><\/td><td><strong>IC<\/strong><\/td><td><strong>Resolution<\/strong><\/td><td><strong>Xp<\/strong><\/td><td><strong>Yp<\/strong><\/td><td><strong>Xm<\/strong><\/td><td><strong>Ym<\/strong><\/td><\/tr><tr><td><code>ECAT_LCD_ILI9341_1<\/code><\/td><td>0<\/td><td>ILI9341<\/td><td>240 X 320<\/td><td>D9<\/td><td>A2<\/td><td>A3<\/td><td>D8<\/td><\/tr><tr><td><code>ECAT_LCD_ILI9341_2<\/code><\/td><td>1<\/td><td>ILI9341<\/td><td>240 X 320<\/td><td>D6<\/td><td>A1<\/td><td>A2<\/td><td>D7<\/td><\/tr><tr><td><code>ECAT_LCD_ILI9488_1<\/code><\/td><td>2<\/td><td>ILI9488<\/td><td>320 X 480<\/td><td>D8<\/td><td>A3<\/td><td>A2<\/td><td>D9<\/td><\/tr><tr><td><code>ECAT_LCD_ILI9486_1<\/code><\/td><td>3<\/td><td>ILI9486<\/td><td>320 X 480<\/td><td>&#8211;<\/td><td>&#8211;<\/td><td>&#8211;<\/td><td>&#8211;<\/td><\/tr><tr><td><code>ECAT_LCD_HX8347I_1<\/code><\/td><td>4<\/td><td>HX8347-I(T)<\/td><td>240 X 320<\/td><td>D9<\/td><td>A2<\/td><td>A3<\/td><td>D8<\/td><\/tr><tr><td><code>ECAT_LCD_HX8347D_1<\/code><\/td><td>5<\/td><td>HX8347-D<\/td><td>240 X 320<\/td><td>D9<\/td><td>A2<\/td><td>A3<\/td><td>D8<\/td><\/tr><tr><td><code>ECAT_LCD_UNKNOWN_ID<\/code><\/td><td>0xFFFF<\/td><td>&#8211;<\/td><td>&#8211;<\/td><td>&#8211;<\/td><td>&#8211;<\/td><td>&#8211;<\/td><td>&#8211;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If this parameter is <code>ECAT_LCD_UNKNOWN_ID<\/code>, the ID of the LCD module and calibration parameters are loaded from the storage on the EtherCAT slave device.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Return Value<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Return an&nbsp;<a href=\"https:\/\/www.qec.tw\/ethercat\/api\/error-code\/\">error code<\/a>. If the returned value is zero, it indicates a successful execution of this function.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Comment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This function must be called after a successful execution of&nbsp;<a href=\"https:\/\/www.qec.tw\/ethercat\/api\/master\/ethercatmaster-begin\/\"><code>EthercatMaster::begin()<\/code><\/a>. This function is blocking and cannot be called within the Cyclic Callback.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example<\/h2>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>#include &quot;Ethercat.h&quot;\n\nEthercatMaster master;\nEthercatDevice_QECR00UN01 slave;\n\nvoid setup() {\n  master.begin();\n  slave.attach(0, master);\n  slave.lcdInit(ECAT_LCD_ILI9341_1);\n  \/\/ ...\n}\n\nvoid loop() {\n  \/\/ ...\n}<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Please see&nbsp;<a href=\"https:\/\/www.qec.tw\/ethercat\/api\/dmp\/lcd\/\">EthercatDevice_DmpLCD_Generic Class<\/a>&nbsp;for more QEC Stepper Drivers instructions and API usage.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[EthercatDevice_DmpLCD_Generic] Description Initialize the LCD module on the EtherCAT slave device. Derived Class: Class Name Vendor ID Product Code EthercatDevice_QECR11UN01 0x00000bc3 0x0086d103 EthercatDevice_QECR00UN01 0x00000bc3 0x0086d100 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":12255,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[266],"tags":[162,54,191],"class_list":["post-12254","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lcd","tag-86duino","tag-ethercat","tag-qec"],"_links":{"self":[{"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/posts\/12254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/comments?post=12254"}],"version-history":[{"count":0,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/posts\/12254\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/media\/12255"}],"wp:attachment":[{"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/media?parent=12254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/categories?post=12254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qec.tw\/ja\/wp-json\/wp\/v2\/tags?post=12254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}