Example Project – UART
July 31, 2009 Document No. 001-54939 Rev ** 1
Project Name: Example_UART
Programming Language: C
Associated Part Families: CY8C29/27/24/22/21xxx, CY8C23x33, CY7C64215, CYWUSB6953
CY8CLED02/04/08/16, CY8CLED03D/04D, CY8CNP102, CY8CTST110, CY8CTMG110, CY8CTST120
CY8CTMG120, CY8CTMA120, CY8C21x45,CY8C22x45, CY8CTMG300, CY8CTST300, CY8CTMA300
CY8CTMA301, CY8CTMA301D, CY8C28x45,CY8CPLC20, CY8CLED16P01, CY8C28x43, CY8C28x52
Software Version: PSoC Designer 5.0 SP5
Project Objective
This example project demonstrates the operation of the 8-bit UART user module in PSoC
®
.
Overview
A command and some parameters (separated by spaces) are transmitted to the PSoC by a personal computer using Windows
Hyper Terminal, through the serial port. The data is received and decoded by PSoC and the command and parameters are
echoed back to the PC (line by line).
User Module List and Placement
The following table lists user modules used in this project and the hardware resources occupied by the user module.
User Module
Placement
UART
DCB02 (TX Configuration)
DCB03 (RX Configuration)
User Module Parameter Settings
The following table shows the user module parameter settings for UART user module.
UART
Parameter
Value
Comments
Clock
VC3
Input is 153.8 KHz clock (that is, eight times baud rate - 19200).
VC3=Sys.Clk / 156.
RX Input
Row_0_Input_1
Routed from pin P2[5] through GlobalInEven_5.
TX Output
Row_0_Output_3
Routed to pin P2[7] through GlobalOutEven_7.
TX InterruptMode
TXRegEmpty
Not used.
Clock Sync
Sync to Sys.Clock
Clock is synchronized with the SysClk, as VC3 is a derivative of SysClk
RxCmdBuffer
Enable
Enable the Command buffer, so that the command received is stored in a
RAM buffer.
RxBufferSize
32
Bytes Length of buffer is 32 characters (including parameters).
Command Terminator
13
Carriage return (13) is the command terminator.
Param_Delimiter
32
Space (32) is the parameter delimiter.
IgnoreCharsBelow
32
Ignore control characters which have ASCII value below 32.
Enable Backspace
Disable
Not used.
Rx Output
None
Not used
Rx Clock Out
None
Not used
Tx Clock Out
None
Not used
InvertRX Input
Normal
Do not invert Rx Input.
[+] Feedback
- 1
- 2
前往页