LCD1602 RGB Module

From Waveshare Wiki
Jump to: navigation, search
LCD1602 RGB Module
LCD1602 RGB Module

LCD1602 RGB Module, Adjustable RGB Backlight Color, I2C Communication, 3.3V/5V Compatible
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Primary Attribute
Category: OLEDs / LCDs,
{{{userDefinedInfo}}}: {{{userdefinedvalue}}}
Brand: Waveshare
Website
International: Waveshare Website
Chinese: 官方中文站点
Onboard Interfaces
I2C
Related Products

Features

  • Incorporates character LCD panel LCD1602
  • Adjustable RGB backlight color, up to 16M (2563) backlight colors in theory
  • Can display up to 16 X 2 characters, support screen scrolling, cursor movement and other functions
  • Onboard AiP31068L LCD driver chip, PCA9633 RGB control chip
  • I2C control interface, only two signal pins are required, saving the IO resource
  • Compatible with 3.3V/5V operating voltage
  • Comes with development resources and manual (Raspberry Pi/Jetson Nano/Arduino examples)

Specification

  • Operating voltage: 3.3V/5V
  • Interface: I2C
  • LCD type: character LCD
  • Controller: AiP31068L PCA9633DP2
  • Display 64.5 x 16.0 mm
  • Dimension: 87.0 × 32.0 × 13.0mm
  • Operating current: 26mA (5V), 13mA (3.3V)

Pinout

PIN Description
VCC 3.3V/5V
GND GND
SDA I2C data line
SCL I2C clock line

Working Protocol

LCD1602 RGB Module002.png

Hardware Configuration

Enable I2C interface

  • Open terminal, use command to enter the configuration page
sudo raspi-config
Choose Interfacing Options -> I2C -> Yes  to enable I2C interface

RPI open i2c.png

And then reboot the system:

sudo reboot

Hardware Connection

You can directly attach it to the 40PIN GPIO of Raspberry Pi. Or you can wire it to Raspberry Pi with PH2.0 4PIN interface of the Module, please refer to the Pin definition below:

LCD Raspberry Pi
BCM2835 Board
VCC 5V 5V
GND GND GND
SDA SDA.1 3
SCL SCL.1 5

Take the LCD1602 RGB Module as an example, just connect it to the Raspberry Pi. The color of actual cable may be different with the figure here, please connect them according to the pins instead of color.

LCD1602 RGB Module007.jpg

If you are using Jetson nano, the connection should as bellow:

LCD1602 RGB Module012.jpg

Download the demo

Open the terminal of the Raspberry Pi, execute command to download demo codes:

cd ~
wget https://www.waveshare.net/w/upload/5/5b/LCD1602-RGB-Module-demo.zip
cd ~/LCD1602-RGB-Module-demo/Raspberry
sudo chmod 777 *
sudo python Choose_Color.py 
sudo python Discoloration.py 

Hardware Configuration

LCD PIN Pico
VCC 3.3V
GND GND
SDA GP4
SCL GP5

LCD1602 RGB Module006.jpg

Setup environment

Please refer to Raspberry Pi's guide: https://www.raspberrypi.org/documentation/pico/getting-started/

Raspberry Pi

  • Open a terminal of Raspberry Pi
  • Download and unzip the demo codes to directory Pico C/C++ SDK
#Note that the directory of SDK may be different for different users, you need to check the actual directory. Generally, it should be ~/pico/.
wget  -P ~/pico https://www.waveshare.com/w/upload/5/5b/LCD1602-RGB-Module-demo.zip
cd ~/pico
unzip LCD1602-RGB-Module-demo.zip

C

  • Hold the BOOTSEL button of Pico, and connect the USB interface of Pico to Raspberry Pi then release the button.
  • Compile and run the LCD1602-RGB-Module-demo examples
cd ~/pico/LCD1602-RGB-Module-demo/Pico/c/build/
cmake ..
make
sudo mount /dev/sda1 /mnt/pico && sudo cp LCD1602_RGB_Module_demo.uf2 /mnt/pico/ && sudo sync && sudo umount /mnt/pico && sleep 2

python

  • Refer to Raspberry Pi's guides to setup Micropython firmware for Pico
  • Open the Thonny IDE, and drag the demo to IDE and run on Pico as below. And save RGB1602.py to Pico's file system

Pico-10DOF-IMU005.jpg

Windows

C

  • Download and unzip the demo to your Windows desktop, refer to Raspberry Pi's guides to set up the Windows software environment settings.
  • Find the LCD1602-RGB-Module-demo.uf2 file under the build file under the demo directory, press and hold the BOOTSEL button of Pico, connect the USB of Pico to the PC with a MicroUSB cable, and drag the uf2 file into Pico, and then the Pico will run the demo directly.
  • 【Note】 If some users want to modify the demo, after debugging, you can use the following method to generate a .uf2 file:
    • 1. Copy LCD1602-RGB-Module-demo folder to your pico-examples file directory, and then modify the CMakelists.txt configuration file in the pico-example directory as shown in the figure below.
    • 2. Open Visual Studio Code, open your pico-examples folder, select LCD1602_RGB_Module_demo, click Generate, you can find the LCD1602_RGB_Module_demo.uf2 file in the build folder.
    • 3. Arag the uf2 file into Pico, and then the Pico will run the demo directly.

LCD1602 RGB Module010.png


python

  • Download and unzip the demo to your Windows desktop, refer to Raspberry Pi's guides to set up the Windows software environment settings.
  • Open the demo program in Thonnty, as shown in the figure below:

LCD1602 RGB Module004.png

  • Here you also need to save RGB1602.py to PICO, select RGB1602.py, save it as Raspberry pi pico, and name it RGB1602.py.

LCD1602 RGB Module005.png

  • And then run the demo under Choose_Color.py or Discoloration.py.

Hardware connection

LCD PIN Arduino
VCC 3.3V
GND GND
SDA SDA
SCL SCL

The hardware connection as below:

LCD1602 RGB Module003.jpg

Library file loading for Arduino

  • Download the demo from the Resources, there a Waveshare-LCD1602-RGB-master.zip library file in the arduino folder.

LCD1602 RGB Module008.png

  • There are two methid to load the library:

Method 1: Unzip the entire .zip package to the libraries folder of the Arduino IDE.

LCD1602 RGB Module009.png

Method 2: Add this .zip package directly to the Arduino IDE.
Open the Arduino IDE->Choose 'Sketch' in the taskbar->Choose 'Include Library'->Add .ZIP library
Find Waveshare-LCD1602-RGB-mater.zip on demo folder and click to open it

Support

Please contact us by Email/Skype/WeChat for technology support.Our response may be delay, you can just leave your questions, we will reply to you as soon as possible in working time.

Service email.png [email protected]
Service skype.png [email protected]
Service wechat.png Webchat Linzeru.png
Service time.png 09:00 - 18:00 (UTC+8 Monday to Staturday)