{"id":180,"date":"2014-09-24T23:35:37","date_gmt":"2014-09-25T06:35:37","guid":{"rendered":"http:\/\/ismellsmoke.net\/\/?p=180"},"modified":"2014-09-27T23:58:28","modified_gmt":"2014-09-28T06:58:28","slug":"hacking-a-bv4618-20x4-lcd-part-1","status":"publish","type":"post","link":"https:\/\/ismellsmoke.net\/?p=180","title":{"rendered":"Hacking a BV4618 20&#215;4 LCD (Part-1)"},"content":{"rendered":"<p>My <a title=\"Hacking a 20\u00d74 LCD for RFID Research\" href=\"https:\/\/ismellsmoke.net\/\/?p=165\">previous post<\/a> describes my new venture into RFID hacking using a Tastic RFID stealer. The Tastic gadget requires a serial 4&#215;20 LCD to display a proximity cards site code and serial number. I purchased a <a title=\"ByVac 4618 LCD\" href=\"http:\/\/www.byvac.com\/bv3\/index.php?route=product\/product&amp;path=35_37&amp;product_id=133\" target=\"_blank\">ByVac BV4618 LCD<\/a> as a replacement to the LCD listed in the Tastic specifications due to local availability.<\/p>\n<p><a href=\"https:\/\/ismellsmoke.net\/\/wp-content\/uploads\/2014\/09\/BV4618.jpg\">\u00a0 <\/a><a href=\"https:\/\/ismellsmoke.net\/\/wp-content\/uploads\/2014\/09\/BV4618.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-173\" src=\"https:\/\/ismellsmoke.net\/\/wp-content\/uploads\/2014\/09\/BV4618-300x185.jpg\" alt=\"BV4618 4x20 LCD\" width=\"238\" height=\"150\" \/><\/a><a href=\"https:\/\/ismellsmoke.net\/\/wp-content\/uploads\/2014\/09\/BV4618_Back.jpg\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/a><a href=\"https:\/\/ismellsmoke.net\/\/wp-content\/uploads\/2014\/09\/BV4618_Back.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-174\" src=\"https:\/\/ismellsmoke.net\/\/wp-content\/uploads\/2014\/09\/BV4618_Back-300x184.jpg\" alt=\"\" width=\"241\" height=\"153\" \/><\/a><\/p>\n<p>As Sopwith always advises, the first thing you need to do with a new gadget is to download the datasheet. You can find it <a title=\"BV4618 Datasheet\" href=\"http:\/\/www.byvac.co.uk\/downloads\/datasheets\/BV4618%20Datasheet.pdf\" target=\"_blank\">here<\/a>. The internal controller\/driver of the LCD is a <a title=\"Hitachi HD44780\" href=\"https:\/\/www.sparkfun.com\/datasheets\/LCD\/HD44780.pdf\" target=\"_blank\">Hitachi HD44780<\/a>. This very popular device can be found in all types of LCD applications. The BV4618 piggybacks on the HD44780 providing a very convenient communication interface.<\/p>\n<p>The BV4618 provides three interfaces. A serial interface provides support for both TTL and RS-232. This means you can connect a MCU such an Arduino or Raspberry PI, or use 12V serial connections to a serial port on a PC. There is also an I2C interface and support for a small numeric keypad.<\/p>\n<p><!--more--><\/p>\n<p>Let&#8217;s see if we can get this cool little gadget up and running without producing any smoke. Wiring an Arduino Uno to the LCD is a snap. You can see a wiring diagram <a title=\"Arduino wiring\" href=\"https:\/\/ismellsmoke.net\/\/wp-content\/uploads\/2014\/09\/Arduino_BV46181.pdf\" target=\"_blank\">here<\/a>. You can see in the diagram, power is provided to the LCD from the Arduino 5+ and ground pins. Pin-0 (Rx) from the Arduino is wired to the Rx pin on the BV4618. Pin-1 (Tx) goes to the BV4618 Tx pin. Done. Nothing could be simpler.<\/p>\n<p>No wait! It can be simpler. If you do not need to &#8216;read&#8217; anything from the LCD such as the firmware version, device ID, or ACK&#8217;s after sending a command, you can discard the Arduino Pin-0 (Rx) connection. Now what we have is a working LCD requiring only three wires &#8211; power, ground, and a Tx. This is why the designers of the Tastic RFID stealer used a serial I\/F LCD. It simplified the design.<\/p>\n<p>Now that the LCD is wired up, power up your Arduino and you should see the LCD come to life. The device is &#8216;smart&#8217; enough to figure out you want to talk to it though the TTL serial I\/F. The BV4618 is also smart enough to automatically configure the baud rate. It does this by looking for a CR byte (0x13) when powered up. That is why you see a &#8216;Press CR&#8217; on the display.<\/p>\n<div id=\"attachment_205\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ismellsmoke.net\/\/wp-content\/uploads\/2014\/09\/Snap37.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-205\" class=\"wp-image-205 size-medium\" src=\"https:\/\/ismellsmoke.net\/\/wp-content\/uploads\/2014\/09\/Snap37-300x117.jpg\" alt=\"LCD waiting CR initiator\" width=\"300\" height=\"117\" srcset=\"https:\/\/ismellsmoke.net\/wp-content\/uploads\/2014\/09\/Snap37-300x117.jpg 300w, https:\/\/ismellsmoke.net\/wp-content\/uploads\/2014\/09\/Snap37-500x196.jpg 500w, https:\/\/ismellsmoke.net\/wp-content\/uploads\/2014\/09\/Snap37.jpg 588w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-205\" class=\"wp-caption-text\">LCD waiting CR initiator<\/p><\/div>\n<p>In Part-2 of this series I will show how to install the required Arduino libraries for the BV4618 LCD. Then we can cut some code!<\/p>\n<p><em>Sopwith<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My previous post describes my new venture into RFID hacking using a Tastic RFID stealer. The Tastic gadget requires a serial 4&#215;20 LCD to display a proximity cards site code and serial number. I purchased a ByVac BV4618 LCD as &hellip; <a href=\"https:\/\/ismellsmoke.net\/?p=180\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,6],"tags":[],"class_list":["post-180","post","type-post","status-publish","format-standard","hentry","category-arduino","category-general","category-how-to"],"_links":{"self":[{"href":"https:\/\/ismellsmoke.net\/index.php?rest_route=\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ismellsmoke.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ismellsmoke.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ismellsmoke.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ismellsmoke.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=180"}],"version-history":[{"count":13,"href":"https:\/\/ismellsmoke.net\/index.php?rest_route=\/wp\/v2\/posts\/180\/revisions"}],"predecessor-version":[{"id":206,"href":"https:\/\/ismellsmoke.net\/index.php?rest_route=\/wp\/v2\/posts\/180\/revisions\/206"}],"wp:attachment":[{"href":"https:\/\/ismellsmoke.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ismellsmoke.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ismellsmoke.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}