Ks0256 keyestudio LCD1602 Expansion Shield: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Keyestudio LCD1602 Expansion Shield==
<br>[[File:ks0154.png|500px|frameless|thumb]]<br>


[[image:Ks0256-.png|thumb|700px|right|keyestudio LCD1602 Expansion Shield ]]
<br>
==Introduction==
==Introduction==
Keyestudio LCD1602 expansion shield integrates 1602 LCD display and six buttons into one piece, which is fully compatible with keyestudio UNO R3 control board. It can work just through stacking expansion board on the keyestudio UNO R3 control board, which is very easy and convenient. There are two modes of communication between the 1602 LCD display and keyestudio UNO R3 control board, which are the 8-bit connection method and the four-bit connection method. The expansion board belongs to the four-bit connection method by default. There are six buttons on the expansion board, in which for five control buttons and a reset button. Five control buttons are connected to analog port A0, and when press the different buttons, analog port A0 will output different simulation values. The expansion board has a potentiometer that can be used to adjust the backlight of the display.
The keyestudio LCD shield integrates 1602 LCD display and six buttons into one piece, which is fully compatible with keyestudio UNO R3 control board. It is very simple and convenient for you to stack it onto [http://wiki.keyestudio.com/index.php/Ks0001_keyestudio_UNO_R3_BOARD  UNO board ]. <br>
There are two communication methods for 1602 LCD display and UNO R3 board, separately the 8-Bit connection and 4-Bit connection. <br>
The LCD shield is default the 4-Bit connection. <br>
Under LCD there are 5 control buttons (Select, Up, Down, Left, Right) and a reset button. The 5 buttons are connected with A0 analog input only, so you can monitor button status using just one Arduino input. <br>
Pay attention that the status monitoring is unavailable when several buttons are pressed.<br>
The shield also comes with a potentiometer to adjust the LCD backlight.


==Specification==
<br>


*Module size: 20.5mm * 41mm
==Technical Details==
* 1.LCD size: 20.5mm * 41mm
* 2.Display capacity: 16*2 character
* 3.White texts on blue background
* 4.Comes with a potentiometer to adjust the backlight
* 5.Chip working voltage: 4.5-5.5V
* 6.Working current: 2.0 mA (5.0V)
* 7.Optimum working voltage: 5.0V
* 8.Character size: 2.95*4.35 (W*H) mm
* 9.Dimensions: 80mm *58mm*22mm
* 10.Weight: 51.5g
<br>[[File:Ks0256 size.png|700px|frameless|thumb]]<br>


*Display capacity: 16* 2 characters
<br>
== Pinout Guide ==
<br>[[File:Ks0256 pinout.jpg|800px|frameless|thumb]]<br>


*Chip working voltage: 4.5-5.5 V
<br>
== How to test it? ==


*Working current: 2.0 mA (5.0 V)
=== Connect it Up ===
Simply stack the LCD shield onto UNO board, then connect the board to your computer with a USB cable.
<br>[[File:图片1- ks0256.png|700px|frameless|thumb]]<br>


*Module optimum working voltage: 5.0 V
<br>


*Character size: 2.95 *4.35 (W * H) mm
===Upload the Code ===
*Copy and paste the code below to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE  Arduino IDE ] <br>
*Or [https://drive.google.com/open?id=1KavI1PvtaQY8eSkcowr0Mruq3d9sW66L  click here ] to download the code <br>
*[https://drive.google.com/open?id=1I-VnwhX1IEcYjQvMFjI0TJSc5yfdX9AH  Click here ]to download the libraries ''LiquidCrystal.h''  <br>
 
<span style=color:red>'''Note:''' Before compile the code, do remember to add the necessary libraries inside the libraries folder of Arduino IDE.<br>


==Sample Codes ==
<pre>
<pre>
/*
/*
Line 109: Line 135:
</pre>
</pre>


==Result ==
<br>[[File:Ks0256 upload.png|600px|frameless|thumb]]<br>
<br>


The keyestudio LCD1602 expansion board is stacked on the control board of keyestudio UNO R3. After the power is turned on, the first line of display shows the text, and the second line firstly shows the number, and the number increases; RST key is a reset button, the number will become zero after pressing RST key. Other five buttons will show relative letters in the back side,such as S U D L R. The following figure is shown in detail.
===What you should see?===
Done uploading the code to the board, you should see the LCD screen show “Hello keyestudio” on the first line, and the second line shows the increasing number. <br>
If cannot see the text clearly, rotate the potentiometer on the shield to adjust the screen backlight. <br>
You could press the five buttons to separately get the letter S U D L R, and press the Reset button to restart it again. <br>
<br>[[File:256 (7).jpg|500px|frameless|thumb]]<br>


<br>[[File:256 (7).jpg|500px|frameless|thumb]]<br>
<br>


==Resources ==
==Resources ==


'''Datasheet'''
'''Download code and libraries:''' <br>
 
https://fs.keyestudio.com/KS0256
 
'''VIDEO:'''<br>
http://video.keyestudio.com/KS0256/


http://www.keyestudio.com/files/index/download/id/1500448192/
<br>


==Get One Now ==
==Get One Now ==
*[https://www.keyestudio.com/keyestudio-1602lcd-keypad-shield-for-arduino-lcd-display-atmega2560-for-raspberry-pi-uno-blue-screen-blacklight-module-p0303.html    '''Official Website''' ]
* [https://www.amazon.com/dp/B07B1W7BKT '''Shop on Amazon''']
* [https://www.ebay.co.uk/itm/163166605725 '''Shop on eBay''']
* [https://www.aliexpress.com/store/product/1602LCD-Keypad-Shield-For-Arduino-LCD-Display-ATMEGA328-ATMEGA2560-For-Raspberry-Pi-UNO-Blue-Screen-Blacklight/1452162_32812961850.html?spm=2114.12010612.8148356.22.4fbf276fo20GxY  '''Shop on Aliexpress''']


http://www.keyestudio.com/keyestudio-pro-micro-development-board-246.html


[[Category: shield]]
[[Category: Shield]]

Latest revision as of 14:19, 6 January 2021

keyestudio LCD1602 Expansion Shield


Introduction

The keyestudio LCD shield integrates 1602 LCD display and six buttons into one piece, which is fully compatible with keyestudio UNO R3 control board. It is very simple and convenient for you to stack it onto UNO board .
There are two communication methods for 1602 LCD display and UNO R3 board, separately the 8-Bit connection and 4-Bit connection.
The LCD shield is default the 4-Bit connection.
Under LCD there are 5 control buttons (Select, Up, Down, Left, Right) and a reset button. The 5 buttons are connected with A0 analog input only, so you can monitor button status using just one Arduino input.
Pay attention that the status monitoring is unavailable when several buttons are pressed.
The shield also comes with a potentiometer to adjust the LCD backlight.


Technical Details

  • 1.LCD size: 20.5mm * 41mm
  • 2.Display capacity: 16*2 character
  • 3.White texts on blue background
  • 4.Comes with a potentiometer to adjust the backlight
  • 5.Chip working voltage: 4.5-5.5V
  • 6.Working current: 2.0 mA (5.0V)
  • 7.Optimum working voltage: 5.0V
  • 8.Character size: 2.95*4.35 (W*H) mm
  • 9.Dimensions: 80mm *58mm*22mm
  • 10.Weight: 51.5g


thumb


Pinout Guide


thumb


How to test it?

Connect it Up

Simply stack the LCD shield onto UNO board, then connect the board to your computer with a USB cable.
thumb


Upload the Code

Note: Before compile the code, do remember to add the necessary libraries inside the libraries folder of Arduino IDE.

/*
  Liquid Crystal Library - Hello World

 Demonstrates the use a 16x2 LCD display.  The Liquid Crystal
 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 8
 * LCD Enable pin to digital pin 9
 * LCD D4 pin to digital pin 4
 * LCD D5 pin to digital pin 5
 * LCD D6 pin to digital pin 6
 * LCD D7 pin to digital pin 7
 * Button pin to analog pin A0
 * 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(8, 9, 4, 5, 6, 7);

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

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);
  int val=analogRead(A0);
  Serial.println(val);
  if(val>=0&&val<=50)
  {
    lcd.setCursor(5,1);
    lcd.print("R");
  }
  else if(val>=50&&val<=150)
  {
    lcd.setCursor(5,1);
    lcd.print("U");
  }
  else if(val>=150&&val<=300)
  {
    lcd.setCursor(5,1);
    lcd.print("D");
  }
  else if(val>=300&&val<=500)
  {
    lcd.setCursor(5,1);
    lcd.print("L");
  }
  else if(val>=500&&val<=750)
  {
    lcd.setCursor(5,1);
    lcd.print("S");
  }
}


thumb

What you should see?

Done uploading the code to the board, you should see the LCD screen show “Hello keyestudio” on the first line, and the second line shows the increasing number.
If cannot see the text clearly, rotate the potentiometer on the shield to adjust the screen backlight.
You could press the five buttons to separately get the letter S U D L R, and press the Reset button to restart it again.

thumb


Resources

Download code and libraries:

https://fs.keyestudio.com/KS0256

VIDEO:
http://video.keyestudio.com/KS0256/


Get One Now