You are here

PSoC 1 Code Examples | Cypress Semiconductor

PSoC 1 Code Examples

Last Updated: 
Oct 06, 2015

The following Code Examples are integrated with PSoC Designer. To access these code examples, follow the path Start Page -> Design Catalog -> Launch Example Browser in PSoC Designer.

CE#
Title
Part#
Description
CE52024 Half-Duplex UART CY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This Code Example implements an 8-bit half-duplex UART in PSoC® 1 by using dynamic reconfiguration and a single digital communication block.
CE52125 Push-Pull PWM Example Project CY24x23, CY27x43, CY8C29x66, CY8C24x94 This example creates a two phase symmetrical push pull PWM with the PWMDB8 User Module.
CE52126 Generate Sine Wave by LUT method in PSoC 1 CY24x23, CY27x43, CY8C29x66, CY8C24x94, CY27x43 This Code Example shows how to generate a sine wave of 60 Hz using an 8-bit DAC, 16-bit counter as time base, and 64 point lookup table (LUT) in PSoC® 1.
CE54097 Sleep Timer User Module CY8C29/27/24/22/21/20xxx, CY8C23x33, CY8CLED02/04/08/16, CY7C64215, CY8CLED03D/04D, CY8CNP102, CY8CTST110, CY8CTMG110, CY8CTST120, CY8CTMG120, CY8CTMA120, CY8CTST200, CY8CTMG2xx, CY8C21x45, CY8C22x45, CY8CTST300, CY8CTMG300, CY8CTMA300, CY8C28x45, CY8CPLC20, CY8CLED16P01 This Code Example demonstrates the use of the Sleep Timer to generate interrupts at regular intervals.
CE54287 Using an Incremental ADC to measure 0 to 5V Project CY8C29/27/24/22xxx, CY8C23x33, CY8CLED04/08/16, CY8CNP102, CY8C28x45 This example is designed to measure 0 to 5V input using ADCINCVR available in PSoC® 1 and display it on a LCD.
CE54486 Interfacing PSoC1 to a DS1307 I2C RTC CY8C29/28/27/24/22/21xxx, CY8C23x33, CY7C603xx, CY7C64215, CYWUSB6953, CY8CLED02/04/08/16, CY8CLED04D01/02/03/04, CY8CTxx110, CY8CNP102 This code example demonstrates how to interface the PSoC® 1 to an I2C Real Time Clock (DS1307) and display the date and time on the LCD.
CE54939 UART User Module Example Project 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 The operation of the 8-bit universal asynchronous receiver transmitter (UART) user module in PSoC® is demonstrated in this example.
CE55651 PRS User Module Example Project CY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This project demonstrates the operation of an 8-bit pseudo random sequence (PRS) generator using PSoC® 1.
CE57347 E2PROM Example CY8C21x34, CY8C24x23, CY8C27x43, CY8C29x66 This Code Example demonstrates the usage of the E2PROM user module.
CE58024 DelSigADC and UART Example Project CY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This project demonstrates the DelSigADC with second order modulator and the UART.
CE58026 Dual-ADC User Module Example Project CY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This project demonstrates the operation of the DualADC User Module of the PSoC® device.
CE58027 I2CHW User Module Slave Operation CY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This Code Example demonstrates the I2CHW user module operation in Slave mode. The I2C USB Bridge is used as Master that communicates with the I2CHW slave.
CE58033 Pulse Width Measurement using Timer Capture in PSoC 1 CY8C27x43, CY8C29x66, CY8C24x23, CY8C21x34, CY8C24x94, CY8CLEDxx This code example demonstrates the functionality of Capture feature of timer user module of PSoC® 1.
CE58034 Measure and Display 0 to 4V on LCD Using ADC10 Project CY8C21x23, CY8C21x34, CY8C21x45, CY8C22x45, CYWUSB6953, CY8C28x45 This project demonstrates to measure a 0 to 4 V input using ADC10 available in limited analog families of PSoC® 1 (CY8C21x23, CY8C21x34,CY8C21x45, CY8C22x45, CYWUSB6953, CY8C28x45) and display it on an LCD.
CE58035 I2C_EEPROM Example Project CY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This project demonstrates how to interface the PSoC® 1 to serial EEPROM (24C256) using software I2C Master (I2Cm) User Module.
CE58788 CRC User Module Example Project CY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This project demonstrates the operation of the CRC User Module of PSoC® microcontroller. For communication, this project uses SPI master (SPIM) User Module.
CE61131 PSoC 1-I2C Slave Example Using EzI2C User Module CY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This code example demonstrates the operation of EzI2Cs user module.
CE63845 USBUART User Module Example Project CY8C24x94, CY8CLED04 This project displays the text on to the LCD that has been typed in the HyperTerminal PC Application.
CE69310 PSoC 1 I2C Bootloader All PSoC 1 Families This code example demonstrates how to create an I2C bootloader for PSoC® 1. The bootloader allows the device to be reprogrammed over an I2C communication interface.
CE82235 ADCINC User Module Example Project CCY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This project demonstrates the operation of the ADCINC user module in PSoC® 1.
CE82240 PRS_PWM Example Project CY8C21x34, CY8C24x23, CY8C27x43, CY8C29x66 This project demonstrates the use of the PRS user module as a pseudo random pulse width modulator (PWM) and compares the PRS PWM and conventional PWM in terms of average duty cycle and harmonic noise.
CE82297 TriADC User Module Example Project CY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This project demonstrates the operation of the TriADC User Module.
CE82299 OneShot Example Project CY8C29/27/24/21/20xxx, CY8CLED02/04/08/16, CYWUSB69xx, CY8CLED03D/04D This project demonstrates the operation of OneShot8 User Module that produces a single pulse in response to an input signal.
CE82304 DigBuf User Module Example Project CY8C24x23, CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This project demonstrates the operation of the DigBuf User Module of the PSoC® device.
CE82305 CMPPRG User Module Example Project CY8C24x23,CY8C27x43, CY8C29x66, CY8C24x94, CY8C21x34 This project demonstrates the usage of the CMPPRG user module with a DigBuf of PSoC® device.
CE82634 Host Code For Bootloading PSoC 1 Via I2C CY8C29/27/24/22/21xxx, CY8C23x33, CY8C21x45, CY8C22x45, CY8C28x45,CY8CPLC20, CY8CLED16P01, CY8C28x43, CY8C28x52 This Code Example demonstrates bootloading a PSoC 1 device from another PSoC 1 via I2C interface using a DLD file. The code example can be ported to any other Host MCU to bootload the PSoC 1.
CE85395 SMBus Slave Using PSoC 1 CY8C28xxx, CY8C29x66/27x43/24xxx, CY8C23x33, CY8C21x34, CY8C21x23 This project demonstrates how to implement a SMBus Slave device using PSoC® 1, and explains different SMBus commands and their usage with the Bridge Control Panel (BCP) tool.
CE85976 Code Example For SmartSense User Module in PSoC 1 CY8C22x45, CY8C21x45 This project demonstrates the operation of the SmartSense2X User Module (UM) of the PSoC® 1 device.
CE86738 Code Example for FanController User Module in PSoC 1 CY8C29x66, CY8C27x43, CY8C24x23, CY8C28xxx, CY8C24x94 This project demonstrates the closed loop operation of FanController user module of PSoC Device.
CE97630 Interfacing PSoC® 1 with PCD8544 Graphics LCD Module This example demonstrates how to interface PSoC® 1 with the PCD8544 graphic LCD module.

Code Examples integrated with Application Notes

AN#
AN Title
Part #
Description
AN45022 USB to DMX512 Converter CY8C24x94, CY8CLED0x, CY8CLED0xD0x This application note describes a USB to DMX512 converter, which utilizes Cypress’s CY8C24x94 family of devices. The included GUI application allows the user to transfer data through the DMX512 interface as the network master.
AN2094 PSoC®1 - Getting Started with GPIO CY8C24x23A, CY8C24x94, CY8C21x34,
CY8C20x34, CY8C21x23, CY8C21x45, CY8C22x45, CY8C27x43, CY8C28xxx,
CY8C29x66, CY7C64215, CYWUSB6953
AN2094 discusses relevant topics on general-purpose input and output (GPIO) such as drive modes, shadow registers, and GPIO interrupts to get started with PSoC®1 GPIOs. This document also provides a few tips and briefs of the other resources associated with PSoC 1 GPIOs.
AN2042 PSoC®1 - Multifunctional Optical Sensor CY8C27x43 AN2042 explains how to design applications with optical sensors. The application note elaborates on the sensor flowchart and gives a step by step procedure to implement the sensor flowchart inside PSoC.
AN2034 PSoC®1 - Reading Matrix and Common Bus Keypads CY8C27xxx, CY8C29xxx,
CY8C21x23, CY8C21x34,CY8C21x45, CY8C22x45,
CY8C24x23, CY8C24x94, CY8C28xxx
AN2034 shows how to use PSoC®1 to read mechanical keypads. It covers matrix and common bus keypads, in both polled and interrupt modes.
AN47215 PSoC® RC Oscillator to Accurately Time Sleep Cycles CY8C20x34, CY8C21x23, CY8C21x34, CY8C23x33, CY8C24x23A,
CY8C24x94, CY8C27x43, CY8C29x66, CYWUSB6953
AN47215 describes a method of using an external RC oscillator to create sleep cycles with an accurate period.
AN2032 PSoC®1 Fast Unsigned Multiplication Algorithms All PSoC®
1 Devices
AN2032 details efficient high-speed algorithms for multiplication using the PSoC® 1’s built-in Multiply-accumulate (MAC) unit. Topics include signed versus unsigned values, the basics of the PSoC 1 MAC, using macros, and multi-byte multiplication.
AN2104 PSoC®1 - Dynamic Reconfiguration With PSoC®Designer™ CY8C20x34, CY8C21x23,
CY8C21x34, CY8C21x45, CY8C22xxx, CY8C23x33,
CY8C24x23A, CY8C24x94 CY8C27x43, CY8C28xxx,
CY8C29x66, CY8CLED04 CY8CLED08, CY8CLED16
AN2104 gives a detailed explanation of dynamic reconfiguration, and presents best practices for successfully implementing Dynamic Reconfiguration with PSoC® Designer™. Dynamic reconfiguration is a unique feature of PSoC Designer that allows a designer to easily create a project that uses more resources of the chip than are statically available. This is done by time multiplexing the resources inside of a PSoC Chip.
AN2344 Power Management - Battery Charger with Cell-Balancing and Fuel Gauge Function Support CY8C27x43, CY8C29x66 AN2344 integrates cell-balancing and fuel gauge methods into a multi-cell battery charger. The application is designed for battery packs with two, three, or four Li-Ion or Li-Pol cells in a series. It includes dedicated PC-based software for real-time
viewing and analysis of the charge, cell-balance and fuel gauge processes. The application can be used as a complete battery pack management system for notebooks, medical and industrial equipment, and other, similar applications.
AN2100 Bootloader: PSoC® 1 CY8C27xxx, CY8C29xxx This application note describes a bootloader that uses the PSoC® 1 self-programming capability that allows users to reprogram the user flash memory through a UART interface. A dedicated Windows application is developed to simplify PSoC 1 programming through the bootloader.
AN51234 Getting Started with SPI in PSoC® 1 CY8C21x23, 21x34, 21x45, 22x45, 23x33,
24x23A, 24x33, 24x94, 27x43, 28xxx, 29x66
AN51234 discusses Serial Peripheral Interface (SPI) and how PSoC® 1 handles SPI communications. After reading this document, you should have an understanding of how SPI works and how it is implemented in PSoC 1.
AN2272 PSoC® 1 Sensing - Magnetic Compass with Tilt Compensation CY8C27xxx, CY8C29xxx AN2272 presents a low-cost, digital 3-axis magnetic compass based on the Honeywell HMC1043 Magneto Resistive Sensor. A dual-axis accelerometer is used to provide tilt sensing for heading correction. Several full-featured and simplified design versions are also described.
AN2096 PSoC® 1 - Using the ADCINC ADC CY8C23x33, CY8C24x23A, CY8C24x94xx, CY8C27xxx AN2096 describes the necessary configuration and code required to use the PSoC 1 ADCINC Analog to Digital Converter (ADC). The ADCINC can be configured from 8 to 14 bits, with several different input ranges.
AN76530 PSoC®1 Automotive Ultrasonic Distance Measurement for Park-Assist Systems CY8C24x23A, CY8C24x94, CY8C29x66, CY8C28xxx AN76530 describes how to use PSoC® 1 devices to build a four-channel ultrasonic distance measurement system for ultrasonic parking-assistance applications (UPA). This application note explains how Cypress’s PSoC is the best fit for UPA applications; it includes an example project and reference hardware design.
AN44168 PSoC® 1 Device Programming using External Microcontroller (HSSP) CY8C21x23, CY8C21x34, CY21x45, CY8C22x45, CY8C23x33,
CY8C24x23CY8C24x94, CY8C27x43, CY8C28xxx, CY8C29x66,
CY8CTST1xx, CY8CTMG1xx, CY8CTMA120
Host-sourced serial programming (HSSP) is the practical implementation of programming PSoC® 1 devices in-system using the in-system serial programming (ISSP) protocol. This application note implements the PSoC 1 Programming procedure with a source code in C language and provides a good starting point for developers trying to develop their own PSoC 1 Host programming solution.
AN2141 PSoC® 1 Glitch Free PWM CY8C27xxx, CY8C29xxx PSoC® digital blocks can operate as 8-bit pulse width modulators (PWM). Due to the special design of the PSoC, these modules do not incorporate glitch-free hardware logic but instead logic must be considered in software. AN2141 presents a solution with a first-order predictor adequate to precisely generate any function
AN78920 PSoC® 1 Temperature Measurement Using Diode CY8C28xxx AN78920 explains the diode-based temperature measurement using PSoC®
1 – CY8C28xxx family. The temperature is measured based on the principle of a diode’s forward bias current dependence on temperature.
AN2041 Understanding PSoC® 1 Switched Capacitor Analog Blocks CY8C29x66, CY8C28xxx, CY8C27x43,
CY8C24x23A,CY8C24x94
AN2041 explains the operation of PSoC® 1's versatile switched capacitor analog blocks, and provides practical examples of their use. Switched capacitor (SC) blocks are one of the two key components of PSoC 1's analog functionality, and can be reconfigured to perform many useful functions. This application note also explains the theory and application of these switched capacitor analog blocks.
AN78646 Integrated Power Manager Using PSoC® 1 CY8C28xxx AN78646 describes the key concepts of power management, including voltage sequencing, fault detection, voltage and current monitoring, real-time trimming, and I2C host communication. The associated example project delivers a fully integrated power management system solution.
AN2099 PSoC® 1, PSoC 3, PSoC 4, and PSoC 5LP - Single-Pole Infinite Impulse Response (IIR) Filters All PSoC 1 Families AN2099 describes a topology for a single-pole infinite impulse response (IIR) filter. It includes equations and software toimplement this topology; the associated example projects give the user access to filter routines in either assembly or C. AN2099 describes a topology for a single-pole infinite impulse response (IIR) filter. It includes equations and software to implement this topology; the associated example projects give the user access to filter routines in either assembly or C.
AN2161 PSoC® 1 Analog - Voltage-to-Frequency Converter CY8C24xxx, CY8C27xxx This application note demonstrates how to build a voltage-to-frequency converter using one continuous time PSoC®block and one switched capacitor PSoC block. The converter does not use the CPU during operation.
AN2223 PSoC® 1 - Approximating an Opamp with a Switched Capacitor Integrator CY8C24xxx, CY8C27xxx,
CY8C28xxx, CY8C29xxx
A switched capacitor integrator can approximate the functionality of an opamp. You do this by exploring the opamp’s characteristics and learn how they are similar to an integrator. Next you create an integrator (a faux opamp) using PSoC® 1 switched capacitor blocks. Examples of a voltage follower and a programmable gain amplifier demonstrate the use of a faux opamp in real-world applications.
AN75320 Getting Started with PSoC® 1 All PSoC 1 Families AN75320 introduces you to PSoC®1, an 8-bit processor with programmable digital and analog blocks that enable implementation of custom functions. This application note describes the PSoC 1 architecture and development tools, and shows how to create your first design. This document guides you to more resources to accelerate in-depth learning about PSoC 1.
AN78737 PSoC® 1 - Temperature-Sensing Solution using a TMP05/TMP06 Digital Temperature Sensor CY8C28xxx AN78737 enables designers using the PSoC® 1 -CY8C28xxx family to quickly and easily interface with Analog Devices’ TMP05 or TMP06 digital temperature sensors. It describes the three modes in which the sensors can be interfaced followed by two example projects interfacing the sensors with a CY8C28xxx device through a simple, serial 2-wire digital interface. After reading the application note, a designer should be able to use the project attached to interface any PSoC 1 to TMP05 and TMP06 sensors in all three modes described. This application note assumes that the reader is familiar with PSoC 1, PSoC Designer IDE and programming in C. To get started with PSoC, click here.
AN2226 PSoC® 1 - Using Correlated Double Sampling to Reduce Offset, Drift, and Low Frequency Noise CY8C24/27/28/29xxx AN2226 presents low noise signal processing in PSoC® 1 through the use of Correlated Double Sampling (CDS) to reduce errors due to offset, drift, and low frequency noise. An analog front end for a type K thermocouple is used as a design example. For equivalent implementation in PSoC 3 or PSoC 5, see AN66444. For complete thermocouple system design see in PSoC 3 or PSoC 5, see AN75511. A project for analog front end for type K thermocouple is provided in the associated download.
AN2283 PSoC® 1 Measuring Frequency All PSoC®
1 Families except CY8C20xxx family
Many applications require measuring a frequency. Several methods exist to do this, each having particular
advantages. A brief review of two commonly used methods is discussed and a hybrid method is introduced. A sample project is presented enabling measurement of frequencies with a typical error of 0.0016% (16 ppm).
AN2152 PSoC® 1 Graphics LCD and PSoC® Interface CY8C27443 This application note describes how to control a PCD8544-based graphics LCD in a PSoC®project.
AN2197 Stepper Motor Driver for Smart Gauges CY8C24xxxA, CY8C27xxx,
CY8C28xxx, CY8C29xxx, CY8C24x94
AN2197 shows how to use the PSoC®(Programmable System-on-Chip) to drive a low-power stepper motor for smart pointer gauges. This application note demonstrates how to perform micro stepping in the stepper motor using PSoC 1. In addition, this application demonstrates using a PC-based utility to control the pointer position in the stepper motor.
AN2017 PSoC® 1 Temperature Measurement with Thermistor CY8C28xxx AN2017 shows how to use PSoC®1 to accurately measure temperature with a thermistor. The associated project measures the resistance of a thermistor to calculate its temperature using lookup tables and equations, and is also used with other PSoC 1 devices that have the required resources.
AN2165 PSoC® 1 Implementation of a Direct Sequence Spread Spectrum Baseband Transmitter CY8C27xxx This applications note presents an example design for implementing the baseband functions of a Direct Sequence Spread Spectrum (DSSS) transmitter with the PSoC®1 programmable system-on-chip. A detailed description of the implementation and a brief DSSS primer are also included.
AN55102 PSoC® 1 - Single Cell Li-Ion Battery Charger with CY8C21x23 CY8C21x23, CY8C21x34 AN55102 presents a Lithium-Ion (Li-Ion) battery charger design, with the smallest, low-cost PSoC®1 device – CY8C21x23. This application note includes a dedicated PC-based software developed to perform real time charge process monitoring and analysis.
AN49943 PSoC® 1 USB-to-UART Bridge CY8C24x94 This application note explains how to implement a full-featured USB-to-UART bridge using PSoC1. It also discusses user module configuration, critical firmware, and reasons why a USB-to-UART bridge is needed. A step by step USB-to-UART bridge implementation is given for better understanding.
AN2163 Interfacing to 1-Wire/Two-Wire Digital Temperature Sensors using PSoC® 1 CY8C28xxx AN2163 demonstrates how a PSoC® 1 microcontroller can be interfaced with 1-wire® and Two-Wire (I2C) digital temperature sensors. This application note also illustrates how PSoC® 1 can be used for sensing temperature using a DS18S20 (1-wire digital temperature sensor) and a TMP75 (Two-Wire digital temperature sensor) along with the help of the attached example project.
AN90833 PSoC® 1 Interrupts All PSoC®
1 families
AN90833 introduces you to the PSoC® 1 interrupt architecture and interrupt sources. This document also includes sections on interrupt priority, interrupt latency, and several recommendations on writing efficient and defect-free interrupt routines.
AN2168 PSoC® 1 - Understanding Switched Capacitor Filters CY8C23x33,CY8C24xxx,
CY8C27x43,28xxx,29x66
AN2168 presents the theory behind switched capacitor filters, and provides guidelines and examples for implementing these filters in PSoC 1 devices. Filters discussed include low pass, band pass, high pass, notch, and elliptical. Example projects for each type of filter are provided.
AN50989 PSoC® 1 - USB To SPI Bridge using PSoC 1 CY8C24x94 This application note discusses how to implement a USB to SPI bridge using PSoC1.The discussion includes a brief introduction to the PSoC USB subsystem, the USBFS user module, USB device descriptors and the PSoC SPI user module. It also covers the USB to SPI conversion process with the help of a flow chart. In addition, a GUI based PC application and an SPI master and SPI slave demonstration project are included in this application note. These two projects serve as example systems and allow a complete demonstration of the bridge. The GUI works only on systems with Windows XP.
AN81828 PSoC® 1 – IEC 60730 Class B Safety Software Library CY8C22x45, CY8C21x45 AN81828 describes and includes the IEC 60730 Class B Safety Software Library. After reading this application note, you should be able to understand and easily integrate the IEC 60730 Class B Safety Software Library into your PSoC®1 design.
AN78692 PSoC® 1 - Intelligent Fan Controller CY8C28xxx AN78692 demonstrates how to quickly and easily develop a four-wire brushless DC fan control system using PSoC®1. The Fan Controller User Module, available in PSoC Designer™, helps manage the fans in a variety of configurations. This application note also shows how to combine fan control and temperature sensing to create a complete thermal management solution using PSoC 1. This application note assumes familiarity with PSoC 1, the PSoC Designer integrated development environment (IDE), and C programming.
AN58829 Infrared Thermometer using PSoC® CY8C24x94, CY8C27xxx, CY8C28xxx, CY8C29xxx This application note describes how to build an infrared thermometer using PSoC® 1. This application note also discusses the theory of Infrared thermometers in brief. This design uses no external active components to buffer, amplify, and detect the signal source.
AN50475 Induction Cooker Design with CapSense® CY8C22x45 AN50475 discusses the implementation of an induction cooker with CapSense® control based on CY8C22x45. The working principles of an induction cooker and the CY8C22x45 are also described.
AN47310 PSoC® 1 Power Savings Using Sleep Mode CY8C21x23, CY8C21x34, CY8C21x45, CY8C22xxx, CY8C23x33,
CY8C24x23A, CY8C24x94, CY8C27x43, CY8C28xxx, CY8C29x66
AN47310 introduces PSoC®1 sleep mode operation and power-saving techniques. The topics include sleep mode basics, wakeup sources, power-saving techniques, and special sleep mode considerations. An example project that demonstrates sleep and wakeup operation is also provided.
AN2025 Analog – Sine Wave Generation with PSoC® 1 (Demonstration with CTCSS) CY8C23x33, CY8C24x23A, CY8C24x94
CY8C27x43, CY8C28xxx, CY8C29x66
AN2025 demonstrates how to generate a sine wave using two methods, lookup table and filtering, with PSoC® 1. The document also shows how to implement a Continuous Tone Coded Squelch System (CTCSS) carrier generator in PSoC 1. There are three projects associated with this document. The first two show how to generate a sine wave using the lookup table and filtering methods, and the third project demonstrates CTCSS implementation.
AN2095 PSoC® 1 - Algorithm - Logarithmic Signal Companding - Not just a good idea - it is µ-Law CY8C27x43, CY28x43, CY28x45, CY28x52, CY8C29x66 A tutorial on logarithmic signal compression is presented. Routines are developed and an application is shown to implement a µ-Law compressor that converts an analog voice band signal and produces a digitized 8-bit compressed value. An expanding DAC is also developed that restores the compressed digital value back to an analog value.
AN2108 PSoC® 1 - Implementing Hysteresis Comparator CY8C24x23, CY8C24x94,
CY8C27x43, CY8C29x66, CY8C28xxx
AN2108 explains multiple implementations of a hysteresis comparator using PSoC® 1. Hysteresis is necessary to produce a glitch free comparator output when there is noise in the inputs signals.
AN2361 USB-Powered Battery Charger for Nicd/Nimh Batteries - USB-Powered Battery Charger for Nicd/Nimh Batteries CY8C24x94 This application note describes a USB-powered battery charger for NiCd/NiMH batteries that permits rapid recharging. Dedicated PC-based software has been developed to monitor and control the charging process in real time, and display data in a graphical user interface. The charger can be embedded into consumer, office, and industrial applications. It needs no drivers and starts working immediately when plugged into a USB port. A battery can be left in the charger for any length of time without the risk of overcharge.
AN16833 Signal Mixing with PSoC® Switched Capacitor Blocks CY8C27x43, CY8C29x66 Routing analog signals inside a PSoC® device can be tricky because the desired connections are often not directly available. This application note describes some useful methods to allow configurations that seem impossible, such as the developed example of an eight channel (four channel stereo) audio mixer with adjustment potentiometers.
AN64475 PSoC®1 - Optimizing Cascaded Switched Capacitor Filters N/A AN64475 demonstrates how PSoC® 1 switched capacitor band pass filters (BPF2, BPF4) and elliptical low pass filters (ELPF2 and ELPF4) can be combined to provide excellent near out-of-band rejection for communications applications. The included project demonstrates a filter system tuned to the requirements of a 60 kHz Binary phase shift keyed (BPSK) modem receiver. The design technique can be extended to other requirements using the filter design wizards in the user modules in PSoC Designer.
AN50987 Getting Started with I2C in PSoC® 1 CY8C21x23, 21x34, 21x45,
22x45, 23x33, 24x23A, 24x33, 24x94, 27x43, 28xxx,
29x66
AN50987 gives an overview of the I2C standard and explains how a PSoC®1 device handles I2C communications. After reading this application note, you should have an understanding of how I2C works, how to implement it in PSoC 1, and how to choose the correct user module for a design. Example projects demonstrate how to configure PSoC 1 as an I2C master/slave to communicate with other I2C devices on the bus.
AN2336 PSoC® 1 - Simplified FSK Detection CY8C27xxx, CY8C28xxx,
CY8C29xxx
AN2336 presents the standard correlator method for frequency shift keying (FSK) demodulation using an efficient almost all-hardware implementation in PSoC® 1. This signal processing technique is readily applicable to caller ID and several modem standards. The associated project makes extensive use of switched-capacitor block features unique to PSoC 1 and that is not available in PSoC 3 and PSoC 5. For PSoC 3 and PSoC 5, see AN60594 - PSoC® 3 and PSoC 5 - 1200 Baud FSK Modem.
AN2015 PSoC® 1 - Getting Started with Flash & E2PROM CY8C20x34, CY8C20xx6, CY8C21xxx, CY8C22x45, CY8C23x33,
CY8C24x23A, CY8C24x94, CY8C27x43,CY8C28xxx, CY8C29x66
AN2015 enables the reader to get started with the flash memory in PSoC®1 by focusing on PSoC 1 flash architecture Read, Write algorithm, Protection modes and their impact on user applications. The example projects demonstrates the two methods for reading and writing to the flash memory within a user application, E2PROM User Module and Flash block API library that is included in the PSoC Designer™ integrated development environment (IDE).
AN56384 PSoC® 1 Segment LCD Direct Drive CY8C22x45 AN56384 explains implementation of software based multiplexed segment LCD driver in PSoC®1 device. PSoC 1 with its MCU and mixed signal resources offers segment LCD drive as one of the value added feature apart from implementing other major functions.
AN2376 PSoC® 1 – Interface to Four-Wire Resistive Touchscreen CY8C24x94 AN2376 shows how PSoC 1 can be used to control a resistive touchscreen, and read (x,y) positions of single touches as well as touch pressure. It describes the essential mathematics in detail, and includes a method for calibrating a touchscreen to a display. A project is included that passes touchscreen readings to a PC through a USB HID interface.
AN2282 Analog - Resonant Bridge Oscillators for Piezoelectric Buzzers CY8C24xxxA, CY8C24794, CY8C27xxx, CY8C29xxx This Application Note shows an example of a piezoelectric resonator with an excitation throughout its frequency range using the PSoC®1 device. This technique allows the user to obtain the maximum output power for a given supply voltage. The oscillators have no CPU overhead during operation.
AN2341 ArcTangent in PSoC® 1 Assembler All PSoC®
1 families
Many control applications require calculating an angular position when the Cartesian position data is given. The arctangent function makes this possible. A major setback to this is that the trigonometric functions supplied with the ‘C’ math library uses and returns float variables. Although very accurate, the processing overhead resulting from using the floating-point math routines can be prohibitive. Techniques are discussed to calculate an arctangent to a specific resolution. Software is presented using these techniques for an arctangent function that returns the calculated angle in 100ths of a degree resolution using signed 8-bit X and Y values.

Code Examples integrated with Development Kits

The following Code Examples are integrated with CY3236A-PIRMOTION - Pyroelectric Infrared (PIR) Motion Detection Evaluation Kit (EVK)

Title
Part #
Description
PIR Motion Detection CY8C27x43 This Code Example demonstrates PSoC device's ability to control a PIR sensor to implement motion sensing applications.

The following Code Examples are integrated with CY3280-22x45 Universal CapSense Controller Board

Title
Part #
Description
CSD2x Example Project CY8C22x45 This code example describes the steps to create a PSoC Designer project using CY8C22x45 device.

The following Code Examples are integrated with CY3210-PSoCEval1

Title
Part #
Description
My First Code Example CY8C29xxx This project demonstrates a 12-bit incremental ADC by measuring the voltage of the potentiometer, transmitting the conversion result on the UART, and displaying it on the LCD.
ASM_Example_ADC_UART_LCD CY8C29xxx This project demonstrates a 12-bit incremental ADC by measuring the voltage of the potentiometer, transmitting the conversion result on the UART, and displaying it on the LCD.
ASM_Example_Blink_LED CY8C29xxx This project demonstrates how an LED blinks at a constant duty cycle using a hardware PWM.
ASM_Example_DAC_ADC CY8C29xxx This project generates a sine wave using a 6-bit DAC. The sine wave period is based on the current ADC value of the potentiometer.
ASM_Example_Dynamic_PWM_PRS CY8C29xxx This project demonstrates the Dynamic Reconfiguration capability of PSoC Designer.
ASM_Example_LED_Logic CY8C29xxx This project demonstrates a PSoC project designed to blink an LED using the output of two PWMs. The outputs are combined using an AND gate in an output bus logic block. This logical combination results in a beat frequency of 1.4 Hz.

The following Code Examples are integrated with CY3214-PSoCEvalUSB PSoC CapSensePLUS with USB Evaluation Kit

Title
Part #
Description
My First Code Example CY8C24x94 This example demonstrates how to operate the CapSense buttons and sliders. When you configure
CapSense buttons and sliders in the CSD wizard, the corresponding LEDs check the functionality of CapSense buttons provided on the board.
Buttons and Lights Example CY8C24x94 This code example demonstrates the USB function using the CY3214-PSoCEVALUSB Kit. In this project, the Buttons and Lights PC Host GUI is used to control the LEDs on board. The GUI also has four soft buttons and four LEDs. When there is a button press event on the board, the board sends out the buttons report to the GUI. The GUI updates the local LEDs and sends out a Lights report back to the board. The LEDs on the board are updated based on this Lights report. The GUI also provides the LED output as a logical function of soft buttons and buttons on board. The LED output is a function of 'AND' or 'OR' of soft buttons and real buttons.
Temperature Sensing Keyboard CY8C24x94 This project example operates similar to a keyboard, although it does not look like a standard keyboard. The example is a temperature sensor using potentiometer (VR1 and VR2) as surrogates for real temperature sensors. When plugged in using USB, the project enumerates as a keyboard and starts printing out temperature values.
Process Monitoring CY8C24x94 The process monitoring system code demonstrates how to collect the analog data at a rate determined by the host. The host then displays the data in a graph and is able to save and reload the data sets.
Async_PingExample CY8C24x94 The project demonstrates asynchronous data transfer by sending a series of large USB write (OUT) and read (IN) requests by using USB functionality, which is available with CY8C24894 device.
Bulk_PingExample CY8C24x94 This project demonstrates bulk data transfer by sending a series of end point-sized USB write(out) and read(in) requests.
ISoc_Example CY8C24x94 This example demonstrates how to use an ‘alternate’ interface that performs IN transactions with isochronous communication.The application reads isochronous data from the PSoC device and measures throughput.
USBUART CY8C24x94 The USBUART device uses a USB interface to emulate a COM port.
Joystick CY8C24x94 This project is used to control the mouse cursor movement using the joystick onboard. The joystick movements are digitized using an ADC and the change in ADC values are used to decipher the direction of movement.The USBFS module is used to enumerate as a mouse device and the mouse is controlled based on the ADC value and direction of movement.

The following Code Examples are integrated with CY3270 PSoC FirstTouch Starter Kit

Title
Part #
Description
My First Code Example CY8C21x34 This code example demonstrates the CapSense feature of the FTMF board. The color of the LED changes with respect to the position of finger on the board.
MultiFunction Expansion Card Light Sensor CY8C21x34 The purpose of this code example is to demonstrate a light sensor. In this code example, the light sensor is used to control the brightness of the LED array.
MultiFunction Expansion Card Proximity Sensor CY8C21x34 This code example demonstrates the capacitive sensing and proximity detection capability of Cypress's PSoC technology. Proximity detection requires that you use the supplied blue proximity antenna.
Multifunction Expansion Card Temperature Sensor CY8C21x34 This code example demonstrates the temperature sensing, thermistor reading, and calibrating capabilities of the PSoC device. Depending upon the temperature range within which a particular temperature reading is recorded, different colored LEDs (red, green, and blue) are turned ON or
OFF.

Web Code Examples

Title
Part#
Kits
Description
Delay Functions N/A N/A This project provides the readymade APIs for generating software delay and are accessible from both assembly and C files.
Interfacing an I2C based temperature sensor, LM75 to PSoC 1 CY8C29466-24PXI CY3210 This example uses the I2CHW Master user-module to retrieve ambient temperature from the LM75 sensor at regular intervals of time and display it on the LCD after required rocessing.
Interfacing PSoC1 to an SPI EEPROM CY8C29466-24PXI CY3210 This example demonstrates the usage of SPIM user module (SPI Master) to communicate with an external SPI EEPROM.
Measuring Relative Humidity / Pressure using PSoC1 CY8C29466-24PXI CY3210 This project demonstrates how to interface external humidity and pressure sensor with PSoC1 and display it on the LCD after required processing.
Generation of non-overlapping clocks (PWMs with Dead Band) CY8C29466-24PVXI CY3210 This project demonstrates the implementation of PWMDB for generation of non-overlapping clocks using CY8C29466 device.
Interfacing an I2C EEPROM using I2CHW User Module CY8C29466-24PXI CY3210 This example demonstrates the usage of I2CHW user module configured as master to communicate with an external I2C EEPROM (24C256) which is an I2C slave.
Using CapSense® Buttons for LED Control on the CY3267 PowerPSoC® Evaluation Kit CY8CLED04D01 CY3267 This project aim to configure the CapSense buttons to control the LEDs.
I2C communication is used between the two devices to communicate the
status of the CapSense buttons.
Signal Rectifier + Low Pass Filter Using PSoC® 1 CY8C29466-24PVXI CY3210 This project implements an all hardware full wave rectifier with a low pass
filter to generate an avereage DC signal. It does not use any external hardware for the implementation of this design.