beautypg.com

Echelon FT 5000 EVB User Manual

Page 26

background image

18

FT 5000 EVB Hardware Details

3. Run Windows HyperTerminal or another terminal emulation program on your computer to

monitor the serial output. Configure your terminal emulation program for direct connection to
your serial port using the serial parameters specified in the device application. See the next
section, Configuring a Device Application for Serial Debugging, for how to configure your device
application for application-level debugging.

Note: You can use only one of the EIA-232 or USB interfaces on the FT 5000 EVB at a time.

For information on implementing serial I/O, see the EIA-232C Serial Interfacing with the Neuron Chip
engineering bulletin (005-0008-01D).

Configuring a Device Application for Serial Debugging

If you are connecting the USB or EIA-232 interface to perform application-level debugging, you must
declare an SCI I/O object in your device application that specifies the communication parameters to be
used by Windows HyperTerminal or another terminal emulation program on your computer to monitor
the serial output. In addition, you must specify code in your device application that outputs data to the
interface.

For example, the example applications included with the FT 5000 EVB include the following code that
declares an SCI I/O object in the FT5000EvalBoard.h file specifying a baud rate of 9600 bps (see the
SCI (UART) Input/Output section in Chapter 4 of the I/O Model Reference for more information on
creating SCI I/O objects):

#ifdef FT5000EVALBOARD_USE_SERIALDEBUG
#include
#pragma specify_io_clock "10 MHz"
IO_8 sci baud(SCI_9600) ioSerialDebug;
void EvalBoardPrintDebug(char* string);
#endif // FT5000EVALBOARD_USE_SERIALDEBUG

The FT5000EvalBoard.nc file in the example applications includes a
EvalBoardPrintDebug()

function. This function calls the built-in io_out_request ( ) function,

which establishes and initiates the output operation over the serial interface [see the Neuron C
Reference Guide
for more information on the io_out_request ( ) function]. The declaration of the
EvalBoardPrintDebug()

function is as follows:

#ifdef FT5000EVALBOARD_USE_SERIALDEBUG

void EvalBoardPrintDebug(char *string)
{

io_out_request(ioSerialDebug, string, (unsigned int) strlen(string));

while

(!io_out_ready(ioSerialDebug));

}

#endif // FT5000EVALBOARD_USE_SERIALDEBUG