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
Integer literal Integer is numbers without fractional parts. e.g. 20       // Decimal 024      // Octal     0x14     // Hexadecimal To indicate long, unsigned,

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

S y m b o li c c o n s t a n t : c on s t m a x = 1 0 0 ; T h e d e f a u l t d a t a t y p e w i l l b e i n t e

Data array A has data series from 1,000,000 to 1 with step size 1, which is in perfect decreasing order. Data array B has data series from 1 to 1,000,000, which is in random order.

Make the following 3 functions work by filling in appropriate C code. This file 1. // Write a function to count the number of particular characters in a string. // Do not use a

Define the Data Type Modifiers in C language? There are three data types(int, float & double) above have the following modifiers. 1. short 2. long 3. signed 4. unsigned

A: Use references when you can use, and use pointers when you have to. References are generally preferred over pointers whenever you don't require "reseating". Usually this mean

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

Program is to take two arguments and returns the string: Program is to take two arguments and returns the string which is larger the larger string has larger ascii value invok

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''''a''''-''''z'''') and