0% found this document useful (0 votes)
24 views

P2 User Manual1

The document describes an Arduino Duemilanove graphic LCD shield that allows displaying text, images, and pixel data on a 48x84 pixel screen. Key features include displaying English and Chinese characters. The shield integrates a 5-degree of freedom joystick for navigation and includes digital and analog I/O pins. Code examples are provided to initialize the LCD, write text and images, clear the screen, control the backlight, and read joystick position values. Additional resources with wiring diagrams and specifications are referenced.

Uploaded by

Ki Rekso Aljero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

P2 User Manual1

The document describes an Arduino Duemilanove graphic LCD shield that allows displaying text, images, and pixel data on a 48x84 pixel screen. Key features include displaying English and Chinese characters. The shield integrates a 5-degree of freedom joystick for navigation and includes digital and analog I/O pins. Code examples are provided to initialize the LCD, write text and images, clear the screen, control the backlight, and read joystick position values. Additional resources with wiring diagrams and specifications are referenced.

Uploaded by

Ki Rekso Aljero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PROJECT 2

GRAPHIC LCD DISPLAY


Arduino Duemilanove have come with a Graphic LCD in the coding, the shield are ready to display.
shield which allow allow user to play with more pixel
besides LCD. This shield have 48x84 pixel resolution. ADDITIONAL INFORMATION
If your project need more information to display, this
For Arduino- GLD shield, It also integrates a 5 DOF
LCD shield can apparently meet your needs. It is able joystick. The shield has 6 Digital IO and 5 Analog IO.
to display English, Chinese, even images. Besides that, we may control the backlight by just
use digitalWrite(7, HIGH/LOW) to turn it on and off.
COMPONENT NEEDED Don’t forget to put pinMode(7, OUTPUT) in void
setup();.

Well, reading the joystick position is accomplished


ARDUINO -GRAPHIC LCD
via analogRead(0);. It returns the following values as
SHIELD such:
• Up – 505
• Down – 0
• Left – 740
• Right – 330
CONNECTION • pressed in – 144
• Idle (no action) – 1023

CODE OVERVIEW

int adc_key_in;
Define the adc_key_in as a storage space of integer.
Referring to the Figure above, the GLCD are only
required to plug into Arduino Duemilanove then put
int joy_stick = 0; Write a string of number in every row.
Define the joy_stick I/O as analog port 0.

int adc_key_val[5] = {50,200,400,600,800};


Initial the joy stick ADC value.

lcd.LCD_write_string_big(0,0,”012345”,MENU_NOR
#define LCD_Backlight 7
MAL);
Define the LCD_Backlight pin as ditial pin 7.
Write a string of number in big font size.
#define NUM_KEYS 5
Define the total number of key is 5.
References:
1. http://tronixstuff.wordpress.com/2011/03/1
2/the-dfrobot-lcd4884-lcd-shield/

2. http://www.dfrobot.com/wiki/index.php?
title=LCD4884_Shield_Fro_Arduino_(SKU:DF
R0092)

lcd.LCD_init();
Graphic LCD Initialize.

Lcd.LCD_clear();
Clear the GLCD screen.

pinMode(LCD_Backlight, OUTPUT);
Make the LCD_Backlight pin as output.

lcd.LCD_draw_bmp_pixel(2,1,cytron,80,24);
Display the picture in Bitmap format in (2nd row, 1st
column, cytron logo, picture's width, picture's
height).

lcd.LCD_write_string(0,a,”01234567890123”,MENU_
NORMAL);

You might also like