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:
- Use the serial communication facilities of the StrongARM multimedia board.
- Use the serial communication facilities of the Palm Pilot.
- Implement a simple serial communications protocol.
- Implement a simple user interface on the Palm Pilot.
- Integrate the software for two concurrent functions.
Reading:
- Course notes on communication (RS-232, in particular).
- Handout of the Palm Pilot application code with which your StrongARM
multimedia board will communicate.
- Sections 11.9 (introduction and 11.9.10), 11.11 and 11.13 of the
SA-1100 Developer Manual
(paying particular attention to 11.13.5 and 11.13.7)
- Chapter 4 (Palm Pilot Communication) of the Palm Pilot Reference
Manual vol 3.
Important Notes:
- In order to HotSync with the Palm Pilot you will need to be logged
in as 327user. Your TA will give you the password for this
account.
- To use the Palm Pilot emulator for debugging, you will need to configure
Metroworks CodeWarrior. Open the Edit -> Preferences dialog
and select the "Palm Connection Settings" (located under "Debugger")
in the tree control.
- If you wish to debug your StrongARM application using Hyperterminal,
you will need to use a null modem.
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.