LCD Display LCD Screen Overview For this course

  • Slides: 12
Download presentation
LCD Display

LCD Display

LCD Screen Overview �For this course we will be using a 16 x 2

LCD Screen Overview �For this course we will be using a 16 x 2 LCD display (datasheet on course site) �The first step is to solder headers onto the bottom of the screen so it can be inserted into our breadboard

Installed Headers

Installed Headers

Wiring the LCD �We are going to use the Ladyada tutorial on LCDs to

Wiring the LCD �We are going to use the Ladyada tutorial on LCDs to guide our LCD wiring (http: //learn. adafruit. com/downloads/pdf/characterlcds. pdf) �The only difference is that we will use pins 25 -30 instead of 12 -7 (25=12, 26=11, ect. )

Wired LCD Picture

Wired LCD Picture

Hello World Test �Run File->Examples->Liquid Crystal->Hello World (also run by Ladyada) �Remember to set

Hello World Test �Run File->Examples->Liquid Crystal->Hello World (also run by Ladyada) �Remember to set the LCD pins according to our custom setup

Run Custom Character Example �We will be using our LCD to display temperature so

Run Custom Character Example �We will be using our LCD to display temperature so we need to create a degree symbol �Download and install the character generator from course site �Run the Custom. Character example from Arduino �In Arduino 1. 0. 1 there appears to be a bug in this example. �It is shown on the next slide, before moving on try and solve it yourself. The answer is after the picture in white font (highlight and change color to view)

Error

Error

Solution �There is a bug that does not allow for character 0 to be

Solution �There is a bug that does not allow for character 0 to be addressed (lcd. write(0)) �Simply start numbering your custom characters at 1

Custom Characters Continued �Now we need to create the character �Download and install the

Custom Characters Continued �Now we need to create the character �Download and install the character generator from course site �Click on the pixels desired to create the shape �Copy the hex string to the clipboard �In the code for your chamber create the custom a custom character called deg. Sign and use the hex as the points (reference the Custom. Character example) �Create and initialize the LCD screen in the code

Display the temperature �On the first line of the LCD screen print a label

Display the temperature �On the first line of the LCD screen print a label for the data (e. g. “temp is: ”) �On the second line display the current temperature, degree sign, and units

Working Display Picture

Working Display Picture