TOC PREV NEXT

9.4 LABORATORY - SERIAL INTERFACING AND PROGRAMMING


Purpose:

To achieve a basic understanding of the serial communication hardware and software.

Overview:

Please review the chapter

Pre-Lab:

1. Enter the C++ code found in the chapter.

In-Lab:

1. Set up two computers beside each other, at least one should be a Linux computer.
2. Select the right connectors for the serial ports (9 or 25 pin, and male or female) on the computers and build a null modem RS-232 cable to connect the two computers.
3. Start a serial communication program on both of the computers, and establish communications - this will require you to change communication settings.
3a. (Linux) You may use 'minicom', you will have to be logged in as root, or change the settings for the serial port with 'chmod 666 /dev/ttyS0' or 'chmod 666 /dev/ttyS1'.
3b. (Windows) Use the hyperterm program 'hypertrm.exe'. When prompted for connection information select 'cancel'.
4. Enter and run the C++ program to echo serial data.
5. Modify the number guess game developed in a previous lab to operate over the serial port.

Submit (individually):

1. The source code listings for the game running on the serial port.

TOC PREV NEXT