📄 uart2xx.htm
字号:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<TITLE>C2xx C-Callable FFT Package</TITLE>
<META NAME="GENERATOR" CONTENT="Internet Assistant for Microsoft Word 2.04z">
</HEAD>
<BODY>
<H1>Writing to the C2xx Asynchronous Serial Port in C V1.00</H1>
<P>
<FONT SIZE=2>by Jeff Axelrod 3/26/97</FONT>
<H2>Introduction</H2>
<P>
<FONT SIZE=2>This program demonstrates how to write the C2xx asynchronous
serial port from the Texas Instruments C compiler. It is a C
version of the uart.asm file found in Example C-9 of Appendix
C in the TMS320C2xx User's Guide (SPRU127B). The program receives
input from the serial port and echoes each character as it is
received. </FONT>
<H2>Contents</H2>
<TABLE BORDERCOLOR=#000000 BORDER=2>
<TR><TD BGCOLOR=#FFFFFF WIDTH=91><B><FONT SIZE=2 COLOR=#FFFFFF>File</FONT></B>
</TD><TD BGCOLOR=#FFFFFF WIDTH=499><B><FONT SIZE=2 COLOR=#FFFFFF>Description</FONT></B>
</TD></TR>
<TR><TD WIDTH=91>main.c</TD><TD WIDTH=499>Main C module which initializes the serial port settings and contains the interrupt service routines.
</TD></TR>
<TR><TD WIDTH=91>registers.h</TD><TD WIDTH=499>Header file included by main.c which contains all memory-mapped registers which can be accessed in the C language.
</TD></TR>
<TR><TD WIDTH=91>cvectors.asm</TD><TD WIDTH=499>Assembly file which generates the C2xx vectors including the reset, and serial transmit and receive vectors.
</TD></TR>
<TR><TD WIDTH=91>c203.cmd</TD><TD WIDTH=499>Linker command file describing memory map and sections for the C203.
</TD></TR>
<TR><TD WIDTH=91>uart2xx.doc</TD><TD WIDTH=499>This document (in Microsoft Word format).
</TD></TR>
<TR><TD WIDTH=91>uart2xx.htm</TD><TD WIDTH=499>This document (in HTML format).
</TD></TR>
<TR><TD WIDTH=91>uart2xx.txt</TD><TD WIDTH=499>This document (in plain text format).
</TD></TR>
<TR><TD WIDTH=91>uart2xx.out</TD><TD WIDTH=499>Executable file for sample C program to be loaded by C2xx simulator or hardware.
</TD></TR>
<TR><TD WIDTH=91>build.bat</TD><TD WIDTH=499>Batch file for building uart2xx.out using only the Texas Instruments toolset.
</TD></TR>
<TR><TD WIDTH=91>rts2xx.lib</TD><TD WIDTH=499>Runtime support library.
</TD></TR>
</TABLE>
<H2>Usage</H2>
<P>
<FONT SIZE=2>Just load serial.out into the debugger and then run
it. Next, run a generic terminal program such as Hyperterminal
(included in Windows 95) and connect the PC serial port to the
serial port on the C2xx. Make sure to set the baud rate to 9600
baud if running at 20 Mhz, or 19200 baud if running at 40 Mhz.
If the device is functioning properly, you will see "c203
UART is fine!" being transmitted repeatedly. </FONT>
<H2>Modification</H2>
<P>
<FONT SIZE=2>The baud rate and clock rate may be changed in the
#define statements of main.c. To build, just type build.bat from
a DOS prompt. Or if using the GODSP Code Composer development
system, create a project with the following files: rts2xx.lib,
main.c, cvectors.asm, c203.cmd, and registers.h. Then build as
usual.</FONT>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -