{"id":740,"date":"2021-06-02T15:52:30","date_gmt":"2021-06-02T15:52:30","guid":{"rendered":"https:\/\/vegaprocessors.in\/blog\/?p=740"},"modified":"2022-06-01T13:06:36","modified_gmt":"2022-06-01T13:06:36","slug":"lcd-2004a-module-with-thejas-soc","status":"publish","type":"post","link":"https:\/\/vegaprocessors.in\/blog\/lcd-2004a-module-with-thejas-soc\/","title":{"rendered":"LCD 2004A Module with  ARIES v2 Board"},"content":{"rendered":"\n<p><strong>LCD modules<\/strong>&nbsp;are commonly used in most embedded projects because they are cheap, available, and programmer-friendly.&nbsp;Alphanumeric Graphical LCD (2004A) is a 20&#215;4 Blue Coloured Liquid Crystal Display. It can display 4 lines of text and each line can have up to 20 characters in it, which is bigger than the&nbsp;16&#215;2 LCD&nbsp;but the programming is almost the same.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">LCD 2004A Module<\/h2>\n\n\n\n<p>Each character has 40 Pixels and for 80 Characters we will have 3200 Pixels. Further, the LCD should also be instructed about the Position of the Pixels. It is a hectic task for the microcontroller, hence\u00a0<strong>Driver IC like ST7066<\/strong>\u00a0is used, which is mounted on the backside of the LCD Module. It takes data\u00a0from the microcontroller and processes them to display on the LCD Screen. You can use it in 8 bit parallel interface or 4 bit parallel interface mode if you need to connect fewer lines to the microcontroller.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"420\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/06\/LCD_Display_20x4_Pinout_600x600.png\" alt=\"\" class=\"wp-image-762\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/06\/LCD_Display_20x4_Pinout_600x600.png 600w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/06\/LCD_Display_20x4_Pinout_600x600-300x210.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-41665783-295e-4655-8277-d85b700b7227\">Circuit Diagram<\/h2>\n\n\n\n<p id=\"block-f309353c-9913-4a11-b66b-e7f73d336b88\"><strong>LCD 2004A<\/strong> is composed of<strong> <\/strong>8 data lines. We use only 4 in our example. Connect<strong> VDD<\/strong> and <strong>VSS<\/strong>  of LCD module to <strong>+5V<\/strong> and  <strong>GND<\/strong> pin respectively of ARIES v2 board. <strong>Register Select pin(RS)<\/strong> and <strong>Enable pin (EN)<\/strong> is connected to <strong>GPIO3<\/strong> and <strong>GPIO5<\/strong> pins respectively of ARIES v2 board. <strong>Read\/Write pin<\/strong> of LCD module can be either connected to<strong> GPIO4<\/strong> of ARIES v2 board or shorted GND. <\/p>\n\n\n\n<p>Connecting a preset\/potentiometer with the <strong>Contrast Setting pin<\/strong> of LCD module will help us modulate the contrast of the display.<\/p>\n\n\n\n<p>As we said earlier, here we use 4-bit data transmission, so only 4 data lines are connected. <\/p>\n\n\n\n<p>Now, for powering up the ARIES v2 board via USB port of a Laptop\/Desktop\/PC and burning the code into the ARIES v2 board, we have to use a micro USB type B to USB type A cable. The cable should be connected to <strong>UART0<\/strong> port of the ARIES v2 board, and the Laptop\/Desktop\/PC should be preinstalled with VEGA SDK and Toolchain.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/05\/pinmap_Ar_LCD.jpg\" alt=\"\" class=\"wp-image-1187\" width=\"839\" height=\"540\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/05\/pinmap_Ar_LCD.jpg 811w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/05\/pinmap_Ar_LCD-300x193.jpg 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/05\/pinmap_Ar_LCD-768x494.jpg 768w\" sizes=\"auto, (max-width: 839px) 100vw, 839px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>LCD 2004A<\/strong><\/td><td><strong>ARIES v2 Board<\/strong><\/td><\/tr><tr><td>VDD<\/td><td>5V<\/td><\/tr><tr><td>VSS<\/td><td>GND<\/td><\/tr><tr><td>RS<\/td><td>GPIO3<\/td><\/tr><tr><td>RW<\/td><td>GPIO4<\/td><\/tr><tr><td>ENABLE<\/td><td>GPIO5<\/td><\/tr><tr><td>DB4<\/td><td>GPIO6<\/td><\/tr><tr><td>DB5<\/td><td>GPIO7<\/td><\/tr><tr><td>DB6<\/td><td>GPIO8<\/td><\/tr><tr><td>DB7<\/td><td>GPIO9<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-32cb08e5-87b9-4300-9e46-a29be4436adc\"><strong>Procedure<\/strong><\/h2>\n\n\n\n<p id=\"block-fe352b07-a674-4754-b285-bafd33106df7\">After setting up the toolchain and SDK path environments, build the example program for the LCD 2004A  module by:<\/p>\n\n\n\n<pre id=\"block-98c3408c-130d-4e1c-9247-614ed2ea2608\" class=\"wp-block-code\"><code>cd vega-sdk\/examples\/gpio\/lcd_2004a_demo<\/code><\/pre>\n\n\n\n<p><strong>make clean<\/strong> command to clean the executable :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make clean<\/code><\/pre>\n\n\n\n<p>then use <strong><em>make <\/em><\/strong>command to build it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make<\/code><\/pre>\n\n\n\n<p>Now, we can transfer the built program to the board, before transfer please ensure that you have connected the UART0 connector of the board to the PC.<\/p>\n\n\n\n<p id=\"block-09fbc4ed-2d51-4916-86e3-5e9d9fc312e3\">Open a new terminal and execute the following command.<\/p>\n\n\n\n<pre id=\"block-42a9557f-d0e9-4acf-badc-ec94ff360de9\" class=\"wp-block-code\"><code>sudo minicom aries<\/code><\/pre>\n\n\n\n<p id=\"block-1ce27174-d8f5-4c2b-b17d-683db89940be\">Now you can see the minicom terminal opened and the board UART terminal is ready.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\" id=\"block-1353a31a-4d2d-4bd7-ac98-7d65cae80fc3\"><img loading=\"lazy\" decoding=\"async\" width=\"820\" height=\"689\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-6.png\" alt=\"\" class=\"wp-image-602\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-6.png 820w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-6-300x252.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-6-768x645.png 768w\" sizes=\"auto, (max-width: 820px) 100vw, 820px\" \/><\/figure>\n\n\n\n<p id=\"block-cd6a17a4-c39e-456a-bd13-46a767c681b1\">Use CTRL+A S to enter file sending menu and select xmodem by pressing <strong>Enter<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\" id=\"block-09ca85fc-b896-45b0-b7c3-7325f27c48e7\"><img decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/Screenshot-from-2021-04-30-16-14-03.png\" alt=\"This image has an empty alt attribute; its file name is Screenshot-from-2021-04-30-16-14-03.png\"\/><\/figure>\n\n\n\n<p id=\"block-0493bb63-b7da-4838-b324-03dc3e63853a\">In the next window, with the <strong>Space bar<\/strong> select the <strong>lcd_2004a_demo.bin<\/strong> file to be transferred, by pressing <strong>Enter<\/strong>, the transfer process starts.<\/p>\n\n\n\n<p id=\"block-c0f4d3e2-615d-46dc-b456-17b196e9c263\">Wait until the process is completed. The screen should display how much data has been transferred.<\/p>\n\n\n\n<p id=\"block-cf92dbc8-fa97-4bed-aa6d-e08e48e7877e\">After completing transfer the Program will start to execute.<\/p>\n\n\n\n<p id=\"block-c0d91f20-0043-4ee4-9abc-95d51109316b\">The output is displayed in minicom UART terminal:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"932\" height=\"703\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-from-2021-06-01-12-04-51.png\" alt=\"\" class=\"wp-image-744\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-from-2021-06-01-12-04-51.png 932w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-from-2021-06-01-12-04-51-300x226.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/06\/Screenshot-from-2021-06-01-12-04-51-768x579.png 768w\" sizes=\"auto, (max-width: 932px) 100vw, 932px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"16X4 LCD Display Demo using VEGA Processor [ RISC-V ISA]\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/oh6GXVCCbA8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>For additional information :<\/p>\n\n\n\n<p><a href=\"https:\/\/www.vishay.com\/docs\/37314\/lcd020n004l.pdf\">https:\/\/www.vishay.com\/docs\/37314\/lcd020n004l.pdf<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>LCD modules&nbsp;are commonly used in most embedded projects because they are cheap, available, and programmer-friendly.&nbsp;Alphanumeric Graphical LCD (2004A) is a 20&#215;4 Blue Coloured Liquid Crystal Display. It can display 4 lines of text and each line can have up to 20 characters in it, which is bigger than the&nbsp;16&#215;2 LCD&nbsp;but the programming is almost the [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,14,1],"tags":[75,7,68,61,26,31,24],"class_list":["post-740","post","type-post","status-publish","format-standard","hentry","category-getting-started","category-tutorials","category-uncategorized","tag-aries-v2-board","tag-cdac","tag-gpio","tag-lcd-2004a","tag-thejas-64","tag-thejas32","tag-vegaprocessor"],"_links":{"self":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/comments?post=740"}],"version-history":[{"count":18,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/740\/revisions"}],"predecessor-version":[{"id":1263,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/740\/revisions\/1263"}],"wp:attachment":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/media?parent=740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/categories?post=740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/tags?post=740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}