{"id":3083,"date":"2011-03-27T19:28:26","date_gmt":"2011-03-27T23:28:26","guid":{"rendered":"https:\/\/example.com\/?postname=2-8%e2%80%b3-lcd-trouble"},"modified":"2011-03-27T19:28:26","modified_gmt":"2011-03-27T23:28:26","slug":"2-8%e2%80%b3-lcd-trouble","status":"publish","type":"post","link":"http:\/\/atomsofttech.com\/blog\/uncategorized\/2-8%e2%80%b3-lcd-trouble\/","title":{"rendered":"2.8\u2033 LCD trouble"},"content":{"rendered":"<p>Ok this is driving me nuts. I have been trying all day to get anything on these LCDs. Any color&#8230; anything!<\/p>\n<p>Ok my issue is this, i downloaded the example code which is intended for a ARM processor. I converted it for my PIC18F4620.<\/p>\n<p>The issue with converting it is, it was made for a 16bit interface and i have no clue on how to make it 8bit. I know from the datasheet there are 2 major pins.<\/p>\n<p>IM0 and IM3, it states:<\/p>\n<p><a href=\"http:\/\/atomsoft.wordpress.com\/wp-content\/uploads\/2011\/03\/imx.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1380\" title=\"imx\" src=\"http:\/\/atomsoft.wordpress.com\/wp-content\/uploads\/2011\/03\/imx.jpg?w=300\" alt=\"\" width=\"398\" height=\"95\" srcset=\"http:\/\/atomsofttech.com\/blog\/wp-content\/uploads\/2011\/03\/imx.jpg 528w, http:\/\/atomsofttech.com\/blog\/wp-content\/uploads\/2011\/03\/imx-300x73.jpg 300w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><\/a><\/p>\n<p>So i have IM0 to VCC and IM3 to GND for 8bit mode.<\/p>\n<p>Issue 2, in the datasheet i would expect to see examples on how to transfer data in 8bit mode&#8230; or well every mode, but ah nothing is there.<\/p>\n<p>So i have no clue if im even toggling the data correctly.<\/p>\n<p>This is original code for 16bit data transfer:<\/p>\n<p>void wr_cmd(u16 cmd)<br \/>\n{<br \/>\nA0_L;<br \/>\nCSTFT_L;<br \/>\nWRTFT_L;<br \/>\nSET_DATATFT(cmd);<br \/>\nWRTFT_H;<br \/>\nCSTFT_H;<br \/>\n}<\/p>\n<p>This is my code:<\/p>\n<p>void wr_cmd(unsigned int cmd)<br \/>\n{<br \/>\nRS = 0; \/\/Same as A0<br \/>\nCS=0;<\/p>\n<p>WR=0;<br \/>\nTFT_DATA = ((cmd&gt;&gt;8)&amp;0xFF);<br \/>\nWR=1;<\/p>\n<p>WR=0;<br \/>\nTFT_DATA = (cmd&amp;0xFF);<br \/>\nWR=1;<\/p>\n<p>CS=1;<br \/>\n}<\/p>\n<p>I am assuming that toggling the WR pin is how we send 2 bytes of data to represent 1 word.<br \/>\nBut the LCD doesnt seem to do anything.<\/p>\n<p>Can anyone help me out?<\/p>\n<p>Complete code so far: http:\/\/www.filedropper.com\/28lcd<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ok this is driving me nuts. I have been trying all day to get anything on these LCDs. Any color&#8230; anything! Ok my issue is this, i downloaded the example code which is intended for a ARM processor. I converted it for my PIC18F4620. The issue with converting it is, it was made for a [&hellip;]<\/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-3083","post","type-post","status-publish","format-standard","hentry"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/atomsofttech.com\/blog\/wp-json\/wp\/v2\/posts\/3083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/atomsofttech.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/atomsofttech.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/atomsofttech.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/atomsofttech.com\/blog\/wp-json\/wp\/v2\/comments?post=3083"}],"version-history":[{"count":0,"href":"http:\/\/atomsofttech.com\/blog\/wp-json\/wp\/v2\/posts\/3083\/revisions"}],"wp:attachment":[{"href":"http:\/\/atomsofttech.com\/blog\/wp-json\/wp\/v2\/media?parent=3083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/atomsofttech.com\/blog\/wp-json\/wp\/v2\/categories?post=3083"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/atomsofttech.com\/blog\/wp-json\/wp\/v2\/tags?post=3083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}