Cypress Semiconductor CY8CNP102E Uživatelský manuál

Procházejte online nebo si stáhněte Uživatelský manuál pro ne Cypress Semiconductor CY8CNP102E. CE54939 – 8-bit Universal Asynchronous Receiver Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 9
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 0
8-bit Universal Asynchronous
Receiver Transmitter
August 9, 2011 Document No. 001-54939 Rev *C 1
CE54939
Example Name: Example_UART
Programming Language: C
Associated Part Families: CY8C29/27/24/22/21xxx, CY8C23x33, CY7C64215, CYWUSB6953, CY8CNP102,
CY8CLED02/04/08/16, CY8CLED03D/04D, CY8CTST110, CY8CTMG110, CY8CTST120 CY8CTMG120,
CY8CTMA120, CY8C21x45,CY8C22x45, CY8CTMG300, CY8CTST300, CY8CTMA300 CY8CTMA301,
CY8CTMA301D, CY8C28x45,CY8CPLC20, CY8CLED16P01, CY8C28x43, CY8C28x52
Software Version: PSoC
®
Designer
TM
5.1 SP2
Related Hardware
: CY3210 PSoCEval1
Author: Dineshbabu Mani
Objective
The operation of the 8-bit universal asynchronous receiver transmitter (UART) user module in PSoC
®
is demonstrated in this
code example.
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 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 lists the UART user module parameter settings.
UART
Parameter Value Comments
Clock VC3 Input is 153.8 KHz clock (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 Enables Command buffer, and stores the received command 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 that have ASCII value below 32
Enable Backspace Disable Not used
Rx Output None Not used
Zobrazit stránku 0
1 2 3 4 5 6 7 8 9

Shrnutí obsahu

Strany 1 - CE54939

8-bit Universal Asynchronous Receiver Transmitter August 9, 2011 Document No. 001-54939 Rev *C 1 CE54939 Example Name: Example_UART Programmi

Strany 2 - Hardware Connections

CE54939 August 9, 2011 Document No. 001-54939 Rev *C 2 UART Parameter Value Comments Rx Clock Out None Not used Tx Clock Out None Not used In

Strany 3 - Operation

CE54939 August 9, 2011 Document No. 001-54939 Rev *C 3 The code can be tested using CY3210 – PSoC Eval1 board. This board has a RS232 transceiver a

Strany 4

CE54939 August 9, 2011 Document No. 001-54939 Rev *C 4 The flowchart of the program execution is shown as follows. Figure 4.Program Execution Flow

Strany 5 - Testing the Project

CE54939 August 9, 2011 Document No. 001-54939 Rev *C 5 Testing the Project Use HyperTerminal (or any other terminal program) to test the project. C

Strany 6 -

CE54939 August 9, 2011 Document No. 001-54939 Rev *C 6 5. In the COM2 properties, configure the following parameters:  Bits per second = 19200 

Strany 7 - Figure 10.Setting Up ASCII

CE54939 August 9, 2011 Document No. 001-54939 Rev *C 7 8. Select File  Properties  Settings menu and click ASCII Setup. Figure 9.UART Properties

Strany 8 - 10. Click Call

CE54939 August 9, 2011 Document No. 001-54939 Rev *C 8 10. Click Call. Figure 11.Connect to the Serial Port 11. Power-up the PSoC. The HyperTerm

Strany 9 - Document History

CE54939 August 9, 2011 Document No. 001-54939 Rev *C 9 Document History Document Title: 8-bit Universal Asynchronous Receiver Transmitter - CE5493

Komentáře k této Příručce

Žádné komentáře