Arduino 003 – LCD Characters Basic

Arduino adalah pengendali mikro single-board yang bersifat open-source, diturunkan dari Wiring platform, dirancang untuk memudahkan penggunaan elektronik dalam berbagai bidang. Hardware-nya memiliki prosesor Atmel AVR dan software-nya memiliki bahasa pemrograman sendiri. Deskripsi lebih lengkap di: https://depokinstruments.com/2015/10/01/arduino-tutorial-001-pendahuluan-digital-io/

Arduino/Genuino Uno (https://www.arduino.cc/en/Main/arduinoBoardUno) adalah model Arduino yang saat ini paling populer di dunia mikrokontroler.

ARDUINO UNO

Spesifikasi lengkap dapat dilihat di: https://depokinstruments.com/2015/10/01/arduino-tutorial-001-pendahuluan-digital-io/

Dalam tutorial kali ini yang akan dibahas adalah tentang tampilan LCD (Liquid Crystal Display) 16×2 karakter, yaitu tampilan LCD yang dapat menampilkan karakter ASCII. LCD seperti ini sangat bermanfaat dalam dunia mikrokontroler, karena ukurannya yang kecil dan tampilannya cukup memadai untuk menampilkan keterangan proses atau hasil dari suatu instrumen. Adapun instalasi LCD terhadap pin-pin Arduino adalah sebagai berikut:

  • VSS = GND
  • VCC = 5V
  • RS = 12
  • R/W = GND
  • EN = 11
  • D0-D3 = tidak dihubungkan
  • D4 = 5
  • D5 = 4
  • D6 = 3
  • D7 = 2

lcd_base_bb_schem

Arduino Script - LCD Hello World

/*
LiquidCrystal Library – Hello World

Demonstrates the use a 16×2 LCD display.  The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

This sketch prints “Hello World!” to the LCD
and shows the time.

The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD’s number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print(“hello, world!”);
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis() / 1000);
}

TW: @deni_dins
FB: https://www.facebook.com/depokinstruments/

Iklan

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s