2x16 lcd display pinout made in china
Newhaven 16x2 character Liquid Crystal Display shows characters with dark pixels on a bright yellow/green background when powered on. This transflective LCD Display is visible with ambient light or a backlight while offering a wide operating temperature range from -20 to 70 degrees Celsius. This NHD-0216HZ-FL-YBW-C display has an optimal view of 6:00 and comes with a temperature compensation circuit. This display operates at 5V supply voltage and is RoHS compliant.
Adjust the length, position, and pinout of your cables or add additional connectors. Get a cable solution that’s precisely designed to make your connections streamlined and secure.
Easily modify any connectors on your display to meet your application’s requirements. Our engineers are able to perform soldering for pin headers, boxed headers, right angle headers, and any other connectors your display may require.
Choose from a wide selection of interface options or talk to our experts to select the best one for your project. We can incorporate HDMI, USB, SPI, VGA and more into your display to achieve your design goals.
Choose from a wide selection of changes including shape, size, pinout, and component layout of your PCB to make it a perfect fit for your application.
Q When you ship my order9 A Normally 30-45days after receiving your payment, but it can be negotiated based on order qty and production schedule. Q How can you guarantee the production quality 9 A Our production quality follow ISO9000 standard system, stable design team,22 years experience of QC team and strictly quality control system guarantee the production quality. accept third part inspection,we have mechanical checking,display checking,high&low temperature storage&operating test during high humidity condition,EMC test(optional) for every design .
We come across Liquid Crystal Display (LCD) displays everywhere around us. Computers, calculators, television sets, mobile phones, and digital watches use some kind of display to display the time.
An LCD screen is an electronic display module that uses liquid crystal to produce a visible image. The 16×2 LCD display is a very basic module commonly used in DIYs and circuits. The 16×2 translates a display of 16 characters per line in 2 such lines. In this LCD, each character is displayed in a 5×7 pixel matrix.
Contrast adjustment; the best way is to use a variable resistor such as a potentiometer. The output of the potentiometer is connected to this pin. Rotate the potentiometer knob forward and backward to adjust the LCD contrast.
A 16X2 LCD has two registers, namely, command and data. The register select is used to switch from one register to other. RS=0 for the command register, whereas RS=1 for the data register.
Command Register: The command register stores the command instructions given to the LCD. A command is an instruction given to an LCD to do a predefined task. Examples like:
Data Register: The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD. When we send data to LCD, it goes to the data register and is processed there. When RS=1, the data register is selected.
Generating custom characters on LCD is not very hard. It requires knowledge about the custom-generated random access memory (CG-RAM) of the LCD and the LCD chip controller. Most LCDs contain a Hitachi HD4478 controller.
CG-RAM address starts from 0x40 (Hexadecimal) or 64 in decimal. We can generate custom characters at these addresses. Once we generate our characters at these addresses, we can print them by just sending commands to the LCD. Character addresses and printing commands are below.
LCD modules are very important in many Arduino-based embedded system designs to improve the user interface of the system. Interfacing with Arduino gives the programmer more freedom to customize the code easily. Any cost-effective Arduino board, a 16X2 character LCD display, jumper wires, and a breadboard are sufficient enough to build the circuit. The interfacing of Arduino to LCD display is below.
The combination of an LCD and Arduino yields several projects, the most simple one being LCD to display the LED brightness. All we need for this circuit is an LCD, Arduino, breadboard, a resistor, potentiometer, LED, and some jumper cables. The circuit connections are below.
WO1602I3 and WO1602I5 are two models of 16 characters by 2 lines of COG LCD P/N WO1602I with PCB board on module. WO1602I3 and WO1602I5 are built in with ST7032i IC; it supports I2C interface. The advantage of WO1602I3/WO1602I5 is having circuit layout on PCB board and with screw holes which make modules can be fixed on customers’ applications easily. Also, there are three kinds of connector pitch sizes of 2.54mm (default), 1.0mm and 0.5mm for options.
The supply voltage for logic (VDD) of WO1602I3 is 3.3V; as to the WO1602I5 is 5V, 1/16 duty circle, 1/5 bias. The module can be operating at temperatures from -20℃ to +70℃; its storage temperatures range from -30℃ to +80℃. WO1602I3 and WO1602I5 are available in FSTN positive Transflective LCD and with White LED backlight; please contact us if you need different types of LCDs or LED combinations.
WO12864K and WO12864K1 models are monochrome COG graphic LCD modules made of 128x64 dot matrix format. WO12864K/WO12864K1 COG Module is built in with ST7565 IC, it supports 8-bit 6800, 8-bit 8080 parallel and 4-wire serial SPI interface, power supply voltage 3V, VOP 9.5V, 1/65 duty. The WO12864K item is adopted ST7565V IC which is built-in with negative voltage, as to the WO12864K1 item is adopted ST7565P IC which is built- in with positive voltage.
This module can be operating at temperatures from -20℃ to +70℃; its storage temperatures range from -30℃ to +80℃. WO12864K/K1 are available in STN Negative, Blue Transmissive LCD and with White LED backlight. Please contact us if you need different types of LCDs or LED combinations.
WO128128A2 model is a round COG LCD display WO128128A model with a PCB board on module. This Round STN COG module is built in with ST75161 IC; it supports 8080 parallel (default), 6800 parallel, 3-wire and 4-wire serial SPI, I2C interface, power supply voltage 3V, 1/136 driving duty, 1/12 BIAS. The advantage of WO128128A2 is having circuit layout on PCB board and with screw holes which make modules can be fixed on customers’ applications easily. Also, there are three kinds of connector pitch sizes of 2.54mm (default), 1.0mm and 0.5mm for options. WO128128A2 also have VDD 5V power supply voltage for optional.
The supply voltage for logic of WO128128A2 is 2.7V to 3.3V, typical value 3V. This module can be operating at temperatures from -20℃ to +70℃; its storage temperatures range from -30℃ to +80℃. WO128128A2 is available in FSTN positive LCD type with white LED backlight. Please contact us if you need different types of LCDs or LED combinations.
WO240128B2 model is a COG LCD display WO240128B model with a PCB board on module, which is made of 240x128 dots. WO240128B2 is built in with ST7586S controller IC; it supports 6800 8-bit (default), 8080 8-bit parallel and serial SPI interface, power supply voltage 3.3V, 1/128 duty, 1/12 Bias. The advantage of WO240128B2 is having circuit layout on PCB board and with screw holes which make modules can be fixed on customers’ applications easily. Also, there are three kinds of connector pitch sizes of 2.54mm (default), 1.0mm and 0.5mm for options. WO240128B2 also have VDD 5V power supply voltage for optional.
This WO240128B2 module can be operating at temperatures from -20℃ to +70℃; its storage temperatures range from -30℃ to +80℃. The WO240128B2 is available for FSTN positive Transflective with white LED backlight. Please contact us if you need different types of LCDs or LED combinations.
WO256128A2 model is a COG LCD display WO256128A model featured with a PCB board on module which is made of 256x128 dots, diagonal size 2.9 inch. WO256128A2 is built in with ST75256 controller IC, it supports 8080 8-bit parallel (default), 6800 8-bit and 4-wire serial SPI and I2C interface, power supply voltage 3.3V, 1/128 duty, 1/12 Bias. The advantage of WO256128A2 is having circuit layout on PCB board and with screw holes which make modules can be fixed on customers’ applications easily. Also, there are three kinds of connector pitch sizes of 2.54mm (default), 1.0mm and 0.5mm for options. WO256128A2 also have VDD 5V power supply voltage for optional.
WO256128A2 module can be operating at temperatures from -20℃ to +70℃; its storage temperatures range from -30℃ to +80℃. The WO256128A2 is available for FSTN positive Transflective with white LED backlight. Please contact us if you need different types of LCDs or LED combinations.
LCD screens are useful and found in many parts of our life. At the train station, parking meter, vending machines communicating brief messages on how we interact with the machine they are connected to. LCD screens are a fun way to communicate information in Raspberry Pi Pico projects and other Raspberry Pi Projects. They have a big bright screen which can display text, numbers and characters across a 16 x 2 screen. The 16 refers to 16 characters across the screen, and the 2 represents the number of rows we have. We can get LCD screens with 20x2, 20x4 and many other configurations, but 16x2 is the most common.
In this tutorial, we will learn how to connect an LCD screen, an HD44780, to a Raspberry Pi Pico via the I2C interface using the attached I2C backpack, then we will install a MicroPython library via the Thonny editor and learn how to use it to write text to the display, control the cursor and the backlight.
2. Import four librariesof pre-written code. The first two are from the Machine library and they enable us to use I2C and GPIO pins. Next we import the sleep function from Time enabling us to pause the code. Finally we import the I2C library to interact with the LCD screen.from machine import I2C, Pin
3. Create an objecti2c to communicate with the LCD screen over the I2C protocol. Here we are using I2C channel 0, which maps SDA to GP0 and SCL to GP1.i2c = I2C(0, sda=Pin(0), scl=Pin(1), freq=400000)
5. Create an objectlcdto set up the I2C connection for the library. It tells the library what I2C pins we are using, set via the i2c object, the address of our screen, set via I2C_ADDRand finally it sets that we have a screen with two rows and 16 columns.lcd = I2cLcd(i2c, I2C_ADDR, 2, 16)
6. Create a loopto continually run the code, the first line in the loop will print the I2C address of our display to Thonny’s Python Shell.while True:
8. Write two lines of textto the screen. The first will print “I2C Address:” followed by the address stored inside the I2C_ADDR object. Then insert a new line character “\n” and then write another line saying “Tom’s Hardware" (or whatever you want it to say). Pause for two seconds to allow time to read the text.lcd.putstr("I2C Address:"+str(I2C_ADDR)+"\n")
9. Clear the screenbefore repeating the previous section of code, but this time we display the I2C address of the LCD display using its hex value. The PCF8574T chip used in the I2C backpack has two address, 0x20 and 0x27 and it is useful to know which it is using, especially if we are using multiple I2C devices as they may cause a clash on the bus.lcd.clear()
12. Turn the backlight back onand then hide the cursor. Sometimes, a flashing cursor can detract from the information we are trying to communicate.lcd.backlight_on()
13. Create a for loopthat will print the number 0 to 19 on the LCD screen. Note that there is a 0.4 second delay before we delete the value and replace it with the next. We have to delete the text as overwriting the text will make it look garbled.for i in range(20):
Save and runyour code. As with any Python script in Thonny, Click on File >> Saveand save the file to your Raspberry Pi Pico. We recommend calling it i2c_lcd_test.py. When ready, click on the Green play buttonto start the code and watch as the test runs on the screen.
Connecting an LCD to your Raspberry Pi will spice up almost any project, but what if your pins are tied up with connections to other modules? No problem, just connect your LCD with I2C, it only uses two pins (well, four if you count the ground and power).
In this tutorial, I’ll show you everything you need to set up an LCD using I2C, but if you want to learn more about I2C and the details of how it works, check out our article Basics of the I2C Communication Protocol.
There are a couple ways to use I2C to connect an LCD to the Raspberry Pi. The simplest is to get an LCD with an I2C backpack. But the hardcore DIY way is to use a standard HD44780 LCD and connect it to the Pi via a chip called the PCF8574.
The PCF8574 converts the I2C signal sent from the Pi into a parallel signal that can be used by the LCD. Most I2C LCDs use the PCF8574 anyway. I’ll explain how to connect it both ways in a minute.
I’ll also show you how to program the LCD using Python, and provide examples for how to print and position the text, clear the screen, scroll text, print data from a sensor, print the date and time, and print the IP address of your Pi.
Connecting an LCD with an I2C backpack is pretty self-explanatory. Connect the SDA pin on the Pi to the SDA pin on the LCD, and the SCL pin on the Pi to the SCL pin on the LCD. The ground and Vcc pins will also need to be connected. Most LCDs can operate with 3.3V, but they’re meant to be run on 5V, so connect it to the 5V pin of the Pi if possible.
If you have an LCD without I2C and have a PCF8574 chip lying around, you can use it to connect your LCD with a little extra wiring. The PCF8574 is an 8 bit I/O expander which converts a parallel signal into I2C and vice-versa. The Raspberry Pi sends data to the PCF8574 via I2C. The PCF8574 then converts the I2C signal into a 4 bit parallel signal, which is relayed to the LCD.
Now we need to install a program called I2C-tools, which will tell us the I2C address of the LCD when it’s connected to the Pi. So at the command prompt, enter sudo apt-get install i2c-tools.
Now reboot the Pi and log in again. With your LCD connected, enter i2cdetect -y 1 at the command prompt. This will show you a table of addresses for each I2C device connected to your Pi:
We’ll be using Python to program the LCD, so if this is your first time writing/running a Python program, you may want to check out How to Write and Run a Python Program on the Raspberry Pi before proceeding.
The function mylcd.lcd_display_string() prints text to the screen and also lets you chose where to position it. The function is used as mylcd.lcd_display_string("TEXT TO PRINT", ROW, COLUMN). For example, the following code prints “Hello World!” to row 2, column 3:
On a 16×2 LCD, the rows are numbered 1 – 2, while the columns are numbered 0 – 15. So to print “Hello World!” at the first column of the top row, you would use mylcd.lcd_display_string("Hello World!", 1, 0).
You can create any pattern you want and print it to the display as a custom character. Each character is an array of 5 x 8 pixels. Up to 8 custom characters can be defined and stored in the LCD’s memory. This custom character generator will help you create the bit array needed to define the characters in the LCD memory.
The code below will display data from a DHT11 temperature and humidity sensor. Follow this tutorial for instructions on how to set up the DHT11 on the Raspberry Pi. The DHT11 signal pin is connected to BCM pin 4 (physical pin 7 of the RPi).
By inserting the variable from your sensor into the mylcd.lcd_display_string() function (line 22 in the code above) you can print the sensor data just like any other text string.
These programs are just basic examples of ways you can control text on your LCD. Try changing things around and combining the code to get some interesting effects. For example, you can make some fun animations by scrolling with custom characters. Don’t have enough screen space to output all of your sensor data? Just print and clear each reading for a couple seconds in a loop.
16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot of combinations available like, 8×1, 8×2, 10×2, 16×1, etc. But the most used one is the 16*2 LCD, hence we are using it here.
All the above mentioned LCD display will have 16 Pins and the programming approach is also the same and hence the choice is left to you. Below is the Pinout and Pin Description of 16x2 LCD Module:
These black circles consist of an interface IC and its associated components to help us use this LCD with the MCU. Because our LCD is a 16*2 Dot matrix LCD and so it will have (16*2=32) 32 characters in total and each character will be made of 5*8 Pixel Dots. A Single character with all its Pixels enabled is shown in the below picture.
So Now, we know that each character has (5*8=40) 40 Pixels and for 32 Characters we will have (32*40) 1280 Pixels. Further, the LCD should also be instructed about the Position of the Pixels.
It will be a hectic task to handle everything with the help of MCU, hence an Interface IC like HD44780 is used, which is mounted on LCD Module itself. The function of this IC is to get the Commands and Data from the MCU and process them to display meaningful information onto our LCD Screen.
The LCD can work in two different modes, namely the 4-bit mode and the 8-bit mode. In 4 bit mode we send the data nibble by nibble, first upper nibble and then lower nibble. For those of you who don’t know what a nibble is: a nibble is a group of four bits, so the lower four bits (D0-D3) of a byte form the lower nibble while the upper four bits (D4-D7) of a byte form the higher nibble. This enables us to send 8 bit data.
As said, the LCD itself consists of an Interface IC. The MCU can either read or write to this interface IC. Most of the times we will be just writing to the IC, since reading will make it more complex and such scenarios are very rare. Information like position of cursor, status completion interrupts etc. can be read if required, but it is out of the scope of this tutorial.
The Interface IC present in most of the LCD is HD44780U,in order to program our LCD we should learn the complete datasheet of the IC. The datasheet is given here.
There are some preset commands instructions in LCD, which we need to send to LCD through some microcontroller. Some important command instructions are given below: