Program that controls the lcd display, C/C++ Programming

Objective:

 Construct a C program that controls the LCD display, and is capable of displaying strings.  Add functions to the C program that allows more control over the display.

Outcome:

 The toggle switches should control the content of the display.  At least five messages should be able to be displayed

Procedure:

­ Step 1:  Log into the computer in the lab using your credentials.

­ Step 2:  Copy the files you saved last week back into the working directory on the computer.

­ Step 3:  Start Quartus II and download the same image that you did last lab.  Refer back to last lab notes if you are foggy. The LED's have stopped blinking now. 

Thanks!

­ Step 4:  Open up the NIOS II IDE, and select your workspace.

­ Step 5:  Find the template for the LCDGotoXY() function and implement your own version of this function.  You will have to refer to the HD44780 LCD controller data sheet to understand how the screen data is organized inside of the chip.  Hint: To set the next insertion point write to the 'DDRAM' address counter. 

Remember, that our display is organized into two lines of 16 columns each.

­ Step 6:  In the main() function you will have to add code that does the following:

  • Read the switches.
  • Check to see if they have changed since the last read, go back to reading the switches if they have not.
  • Debounce the switches by waiting for 50ms.
  • Read the switches again.
  • Move the cursor to the upper left of the screen using LCDGotoXY(0,0).
  • Use a switch statement to select one of several messages to print. One of them should be to clear LCD using LCDClear function call.
  • Print the message
  • Save the state of the switches
  • Go back to the start to read the switches.
Posted Date: 3/5/2013 6:18:45 AM | Location : United States







Related Discussions:- Program that controls the lcd display, Assignment Help, Ask Question on Program that controls the lcd display, Get Answer, Expert's Help, Program that controls the lcd display Discussions

Write discussion on Program that controls the lcd display
Your posts are moderated
Related Questions

Binary search in array: - C program: Write a program in c to define binary search in array. void main()                 {                 clrscr();

Friend Functions One of the major features of OOP is information hiding. A class encapsulates data and methods to operate on that data in a single unit. The data from the class


Create a program that will accept 3 numbers. The first number (num1) is the common difference and the second number (num2) is the starting number and the 3rd number (num3) is the m

in this problem you are given a board in which some of the elements are placed as shown in below diagram.each element represent a color.fill the other element in the board,such tha

1. The shell must support the following internal commands: i. cd - Change the current default directory to . If the argument is not present, report the current directory. If t

Write a c program to determine interchanged values between two variables?[Hint - if loop] What will be the output of the program? How many times this loop will execute? Wr

Write a C++ program doing the following: The program reads from the keyboard the numbers of rows and columns of a 2-D array of integers. Then, it allocates this array (let’s name i

The voltage at the terminals of a battery is 52V when no load is linked and 48.8V when a load taking 80A is connected. Find the internal resistance of the battery. What wou