Algorithm to Implementation. Fast.
Home > Support > Knowledge Base > Support Solutions > RS232 Communication through PAL and PSL
Article Number: ADS-000530
Date: 01 Dec 2006
This article is concerned with communication between a terminal and a PAL supported board via the serial RS232 connector.
The example available for download connects to a PC using windows HyperTerminal.
The PAL RS232 library contains functions to write and read data to and from an external device via a standard 9-pin serial port.
The code in the download section demonstrates communication between any board which supports the PAL architecture and any device with a read and write serial port.
PAL is designed to run at a baud rate of 115,200bps, so it is important to have the external device set to this baud rate. If a different baud rate is required, a board-specific PSL call must be made. For an RC200, this is of the form:
RC200RC232Run (baud rate, parity, flow control, clock rate);
In the attached example, this line is selected by setting the #define USE_115200_BAUD to 0. Setting #define USE_115200_BAUD to 1 calls the PAL function PALDataPortRun(), which always sets a baud rate of 115,200bps.
Note that using a PSL function makes the design platform dependent.
This should now connect to your board. The PAL Console will load onto a monitor connected to the video out port of your Agility board and key presses from the PC should appear on the console. HyperTerminal should display the message 'hello' over and over again, as this is being transmitted one character every quarter of a second from the board.
Click on the link below. You will then be sent to a page where you can download the software.
Unzip the downloaded file into a local folder.
This object and source code is not supported.