Hardware Reference
In-Depth Information
9.12 Lab Exercises and Assignments
L9.1 Write a program to be run on your demo board. This program and the user interact as
follows:
1. The program outputs the message “Please enter your age:” and waits for the user to
enter his or her age.
2. The user enters his or her age (followed by a carriage return) and the program reads it.
3. The program outputs the message “Please enter your height in inches: and waits for
the user to enter his or her height.
4. The user enters his or her height in inches (followed by a carriage return) and the
program reads it.
5. The program outputs the message “Please enter your weight in lbs:” and waits for the
user to enter his or her weight.
6. The user enters his or her weight in lbs (followed by a carriage return) and the program
reads it.
7. The program outputs the following messages on the terminal screen and exits:
You are xxx years old.
You are kk ft mm inches tall.
You weigh zzz lbs.
L9.2 If your demo board has two TIA-232 connectors, then perform this experiment.
1. Connect one of the TIA-232 connectors to the PC so that you can download your
program onto the demo board.
2. Connect the second TIA-232 connector to another demo board.
3. Write a program to be run on two demo boards. The program outputs one character
per second to the SCI port that is connected to another demo board and then reads in
characters from the same SCI port.
4. The program displays the SCI activities on the LCD screen as follows:
The first row displays what has been sent out: snd: xxxxx . . .
The second row displays what has been received: rvd: yyyyy . . .
Only the last 16 characters sent and received will be displayed on the LCD screen if a
16 3 2 LCD screen is used.
 
Search WWH ::




Custom Search