CSE477 Laboratory Assignment #3


Serial Communication, Communication Protocols, Palm Pilot Development Environment

Assigned: 18 October
Due: 27 October


Objectives:

When you have completed this lab, you should know how to:


Reading:


Important Notes:


Part 1: Using the Palm Pilot as a User Interface

Starting with the provided skeleton program, write an application for the Palm Pilot that displays sonar and compass data received over the serial line. Think of your screen as a sonar map.

The user interface provides four menu options and a button. All of the procedures are written (and tested) except for the EVBupdate function. This function is called whenever an event occurs, or when the user requests. It should check the serial line for data and update the screen accordingly.

You must decide on and implement a serial communication protocol. Packets should always start with a framing byte. The format of the remainder of the packet is left up to you. The Windows Hyperterminal program can be a useful tool for debugging serial communication. Create a flowchart that documents your communication protocol.


Part 2: Controlling the Compass and Sonar Using the Palm Pilot

Modify your program from Lab 2 so that it communicates with the Palm Pilot using Debug Serial Header #1. Find the definition of the sp3_regs struct in the sa1100.h header file. What do the various fields in this structure control? What is the base address for this serial port? How are the RX and TX lines connected to the SA-1100? (Hint: look at the board schematics)

Your program will need to conform to the serial communications protocol that you implemented in the Palm Pilot CSE477Lab3 application. Revise your flowchart to include the StrongARM's communication with the compass and sonar. Include labels indicating where interrupts and used and where polling is used.


Show your flowchart to a TA and demonstrate your programs. Be prepared to answer questions about Pilot programming and the serial communication facilities of both the StrongARM and the Pilot.