EP-0058: Difference between revisions

From 52Pi Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=RPI RGB LCD1602=
=RGB LCD 1602 =
==Description==
==Description==
It's a LCD display which can show two lines and 16 characters on it. and  it easy to use a blue and white 16x2 Character LCD.<br>
This RGB 1602 full color module is based on i2c protocol, with 5 input buttons.<br>
It's based on I2c protocol and it can communicate with your Pi with less wire. <br>
The background  light can be changed by coordinate PWM, and it also support Raspberry Pi 3B. <br>
With this in mind, we wanted to make it easier for people to get these LCD into their projects so we devised a Pi plate that lets you control a 16x2 Character LCD,<br>
You have  three colors to chose, RBG(red,green, blue), you can change it as you will freely.<br>
up to 3 led pins(RGB backlight) AND 5 keypad pins with  pull-up resister using only the two I2C pins on the R-Pi! <br>
You can just plug it into your Raspberry Pi and  drive it through i2c protocol control the mcp23016 expand IO port. <br>
The best part is you don't really lose those two pins either, since you can stick i2c-based sensors, RTCs, etc and have them share the I2C bus.<br>
It reduced occupation of the GPIO Pins and you can use wiringPi's lcd library to control it.  
This is a super slick way to add a display without all the wiring hassle.
This pi plate is perfect for when you want to build a stand-alone project with its own user interface. <br>
The 4 directional buttons plus select button allows basic control without having to attach a bulky computer.<br>
The plate is designed for both Revision 1 and Revision 2 Raspberry Pi's. It uses the I2C (SDA/SCL) pins, RGB backlight is controlled by Raspberry Pi GPIO pin and you can make it as breath light with softPWM. <br>
To keep them from shorting against the metal, a piece of electrical tape must be placed onto the USB ports.<br>
----
----
 
==Features==
==Feature==
*Designed for Raspberry Pi, support Raspberry Pi 3 mode B
*Display construction: 16 Characters * 2 Lines
*Three optional RGB(red,green,blue) backlight.
*Dimensions: 5.74cm × 8.24cm
*Three independly coordinate pins can be use.
*Comes with a 16x2 Blue & White LCD
*High quilaty 16x2 display
*Plug and play with any Raspberry Pi
*size 2.95X4.35(WXH)mm
*Uses only the I2C (SDA/SCL) pins
*Builtin HD44780 controller can be attached to MCU directly
*This board/chip uses I2C 7-bit address 0x20
*Main Controller driver chip is SplC780, can be compatible with other main controller such as 0066(SAMSUNG),SPLC780(SUNPLUS) and so on<br>
*RBG backlight
*Character generator ROM can provide 192 different characters. (5x7 can be 160  or  5x10 can be 32)
*Pluggable LCD1602 module
*64bit custom RAM, can provide 8 8x8 dot characters or 2/4  5x11 dot characters
*80 byte RAM
* MCP23017 IO expand port.
* Open source refference : [http://wiringpi.com/extensions/i2c-mcp23008-mcp23017/]
* 5 customized button can be defined to different functions.
----
==Product Details==
{|  class="wikitable"
!Parameter !! Value
|-
|Voltage || 5V
|-
|Backlight || RGB
|-
|Max Current|| 60mA
|-
|Display Mode ||  STN
|-
|Work Temperature || -0~+50℃
|-
|Store Temperature || -20~+70℃
|-
|Size ||  82x58(mm)
|-
| Display Area ||  64.5x16
|-
| Display Character || 16x2
|-
|Main Controller || SplC780
|-
| Assemble Size || 75.0*31.0/ 2.8mm
|-
| Dot Size ||  0.55*0.65mm
|-
| Pin Style || 18PIN,PH2.54,1.0mm
|}
----
----


==Presentation==
==Presentation==
[[File: 160201.jpg|thumb|left|300px]]
[[File: 160202.jpg|thumb|left|300px]]
[[File: 160203.jpg|thumb|left|300px]]
<br style="clear:both;" >
----
==Package includes==
* 1x RPI 16x2 LCD + Keypad Kit
----
==How to use==
*Setup your Pi with I2C tool.<br>
<code> sudo apt-get install python-smbus </code><br>
<code> sudo apt-get install i2c-tools </code><br>
<code>sudo i2cdetect -y 0 (if you are using a version 1 Raspberry Pi) </code><br>
<code>sudo i2cdetect -y 1 (if you are using a version 2 Raspberry Pi) </code><br>
*i2c-tools isn't strictly required, but it's a useful package since you can use it to scan for any I2C or SMBus devices connected to your board.<br>
If you know something is connected, but you don't know it's 7-bit I2C address, this library has a great little tool to help you find it.<br>
[[File:I2c.jpg|thumb|left|300px]]
<br style="clear:both;">
*Install  git-core and get wiringPi library. <br>
<code> sudo apt-get install git-core </code><br>
<code> git clone git://git.drogon.net/wiringPi</code><br>
<code> cd wiringPi</code><br>
<code> ./build</code><br>
*Check wiringPi  function and version:<br>
<code> gpio -v</code><br>
<code> gpio readall</code><br>
[[File:Gpio.jpg|thumb|left|300px]]
<br style="clear:both;" >
*Enable  I2C interface in your Pi by editing /etc/modules file and add two lines as following: <br>
<code> sudo nano /etc/modules </code><br>
<pre>
i2c-bcm2708
i2c-dev
</pre><br>
* Delete blacklist in /etc/modprobe.d/raspi-blacklist.conf, you can just use "#" to comment it.<br>
<code> sudo nano /etc/modprobe.d/raspi-blacklist.conf</code><br>
<pre>
blacklist spi-bcm2708
blacklist i2c-bcm2708
</pre><br>
*Finally, reboot your Pi.<br>
*Create a file called whatever you want but with .c  as prefix: <br>
<code> sudo vim.tiny  mylcd1602.c </code><br>
<pre>
#include <stdio.h>                                                                       
#include <wiringPi.h>                                                           
#include <mcp23017.h>                                                       
#include <lcd.h>                                                           
int main()
{
        int display,i,count;                                                     
        wiringPiSetup();                                                         
        mcp23017Setup (100, 0x20);                                             
        printf ("Raspberry Pi - MCP23017 Test\n");
        for(i=0;i<16;i++)
          pinMode(100+i,OUTPUT);                                               
        digitalWrite(107,1);                                                     
        digitalWrite(101,0);                                                     
        display=lcdInit(2,16,4,100,102,103,104,105,106,0,0,0,0);             
        lcdHome(display);                                                         
        lcdClear(display);                                                             
        lcdPosition(display,0,0);                                               
        lcdPuts(display,"Hello World");                                         
        while(1)
        {
                lcdPosition(display,0,1);                                                                                     
                lcdPrintf(display,"%d",count++);                                       
                delay(300);                                                         
                printf("lcd1602\n");
        }
}
</pre><br>
*Compile it with gcc, and run it. <br>
<code> sudo gcc  mylcd1602.c  /home/pi/wiringPi/devLib/lcd.o  -lwiringPi  -o  mylcd1602 </code><br>
<code> sudo ./mylcd1602 </code><br>
[[File: 160203.jpg|thumb|left|300px]]
<br style="clear:both;" >
----

Revision as of 12:05, 8 October 2016

RGB LCD 1602

Description

This RGB 1602 full color module is based on i2c protocol, with 5 input buttons.
The background light can be changed by coordinate PWM, and it also support Raspberry Pi 3B.
You have three colors to chose, RBG(red,green, blue), you can change it as you will freely.
You can just plug it into your Raspberry Pi and drive it through i2c protocol control the mcp23016 expand IO port.
It reduced occupation of the GPIO Pins and you can use wiringPi's lcd library to control it.


Features

  • Designed for Raspberry Pi, support Raspberry Pi 3 mode B
  • Three optional RGB(red,green,blue) backlight.
  • Three independly coordinate pins can be use.
  • High quilaty 16x2 display
  • size 2.95X4.35(WXH)mm
  • Builtin HD44780 controller can be attached to MCU directly
  • Main Controller driver chip is SplC780, can be compatible with other main controller such as 0066(SAMSUNG),SPLC780(SUNPLUS) and so on
  • Character generator ROM can provide 192 different characters. (5x7 can be 160 or 5x10 can be 32)
  • 64bit custom RAM, can provide 8 8x8 dot characters or 2/4 5x11 dot characters
  • 80 byte RAM
  • MCP23017 IO expand port.
  • Open source refference : [1]
  • 5 customized button can be defined to different functions.

Product Details

Parameter Value
Voltage 5V
Backlight RGB
Max Current 60mA
Display Mode STN
Work Temperature -0~+50℃
Store Temperature -20~+70℃
Size 82x58(mm)
Display Area 64.5x16
Display Character 16x2
Main Controller SplC780
Assemble Size 75.0*31.0/ 2.8mm
Dot Size 0.55*0.65mm
Pin Style 18PIN,PH2.54,1.0mm

Presentation