The Software Transmit UART (SW_Tx_UART) component is an 8-bit RS-232 data-format compliant serial transmitter.

Similar documents
PSoC Creator Component Data Sheet. Calculation accuracy 0.01 C for -200 C to 850 C temperature range

Thermistor Calculator. Features. General Description. Input/Output Connections. When to use a Thermistor Calculator 1.10

Scanning Comparator (ScanComp) Features. General Description. Input/Output Connections. When to Use a Scanning Comparator. clock - Digital Input* 1.

Digital Multiplexer and Demultiplexer. Features. General Description. Input/Output Connections. When to Use a Multiplexer. Multiplexer 1.

Standard [CRC-1 (parity bit), CRC-4 (ITU-T G.704), CRC-5-USB, etc.] or custom polynomial

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

PSoC Programmer Release Notes

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

etpu Host Interface by:

Virtual Integrated Design Getting started with RS232 Hex Com Tool v6.0

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

PSoC Programmer Release Notes

AVR1510: Xplain training - XMEGA USART. 8-bit Microcontrollers. Application Note. Prerequisites. 1 Introduction

SEGGER emwin Graphic Library (emwingraphics)

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

AN2358. Manchester Decoder Using PSoC 1. Introduction. Contents. Manchester Code Principle

Standard [CRC-1 (parity bit), CRC-4 (ITU-T G.704), CRC-5-USB, etc.] or custom polynomial

21152 PCI-to-PCI Bridge

Clock. Features. General Description. Appearance 1.50

Initializing the TSEC Controller

AVR305: Half Duplex Compact Software UART. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

USER GUIDE EDBG. Description

DESIGNING SECURE USB-BASED DONGLES

Application Note AN0008. Data Logging Extension. For. Venus 8 GPS Receiver

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

INTEL SOFTWARE LICENSE AGREEMENT (OEM / IHV / ISV Distribution & Single User)

PSoC Programmer Release Notes

Data Movement Between Big-Endian and Little-Endian Devices

Freescale Embedded GUI Converter Utility 2.0 Quick User Guide

Designing an efficient Programmable Logic Controller using Programmable System On Chip

Software User Guide UG-461

Flexible Active Shutter Control Interface using the MC1323x

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

udrive-usd-g1 Embedded DOS micro-drive Module Data Sheet

AN3998 Application note

C. System Requirements. Apple Software is supported only on Apple-branded hardware that meets specified system requirements as indicated by Apple.

AVR106: C Functions for Reading and Writing to Flash Memory. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

ALPHA TEST LICENSE AGREEMENT

Serial Communications

Intel Media SDK Library Distribution and Dispatching Process

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

AT88CK490 Evaluation Kit

AVR033: Getting Started with the CodeVisionAVR C Compiler. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AN10866 LPC1700 secondary USB bootloader

SUDT AccessPort TM Advanced Terminal / Monitor / Debugger Version 1.37 User Manual

RDF1. RF Receiver Decoder. Features. Applications. Description. Ordering Information. Part Number Description Packages available

COM Port Stress Test

HEF4021B. 1. General description. 2. Features and benefits. 3. Ordering information. 8-bit static shift register

QorIQ espi Controller Register Setting Considerations and Programming Examples

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

AN3332 Application note

Application Note AN0008. Data Logging Extension. For. Venus 6 GPS Receiver

Bandwidth Calculations for SA-1100 Processor LCD Displays

2015 Qualcomm Technologies, Inc. All rights reserved.

AVR32138: How to optimize the ADC usage on AT32UC3A0/1, AT32UC3A3 and AT32UC3B0/1 series. 32-bit Microcontrollers. Application Note.

Using C to Access Data Stored in Program Space Memory on the TMS320C24x DSP

HEF4011B. 1. General description. 2. Features and benefits. 3. Ordering information. 4. Functional diagram. Quad 2-input NAND gate

AVR1922: Xplain Board Controller Firmware. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

13. Publishing Component Information to Embedded Software

MDM Zinc 3.0 End User License Agreement (EULA)

Database Binary Backup PC Utility

Intel Retail Client Manager Audience Analytics

MODFLEX MINI GATEWAY ETHERNET USER S GUIDE

SYMETRIX SOLUTIONS: TECH TIP August 2015

End User License Agreement for the Intel(R) Software Development Products

RS-485 Protocol Manual

PowerQUICC II Pro (MPC83xx) PCI Agent Initialization

PAC52XX Clock Control Firmware Design

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

4 Payment. 5 Intellectual Property

NVIDIA GRID 2.0 ENTERPRISE SOFTWARE

Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX

Master-Touch and ValuMass. Modbus Communications. INSTRUCTION MANUAL (Rev. 2.1)

The Answer to the 14 Most Frequently Asked Modbus Questions

1-of-4 decoder/demultiplexer

V OUT. I o+ & I o- (typical) 2.3A & 3.3A. Package Type

Dell Spotlight on Active Directory Server Health Wizard Configuration Guide

CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start

CONCEPT1 RS232 COMMUNICATION

Creating Carbon Menus. (Legacy)

FILEMAKER PRO ADVANCED SOFTWARE LICENSE

AN4128 Application note

PM1122 INT DIGITAL INTERFACE REMOTE

Standard [CRC-1 (parity bit), CRC-4 (ITU-T G.704), CRC-5-USB, etc.] or custom polynomial

AVR319: Using the USI module for SPI communication. 8-bit Microcontrollers. Application Note. Features. Introduction

Programming Audio Applications in the i.mx21 MC9328MX21

Using the RS232 serial evaluation boards on a USB port

PePWave Surf Series PePWave Surf Indoor Series: Surf 200, AP 200, AP 400

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

Website Hosting Agreement

SUBSCRIPTION SERVICES.

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

HG2 Series Product Brief

Quad 2-input NAND Schmitt trigger

AD9125-EBZ Quick Start Guide

SOLARWINDS, INC. ipmonitor 8.0 MANAGER END USER LICENSE AGREEMENT REDISTRIBUTION NOT PERMITTED

Transcription:

PSoC Creator Component Datasheet Software Transmit UART 1.0 Features Baud rates from 9,600 up to 115,200 bps High baud rate accuracy Low Flash/ROM resource usage General Description The Software Transmit UART (SW_Tx_UART) component is an 8-bit RS-232 data-format compliant serial transmitter. When to Use a SW_Tx_UART The SW_Tx_UART component is used to send out serial data in the RS-232 data-format. The component consists solely of firmware and a pin, so it is useful on devices without digital resources, or in projects where all digital resources are consumed. The SW_Tx_UART supports PSoC 3, PSoC 4 and PSoC 5LP. Input/Output Connections This section describes the various input and output connections for the SW_Tx_UART. An asterisk (*) in the list of I/Os indicates that the I/O may be removed from the component under the conditions listed in the description of that I/O. Tx Output* The Tx output is the serial transmit output of the UART. When configured in static mode this pin is present within the component and assigned to a physical pin using the Pin editor in the Design Cypress Semiconductor Corporation 198 Champion Court San Jose, CA 95134-1709 408-943-2600 Document Number: 001-87520 Rev. *A Revised May 31, 2016

Software Transmit UART PSoC Creator Component Datasheet Wide Resources. When configured in dynamic mode this pin is not present in the component. Instead the pin used is chosen at run-time using the StartEx() function. Component Parameters Drag a SW_Tx_UART onto your design and double click it to open the Configure dialog. The SW_Tx_UART provides the following parameters. Basic Options BaudRate This parameter specifies the baud rate of the component in bps. Range: 115200, 57600, 38400, 19200, 9600. Default: 115200. PinAssignmentMethod This parameter specifies the method by which the component s output pin is assigned. Static indicates that the component will contain a buried pin that will be assigned in the cydwr file. Dynamic requires that the pin be specified via the StartEx() API. Range: Static, Dynamic. Default: Static. Page 2 of 8 Document Number: 001-87520 Rev. *A

PSoC Creator Component Datasheet Software Transmit UART Application Programming Interface Application Programming Interface (API) routines allow you to configure the component using software. The following table lists and describes the interface to each function. The subsequent sections cover each function in more detail. By default, PSoC Creator assigns the instance name "SW_Tx_UART_1" to the first instance of a component in a given design. You can rename it to any unique value that follows the syntactic rules for identifiers. The instance name becomes the prefix of every global function name, variable, and constant symbol. For readability, the instance name used in the following table is "SW_Tx_UART." Functions Function SW_Tx_UART_Start() SW_Tx_UART_StartEx() SW_Tx_UART_Stop() SW_Tx_UART_PutChar() SW_Tx_UART_PutString() SW_Tx_UART_PutArray() SW_Tx_UART_PutHexByte() SW_Tx_UART_PutHexInt() SW_Tx_UART_PutCRLF() Description Empty function, included for consistency with other components. Configures the SW_Tx_UART to use the pin specified by the parameters. Empty function, included for consistency with other components. Sends one byte via the Tx pin. Sends a NULL terminated string via the Tx pin. Sends bytecount bytes from a memory array via the Tx pin. Sends a byte in Hex representation (two characters, uppercase for A-F) via the Tx pin. Sends a 16-bit unsigned integer in Hex representation (four characters, uppercase for A-F) via the Tx pin. Sends a carriage return (0x0D) and a line feed (0x0A) via the Tx pin. void SW_Tx_UART_Start(void) Description: Parameters: Empty function. Included for consistency with other components. This API is not available when PinAssignmentMethod is set to Dynamic. Side Effects: Document Number: 001-87520 Rev. *A Page 3 of 8

Software Transmit UART PSoC Creator Component Datasheet void SW_Tx_UART_StartEx(uint8 port, uint8 pin) Description: Parameters: Side Effects: Configures the SW_Tx_UART to use the pin specified by the parameters. This API is only available when PinAssignmentMethod is set to Dynamic. port: Port number for dynamic pin assignment pin: Pin number for dynamic pin assignment void SW_Tx_UART_Stop(void) Description: Empty function. Included for consistency with other components. Parameters: Side Effects: void SW_Tx_UART_PutChar(uint8 txdatabyte) Description: Sends one byte via the Tx pin. Parameters: txdatabyte: Byte to send Side Effects: void SW_Tx_UART_PutString(const char8 string[]) Description: Sends a NULL terminated string via the Tx pin. Parameters: string: Pointer to the null terminated string to send Side Effects: Page 4 of 8 Document Number: 001-87520 Rev. *A

PSoC Creator Component Datasheet Software Transmit UART void SW_Tx_UART_PutArray(const uint8 data[], uint16/uint32 bytecount) Description: Parameters: Side Effects: Sends bytecount bytes from a memory array via the Tx pin. data: Pointer to the memory array bytecount: Number of bytes to be transmitted (uint16 on PSoC 3, uint32 on PSoC 4 and PSoC 5LP) void SW_Tx_UART_PutHexByte(uint8 txhexbyte) Description: Sends a byte in Hex representation (two characters, uppercase for A-F) via the Tx pin. Parameters: txhexbyte: The byte to be converted to ASCII characters and sent via the Tx pin. Side Effects: void SW_Tx_UART_PutHexInt(uint16 txhexint) Description: Parameters: Side Effects: Sends a 16-bit unsigned integer in Hex representation (four characters, uppercase for A-F) via the Tx pin. txhexint: The uint16 to be converted to ASCII characters and sent via the Tx pin. void SW_Tx_UART_PutCRLF() Description: Sends a carriage return (0x0D) and a line feed (0x0A) via the Tx pin. Parameters: Side Effects: Document Number: 001-87520 Rev. *A Page 5 of 8

Software Transmit UART PSoC Creator Component Datasheet MISRA Compliance This section describes the MISRA-C:2004 compliance and deviations for the component. There are two types of deviations defined: project deviations deviations that are applicable for all PSoC Creator components and specific deviations deviations that are applicable only for this component. This section provides information on component specific deviations. The project deviations are described in the MISRA Compliance section of the System Reference Guide along with information on the MISRA compliance verification environment. The Software transmit UART component does not have any specific deviations. Sample Firmware Source Code PSoC Creator provides numerous example projects that include schematics and example code in the Find Example Project dialog. For component-specific examples, open the dialog from the Component Catalog or an instance of the component in a schematic. For general examples, open the dialog from the Start Page or File menu. As needed, use the Filter Options in the dialog to narrow the list of projects available to select. Refer to the "Find Example Project" topic in the PSoC Creator Help for more information. Functional Description The SW_Tx_UART supports 9600, 19200, 38400, 57600, and 115200 bps transfer speeds with no parity bit, 8 data bits, and a single stop bit. The component consists of a pin and firmware. If the PinAssignmentMethod is Static, the pin is buried in the component implementation, and is assigned in the PSoC Creator Pin Editor. If the PinAssignmentMethod is Dynamic, the pin is assigned and configured using the SW_Tx_UART_StartEx() API. In this configuration, the SW_Tx_UART_StartEx() API must be called before calling any other APIs; otherwise, the component will not function as expected. The supported baud rates are achieved using a combination of pin writes and software delays, implemented with the CyDelay function. If the CPU clock is changed from the configured frequency, then the CyDelayFreq API must be called before any data transmission. During transmission, the component masks interrupts to ensure proper timing of signals. Interrupts are restored after a byte is sent; functions that send multiple bytes restore interrupts between each byte. All data transmission functions are blocking. The component relies on the CPU clock frequency accuracy. For the best baud rate accuracy, the clock source for the CPU clock should be configured to use as accurate a clock source as available. Page 6 of 8 Document Number: 001-87520 Rev. *A

PSoC Creator Component Datasheet Software Transmit UART Software Transmit UART component requires to have Instruction Cache to be enabled for PSoC 3 and PSoC 5LP. This could be done in PSoC Creator project Design-Wide Resources editor on the System tab. By default, this option is enabled. SW_Tx_UART AC Specifications Parameter Description Baud Rate Min Typ Max Units fclock Operating frequency 9600 3-67 MHz 19200 3-67 MHz 38400 6-67 MHz 57600 12-67 MHz 115200 24-67 MHz How to Calculate the Baud Rate Error Value In the PSoC Creator Clock Editor, the accuracy of each clock source is shown. For example: In this example, the BUS_CLK (CPU) is derived from the IMO, which has an accuracy of +/-1%. The error in the baud error rate can be calculated as following: Divider = (int) (CPU_CLK+(BaudRate/2))/BaudRate %err = (BaudRate - CPU_CLK/ Divider)*100% + CPU_CLK_Accuracy The first part of the error is with dividing the CPU_CLK down to the baud rate. The second part of the error is the inaccuracy of the CPU_CLK. Document Number: 001-87520 Rev. *A Page 7 of 8

Software Transmit UART PSoC Creator Component Datasheet API Memory Usage The component memory usage varies significantly, depending on the compiler, device, number of APIs used and component configuration. The following table provides the memory usage for all APIs available in the given component configuration. The measurements have been done with associated compiler configured in Release mode with optimization set for Size. For a specific design the map file generated by the compiler can be analyzed to determine the memory usage. Configuration PSoC 3 (Keil_PK51) PSoC 4 (GCC) PSoC 5LP (GCC) Flash SRAM Flash SRAM Flash SRAM Software Transmit UART 371 8 406 8 378 8 Component Changes This section lists the major changes in the component from the previous version. Version Description of Changes Reason for Changes / Impact 1.0.a Minor datasheet edit. 1.0 First component version. First component version. Cypress Semiconductor Corporation, 2013-2016. This document is the property of Cypress Semiconductor Corporation and its subsidiaries, including Spansion LLC ( Cypress ). This document, including any software or firmware included or referenced in this document ( Software ), is owned by Cypress under the intellectual property laws and treaties of the United States and other countries worldwide. Cypress reserves all rights under such laws and treaties and does not, except as specifically stated in this paragraph, grant any license under its patents, copyrights, trademarks, or other intellectual property rights. If the Software is not accompanied by a license agreement and you do not otherwise have a written agreement with Cypress governing the use of the Software, then Cypress hereby grants you a personal, non-exclusive, nontransferable license (without the right to sublicense) (1) under its copyright rights in the Software (a) for Software provided in source code form, to modify and reproduce the Software solely for use with Cypress hardware products, only internally within your organization, and (b) to distribute the Software in binary code form externally to end users (either directly or indirectly through resellers and distributors), solely for use on Cypress hardware product units, and (2) under those claims of Cypress s patents that are infringed by the Software (as provided by Cypress, unmodified) to make, use, distribute, and import the Software solely for use with Cypress hardware products. Any other use, reproduction, modification, translation, or compilation of the Software is prohibited. TO THE EXTENT PERMITTED BY APPLICABLE LAW, CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS DOCUMENT OR ANY SOFTWARE OR ACCOMPANYING HARDWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. To the extent permitted by applicable law, Cypress reserves the right to make changes to this document without further notice. Cypress does not assume any liability arising out of the application or use of any product or circuit described in this document. Any information provided in this document, including any sample design information or programming code, is provided only for reference purposes. It is the responsibility of the user of this document to properly design, program, and test the functionality and safety of any application made of this information and any resulting product. Cypress products are not designed, intended, or authorized for use as critical components in systems designed or intended for the operation of weapons, weapons systems, nuclear installations, life-support devices or systems, other medical devices or systems (including resuscitation equipment and surgical implants), pollution control or hazardous substances management, or other uses where the failure of the device or system could cause personal injury, death, or property damage ( Unintended Uses ). A critical component is any component of a device or system whose failure to perform can be reasonably expected to cause the failure of the device or system, or to affect its safety or effectiveness. Cypress is not liable, in whole or in part, and you shall and hereby do release Cypress from any claim, damage, or other liability arising from or related to all Unintended Uses of Cypress products. You shall indemnify and hold Cypress harmless from and against all claims, costs, damages, and other liabilities, including claims for personal injury or death, arising from or related to any Unintended Uses of Cypress products. Cypress, the Cypress logo, Spansion, the Spansion logo, and combinations thereof, PSoC, CapSense, EZ-USB, F-RAM, and Traveo are trademarks or registered trademarks of Cypress in the United States and other countries. For a more complete list of Cypress trademarks, visit cypress.com. Other names and brands may be claimed as property of their respective owners. Page 8 of 8 Document Number: 001-87520 Rev. *A