Home LearningBasics Colour LCD Shield

Colour LCD Shield

by shedboy71

The Colour LCD Shield provides an easy method of connecting the popular Nokia 6100 LCD to your Arduino. The board comes as shown with the 128×128 mini colour LCD, as well as a backlight driver circuit (boosts to 7V), and three momentary push-buttons (tied through a jumper to pins D3-5).

The Nokia 6100 LCD is controlled through a 9-bit SPI interface. The control pins of the LCD are connected to the hardware SPI pins of the Arduino (D13 -SCK, D11 – DIO), the CS pin is tied to D9 and the reset pin is connected to D8. Voltage from the ‘5V' pin of the Arduino is boosted to 7V to power the LCD backlight.

Note: This shield uses the Philips PCF8833 controller.

Initially I had difficulty getting this up and running, reading up on the LCD I discovered that in fact there are different chips used on the LCD. My LCD uses the Philips PCF8833 controller and not the Epson controller. One to look out for there.

 

colour lcd shield

colour lcd shield

 

Code Examples

I tried 2 libraries and managed to get the LCD up and running, the first library is the Colour LCD Shield Arduino Library
[c]
#include <ColorLCDShield.h>

LCDShield lcd;

byte cont = 40; // Good center value for contrast

void setup()
{
lcd.init(PHILLIPS); // Initialize the LCD
lcd.contrast(cont); //
lcd.clear(WHITE); // Set background to white
testPattern(); // Print color bars on bottom of screen
}

void loop()
{
}

void testPattern()
{
lcd.setRect(1, 2, 131, 19, 1, WHITE);
lcd.setRect(1, 19, 131, 35, 1, YELLOW);
lcd.setRect(1, 35, 131, 51, 1, CYAN);
lcd.setRect(1, 51, 131, 67, 1, GREEN);
lcd.setRect(1, 67, 131, 83, 1, MAGENTA);
lcd.setRect(1, 83, 131, 99, 1, RED);
lcd.setRect(1, 99, 131, 115, 1, BLUE);
lcd.setRect(1, 115, 131, 131, 1, BLACK);
}
[/c]
The second library and the best is the G-LCD library, you can download this here. Download and put the library in your Arduino libraries folder

This example is a basic hello world example, you really need to dig into some of the pre-written examples that come with the library
[c]
#include <gLCD.h>

const char RST = 8;
const char CS = 9;
const char Clk = 13;
const char Data = 11;

gLCD graphic(RST,CS,Clk,Data,HIGH_SPEED);

void setup()
{
graphic.begin(0,0,0,PHILLIPS_0);
//background black and clear the screen
graphic.setBackColour(GLCD_BLACK);
graphic.Clear();
}

void loop()
{
//white large text
graphic.setForeColour(15,15,15);
graphic.setFont(7);
graphic.setCoordinate(1,40);
graphic.print(“Hello World”);
while(1);
}
[/c]
Links

Color LCD Shield Nokia 6100 Expansion Board for Arduino DIY Develop from AMAZON US

Color LCD Shield Nokia 6100 Expansion Board for Arduino DIY Develop from AMAZON UK

Share

You may also like