C program that controls the uart, C/C++ Programming

Objective:

Construct a C program that controls the UART, and is capable of displaying strings. Echo characters received on the UART to the LCD screen

Outcome:

A message should print on the terminal program (i.e. Hyper Terminal) attached to the DE2 Kit. Keystrokes from the terminal should appear in the LCD display.

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 week.

Refer back to last week's 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: Copy the supplied file 'uart.c' into your project workspace using the IDE to drag and drop it from the disk into the project.

 Step 6: Fill in the functions in the supplied template

 Step 7: Construct a main routine that does the following steps:

  1. Initializes the LCD
  2. Initializes the UART
  3. Prints a message on the UART
  4. Prints a message on the LCD
  5. Sets the cursor on the LCD to the beginning of the second line (LCDGotoXY(0,1))
  6. Enters a while loop that
  7. Reads a character from the UART port
  8. Prints the character on the LCD screen

 Step 8:Connect 9-pin serial cable to RS-232 port in DE2 pack

 Step 9: Open hyper terminal window in PC. Configure properties based on the UART core configuration information using SOPC. Serial port parameters configuration could be 115200, N, 8, 1 with no flow control (i.e. no handshaking).

 Step 10: Get the instructor over to verify functionality

 Step 11: Adventurous students may wish to make the LCD cursor wrap back to the first column on the display if more than 16 characters are typed.

 Step 12: Extra adventurous students may implement vertical scrolling of the LCD when the cursor reaches the end of the line. (WARNING: requires an abstraction of the display into an array, and writing functions that update the real display from the virtual one.)

Posted Date: 3/8/2013 5:04:15 AM | Location : United States







Related Discussions:- C program that controls the uart, Assignment Help, Ask Question on C program that controls the uart, Get Answer, Expert's Help, C program that controls the uart Discussions

Write discussion on C program that controls the uart
Your posts are moderated
Related Questions
Question : (a) Define a Pointer. Provide an example of an integer pointer variable. (b) Give advantages of using pointers over arrays. (c) Declare an integer pointer

Assume that a Binary Search Tree is constructed by repeatedly inserting exact values in to the tree. Argue that the number of nodes examined in searching for a value in the tree is


A: A smart pointer is a C++ class which mimics a regular pointer in syntax and some semantics, however it does more. Since smart pointers to distinct types of objects tend to have

Q: But operator overloading makes class look ugly; isn't it assumed to make my code clearer? A: Operator overloading makes life simpler for the users of a class, not for develop

Define the Bitwise-Exclusive-OR Operator: ^: The bitwise-exclusive-OR operator (^) compares every bit of its first operand to the corresponding bit of its second operand. If on

Create a user-defined data structure (struct) called Node that represents a node within a linked list where the "data" stored in each node is a pointer to a Car object.    a) Wr

F u nction Returning Object: This program is like to the previous program except the function returns object.  The main rule to be remembered is the function returning obj

please may i have a brief theory about a c++ program to find net salary of employees

Both malloc & new functions are utilized for dynamic memory allocations & the basic difference is: malloc need a special "typecasting" while it allocates memory for eg. if the poin