Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
Parameter Name | Parameter |
Operating Voltage | 3.3V/5V |
Operating Current | 5V: 26mA |
3.3V: 13mA | |
Communication Interface | I2C |
I2C Address | LCD: 0x7C |
LED: 0x6B | |
Screen Type | LCD |
Controller Chip | LCD: AiP31068L |
LED: SN3193 | |
Dimensions | 87.0 x 32.0 x 13.0 (mm) |
Pin | Description |
VCC | 3.3V/5V power positive |
GND | Ground |
SCL | I2C clock pin |
SDA | I2C data pin |
sudo raspi-config nonint do_i2c 0
When connecting the Raspberry Pi, choose to use a 4PIN cable. Please refer to the pin correspondence table below
We are using a pin or PH2.0 4PIN interface, please refer to the following table for wiring
LCD | Raspberry Pi | |
BCM2835 encoding | Board physical pin number | |
VCC | 3.3V | 3.3V |
GND | GND | GND |
SCL | SCL.1 | 5 |
SDA | SDA.1 | 3 |
Take the LCD1602 Module using the PH2.0 4PIN interface as an example, and connect it to the Raspberry Pi according to the above table: (Please connect according to the pin definition table. The color of the wiring in the diagram is for reference only, and the actual color shall prevail.)
【Install the library and download the demo】
cd ~ git clone https://github.com/WiringPi/WiringPi.git cd WiringPi/ ./build debian mv debian-template/wiringpi-3.0-1.deb . sudo apt install ./wiringpi_3.10_arm64.deb
cd ~ wget https://files.waveshare.com/wiki/LCD1602-I2C-Module/Lg-master.zip unzip Lg-master.zip cd lg-master make sudo make install
cd ~ wget https://files.waveshare.com/wiki/LCD1602-I2C-Module/LCD1602_I2C_Module_Demo.zip unzip LCD1602_I2C_Module_Demo.zip cd ~/LCD1602_I2C_Module_code/Raspberry/c sudo make
【Run Character display demo】
cd ~/LCD1602_I2C_Module_code/Raspberry/c sudo ./main 1
【Run Custom char demo】
cd ~/LCD1602_I2C_Module_code/Raspberry/c sudo ./main 2
【Run Direction control demo】
cd ~/LCD1602_I2C_Module_code/Raspberry/c sudo ./main 3
【Run Display time demo】
cd ~/LCD1602_I2C_Module_code/Raspberry/c sudo ./main 4
【Run Scroll display demo】
cd ~/LCD1602_I2C_Module_code/Raspberry/c sudo ./main 5
【Install the library and download the demo】
sudo apt install python3-smbus
cd ~ wget https://files.waveshare.com/wiki/LCD1602-I2C-Module/LCD1602_I2C_Module_Demo.zip unzip LCD1602_I2C_Module_Demo.zip cd ~/LCD1602_I2C_Module_code/Raspberry/python/examples
【Run Character display demo】
sudo python Character_display.py
【Run Custom char demo】
sudo python Custom_char.py
【Run Direction control demo】
sudo python Direction_control.py
【Run Display time demo】
sudo python Display_time.py
【Run Scroll display demo】
sudo python Scroll_display.py
Module Interface | Pico Pin |
VCC | 3.3V |
GND | GND |
SCL | GP5 |
SDA | GP4 |
The physical connection diagram is as follows
【Main function description】
【Demo flashing】
【Flash Micropython firmware】
【Save driver library】
【Run demo】
【Install library】
【Run demo】
Module Interface | Arduino Pin |
VCC | 5V/3.3V |
GND | GND |
SCL | SCL |
SDA | SDA |
The physical connection diagram is as follows
【Install library】
【Run demo】
When connecting the ESP32, choose to use a 4PIN cable. Please refer to the pin correspondence table below
We are using a pin or PH2.0 4PIN interface, please refer to the following table for wiring
LCD | ESP32 | |
Pin number | ||
VCC | 5V/3.3V | |
GND | GND | |
SCL | GPIO5 | |
SDA | GPIO4 |
Take the LCD1602 Module using the PH2.0 4PIN interface as an example, and connect it to the ESP32 according to the above table: (Please connect according to the pin definition table. The color of the wiring in the diagram is for reference only, and the actual color shall prevail.)
Connect to ESP32 as shown in the figure.
【Install library】
【Run demo】
【Flash Micropython firmware】
*\LCD1602_I2C_Module_Demo\esp32\python\bin
【Save driver library】
【Run demo】
When connecting the Jetson nano, choose to use a 4PIN cable. Please refer to the pin correspondence table below
We are using a pin or PH2.0 4PIN interface, please refer to the following table for wiring
LCD | Jetson nano | |
Board physical pin number | ||
VCC | 3.3V | |
GND | GND | |
SCL | 5 | |
SDA | 3 |
Take the LCD1602 Module using the PH2.0 4PIN interface as an example, and connect it to the Jetson nano according to the above table: (Please connect according to the pin definition table. The color of the wiring in the diagram is for reference only, and the actual color shall prevail.)
Connect to Jetson Nano as shown in the figure.
【Install the library and download the demo】
sudo apt install python3-smbus
sudo apt install python-smbus
cd ~ wget https://files.waveshare.com/wiki/LCD1602-I2C-Module/LCD1602_I2C_Module_Demo.zip unzip LCD1602_I2C_Module_Demo.zip cd ~/LCD1602_I2C_Module_code/Jetson Nano/python/examples
【Run Character display demo】
sudo python Character_display.py
【Run Custom char demo】
sudo python Custom_char.py
【Run Direction control demo】
sudo python Direction_control.py
【Run Display time demo】
sudo python Display_time.py
【Run Scroll display demo】
sudo python Scroll_display.py
【C/C++】
API introduction
/** * @brief LCD screen initialization * @param cols Number of columns (currently not functional) * @param rows Number of rows */ void LCD1602_init(uint8_t cols, uint8_t rows);
/** * @brief Open display */ void LCD1602_display();
/** * @brief Send command * @param value The commands that have been sent */ void LCD1602_command(uint8_t value);
/** * @brief Set cursor position * @param col Number of columns: Optional range 0-15, maximum 39, needs to be moved to observe characters greater than 15 * @param row Number of rows: Optional range 0-1, 0 represents the first row, 1 represents the second row void LCD1602_setCursor(uint8_t col, uint8_t row);
/** * @brief Clear the display and return the cursor to its initial position (0 position) */ void LCD1602_clear();
/** * @brief Write data * @param value The data has been written */ void LCD1602_data(uint8_t value);
/** * @brief Display string * @param str The strings have been displayed */ void LCD1602_send_string(const char *str);
/** * @brief Turn off underline cursor */ void LCD1602_noCursor();
/** * @brief Turn on underline cursor */ void LCD1602_cursor();
/** * @brief Scroll left to display */ void LCD1602_scrollDisplayLeft();
/** * @brief Scroll right to display */ void LCD1602_scrollDisplayRight();
/** * @brief This function is used for the text that scrolls from left to right */ void LCD1602_leftToRight();
/** * @brief This function is used for the text that scrolls from right to left */ void LCD1602_rightToLeft();
/** * @brief This will align the text to the left from the cursor display position */ void LCD1602_noAutoscroll();
/** * @brief This will align the text to the right from the cursor display position */ void LCD1602_autoscroll();
/** * @brief Allow us to fill the first 8 CGRAM positions with custom characters * @param location Substitute characters: Range (0-7) * @param charmap Character array: 8 bytes in size */ void LCD1602_createChar(uint8_t location, uint8_t charmap[]);
/** * @brief Backlight chip initialization */ void LCD1602_led_init();
/** * @brief Set backlight brightness * @param value Backlight intensity value: Range (0-100) */ void LCD1602_set_brightness(uint8_t value);
/** * @brief Set backlight mode * @param mode 0x00 for normal mode, 0x20 for breathing mode */ void LCD1602_set_led_mode(uint8_t mode);
【Python】
API introduction
def command(self, cmd) @brief Send command @param cmd The commands that have been sent
def data(self,data) @brief Write character @param data The data has been written
def setCursor(self,col,row) @brief Set cursor position @param col Number of columns: Optional range 0-39 @param row Number of rows: Optional range 0-1, 0 represents the first row, 1 represents the second row
def clear(self) @brief Clear the display and return the cursor to its initial position (0 position)
def printout(self,arg) @brief Output display to the LCD screen @param arg The data that has been output
def createChar(self, location, charmap) @brief Allow us to fill the first 8 CGRAM positions with custom characters @param location Substitute characters: Range (0-7) @param charmap Character array: 8 bytes in size
def scrollDisplayLeft(self) @brief Scroll left to display
def scrollDisplayRight(self) @brief Scroll right to display
def cursor(self) @brief Turn on underline cursor
def nocursor(self) @brief Turn off underline cursor
def leftToRight(self) @brief This function is used for the text that scrolls from left to right
def rightToLeft(self) @brief This function is used for the text that scrolls from right to left
def autoscroll(self) @brief This will align the text to the right from the cursor display position
def noautoscroll(self) @brief This will align the text to the left from the cursor display position
def display(self) @brief Open display
def set_brightness(self, Value) @brief Set backlight brightness @param Value: Range (0-100)
def set_mode(self, Mode) @brief Backlight mode @param Mode: Normal mode (0x00), breathing mode (0x20)
It may be an issue with Python firmware incompatibility. You can use the firmware version provided in our demo.
Yes.
Generally around 30mA.
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com