
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Project Eight LCD Test Page 1 of 1
Complete by: References: Wednesday March 4 for an A+ Section 7.7 from “LCD Displays - old Ch. 7.pdf” Switch statement handout LCD test character patterns
For this project, modify your P7.c file into a new P8.c file by adding the DisplayC function that accesses constant strings stored in program memory. Then after initializing the LCD, send a constant display string to the LCD that will create the six user-defined characters shown on the attached sheet. With this initialization of the LCD, a subsequent use of “ASCII code” 0x01 will produce the left-most checkboard pattern in the selected character position. To create the constant display string to create the six characters, refer to Figure 7-14(a).
Next, create new constant display strings, used to write each of six test patterns to the LCD.
First test: Write 1,2,1,2,1,2,1,2,1,2, etc. across both rows.
Second test: Write 2,1,2,1,2,1,2,1,2,1, etc. across both rows.
Third test: Write 3,3,3,3,3,3,3,3,3,3, etc. across both rows.
Fourth test: Write 4,4,4,4,4,4,4,4,4,4, etc. across both rows.
Fifth test: Write 5,6,5,6,5,6,5,6,5,6, etc. across both rows.
Sixth test: Write 6,5,6,5,6,5,6,5,6,5, etc. across both rows.
Test Program
Your program is to check the RPG every ten milliseconds. Use the RPG to increment (CW) and decrement (CCW) through these six tests. That is, initially write the “First test” pattern to the display. A single CW increment is to write the “Second test” pattern to the display. Only write to the LCD in response to a change in the RPG. To implement this, use the RPG to increment/decrement a number in the range 1-6. For each CW change, increment one count from the present number: CW: ...,5,6,1,2,3,4,5,6,1,2,3,4,5,6,1,2,... For each CCW change, decrement one count from the present number: CCW: ...,2,1,6,5,4,3,2,1,6,5,4,3,2,1,6,5,... Now use a switch statement to translate this number into which test to implement.