Docsity

LCD Test Project for ECE 4175: Creating Custom Character Patterns and Tests, Study Guides, Projects, Research of Electrical and Electronics Engineering

Toggle sidebar
bg1
Project Eight LCD Test Page 1 of 1
ECE 4175
Project Eight
LCD Test
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.

Partial preview of the text

Download LCD Test Project for ECE 4175: Creating Custom Character Patterns and Tests and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!

Project Eight LCD Test Page 1 of 1

ECE 4175

Project Eight

LCD Test

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.