Saturday 18 August 2012

Week 3

Title of Activity

Testing Liquid Crystal Display (LCD)  using Arduino


Objective
- Checking whether the LCD is working.
- Check the coding to use for interface arduino to LCD

Content/Procedure
Equipment that has been used :-
- Arduino Uno (AtMega 328)
- Potential Potentiometer
- Resistor
- Jumper wired
- LCD

The circuit should been connected :-
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)


At the end the circuit should be like this,

The schematic design,


Coding program :

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("LCD Testing");
}

void loop() {
  // Turn off the display:
  lcd.noDisplay();
  delay(500);
   // Turn on the display:
  lcd.display();
  delay(500);
}

Result/Analysis
As a result, for make sure the LCD is functioned; 
- The USB connecter have been used as a power supply. 
And the LCD will display the different style that according from code that has been used.
- The LCD has display the "LCD Testing" after enter the program that has been coding.


Conclusion
At the end the LCD display the "LCD Testing" when we supply the power using USB to arduno. The LCD will display according to your code that has been be patch into ATMel328 using Arduino Uno, it show that LCD is working perfectly and should proceed to next process.

No comments:

Post a Comment