Beranda > Arduino > Menampilkan Tulisan di LCD 1602 Menggunakan Arduino Nano dan IC Shift Register 74HC595

Menampilkan Tulisan di LCD 1602 Menggunakan Arduino Nano dan IC Shift Register 74HC595

27 September 2017

Mau bagi ilmu yang baru dipelajari tentang bagaimana cara menghubungkan LCD 16X02 dan IC 74HC595 menggunakan Ardunino Nano.

Alat yang dibutuhkan :

1. Arduino Nano.
2. Potensiometer 20K (yang gw punya).
3. 74HC595 Shift Register.
4. Resistor 220 ohm.
5. Library LiquidCrystal.

Buat koneksi rangkaian seperti dibawah ini :

Arduino Uno <—> IC 47HC595
D10 <—> Pin 12 (Latch)
D11 <—> Pin 14 (Data)
D13 <—> Pin 11 (Clock)

LCD 16X02 <—> IC 47HC595

4 (RS) <—> Pin 1
6 (E) <—> Pin 3
11 (D4) <—> Pin 4
12 (D5) <—> Pin 5
13 (D6) <—> Pin 6
14 (D7) <—> Pin 7

LCD 16X02

1 (GND) <—> GND
2 (+5V) <—> 5V
3 (Vo Contras) <—> Potensiometer
5 (R/W) <—> GND
15 (Led+) <—> 220 ohm <—> 5V
16 (Led-) <—> GND

Berikut sketch yang diambil dari example library:


/*
LiquidCrystal Library - Hello World

Demonstrates the use a 16x2 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
* 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(10);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Yopi Ardinal...!!!");
}

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("Angka : ");
lcd.print(millis()/1000);
}

PCBnya nyusul nanti coba dibuat….

Source : https://playground.arduino.cc/Main/LiquidCrystal

Kategori:Arduino Tag:, , ,
%d blogger menyukai ini: