CY3210-PSoCEVAL1 User Guide Datasheet by Cypress Semiconductor Corp

View All Related Products | Download PDF Datasheet
EEEEEEEEEEEEEEEEEEEE
CY3210-PSoCEVAL1
PSoC® 1 Evaluation Kit Guide
Doc. #: 001-66768 Rev. *F
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709
www.cypress.com
@CYPRESS'
Copyrights
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 2
© Cypress Semiconductor Corporation, 2011-2017. 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, WICED, 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 respec-
tive owners.
@CYPRESS'
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 3
Contents
1. Introduction 5
1.1 Kit Contents .................................................................................................................5
1.2 Additional Learning Resources....................................................................................6
1.2.1 PSoC Designer ................................................................................................7
1.2.2 Code Examples................................................................................................8
1.2.3 PSoC Designer Help ......................................................................................10
1.2.4 Technical Support...........................................................................................10
1.3 Documentation Conventions......................................................................................12
2. Getting Started 13
2.1 Kit Installation ............................................................................................................13
2.2 PSoC Designer ..........................................................................................................17
2.3 PSoC Programmer ....................................................................................................18
3. Kit Operation 19
3.1 Evaluating the PSoC 1 Device...................................................................................19
3.1.1 Programming Specifications and Connections ..............................................20
4. Hardware 23
4.1 CY3210-PSoCEVAL1 System Block Diagram...........................................................23
4.2 Functional Description ...............................................................................................24
4.2.1 Power Supply System ....................................................................................24
4.2.2 Programming Interface...................................................................................27
4.2.3 PSoC 1 Parts .................................................................................................27
4.2.4 RS-232 Interface ............................................................................................28
4.2.5 Prototyping Area.............................................................................................29
4.2.6 Character LCD Interface ................................................................................30
5. Code Examples 31
5.1 My First Code Example .............................................................................................31
5.1.1 Project Description .........................................................................................31
5.1.2 Creating My First PSoC 1 Project ..................................................................31
5.1.3 Verifying Output using LCD............................................................................46
5.1.4 Verifying Output using UART .........................................................................47
5.2 Code Example 2: ASM_Example_ADC_UART_LCD ................................................50
5.2.1 Project Description .........................................................................................50
5.2.2 Creating the Project .......................................................................................50
5.2.3 Hardware Connections...................................................................................51
5.2.4 Code Example 2 Flowchart ............................................................................52
5.2.5 Verifying Output using LCD............................................................................53
5.2.6 Verifying Output using UART .........................................................................53
5.3 Code Example 3: ASM_Example_Blink_LED............................................................55
EMPRESS
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 4
Contents
5.3.1 Project Description .........................................................................................55
5.3.2 Hardware Connections...................................................................................56
5.3.3 Code Example 3 Flowchart ...........................................................................56
5.3.4 Verifying Output..............................................................................................57
5.4 Code Example 4: ASM_Example_DAC_ADC ...........................................................57
5.4.1 Project Description .........................................................................................57
5.4.2 Hardware Connections...................................................................................59
5.4.3 Code Example 4 Flowchart ............................................................................59
5.4.4 Verifying Output..............................................................................................60
5.5 Code Example 5: ASM_Example_Dynamic_PWM_PRS ..........................................61
5.5.1 Project Description .........................................................................................61
5.5.2 Hardware Connections...................................................................................63
5.5.3 Code Example 5 Flowchart ............................................................................64
5.5.4 Verifying Output..............................................................................................65
5.6 Code Example 6: ASM_Example_LED_Logic ...........................................................66
5.6.1 Project Description .........................................................................................66
5.6.2 Hardware Connections...................................................................................67
5.6.3 Code Example 6 Flowchart ............................................................................67
5.6.4 Verifying Output..............................................................................................67
A. Appendix 69
A.1 Schematic ..................................................................................................................69
A.1.1 CY3210-PSoCEVAL1 Board Schematic ........................................................69
A.2 Board Layout .............................................................................................................70
A.3 Bill of Materials ..........................................................................................................73
A.4 Replace CY8C29466-24PXI with CY8C27443-24PXI ...............................................74
Revision History 76
Document Revision History ..............................................................................................................76
@CYPRESS'
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 4
1. Introduction
Thank you for your interest in PSoC® 1. This user guide will help you get started with the CY3210-
PSoCEVAL1 PSoC 1 Evaluation Kit; provide hardware description, instructions on software installa-
tion, and kit operation; and walk you through the code examples.
The code examples implement commonly used peripherals such as analog-to-digital converter
(ADC), digital-to-analog converter (DAC), universal asynchronous receiver/transmitter (UART),
pulse-width modulator (PWM), pseudo random sequencer (PRS), and LCD. They are functional in
PSoC Designer™, which is PSoC 1’s GUI-based Integrated Design Environment (IDE). Peripherals
in PSoC Designer are implemented as preprogrammed precharacterized ‘User Modules’. Evaluate
the library of over 100 user modules in PSoC Designer and experience simpler and faster designs.
The evaluation board features a pluggable character LCD module with contrast control, status LEDs,
a potentiometer, push button switches, a UART, an RS-232 interface, an ISSP programming header,
and prototyping area. The MiniProg unit, included in this kit is required to program PSoC 1 devices
directly on the evaluation board. Kit schematics, layout, and bill-of-materials (BOM) are provided in
the “Appendix” on page 69.
1.1 Kit Contents
The CY3210-PSoCEVAL1 Evaluation Kit contains:
PSoCEVAL1 evaluation board
MiniProg programmer
CY8C29466-24PXI 28-pin DIP sample
CY8C27443-24PXI 28-pin DIP sample
CY3210-PSoCEVAL1 kit DVD
PSoC Designer installation file
PSoC Programmer installation file
Bridge Control Panel installation file (packaged along with PSoC Programmer)
Code examples
Hardware files
Kit guide
Quick start guide
Release notes
USB cable
LCD module
Single strand jumper wire pack
Inspect the contents of the kit; if any parts are missing, contact your nearest Cypress sales office for
help.
@cYPREss
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 5
Introduction
1.2 Additional Learning Resources
Cypress provides a wealth of data at www.cypress.com to help you to select the right PSoC device
for your design, and to help you to quickly and effectively integrate the device into your design. For a
comprehensive list of resources, see the knowledge base article “How to Design with PSoC® 1,
PowerPSoC®, and PLC – KBA88292”. Following is an abbreviated list for PSoC 1:
Overview: PSoC Portfolio, PSoC Roadmap
Product Selectors: PSoC 1, PSoC 3, PSoC 4, PSoC 5LP.
In addition, PSoC Designer includes a device selection tool.
Application notes: Cypress offers a large number of PSoC application notes covering a broad
range of topics, from basic to advanced level. Recommended application notes for getting started
with PSoC 1 are:
Getting Started with PSoC® 1 – AN75320.
PSoC® 1 - Getting Started with GPIO – AN2094.
PSoC® 1 Analog Structure and Configuration – AN74170.
PSoC® 1 Switched Capacitor Analog Blocks – AN2041.
Selecting Analog Ground and Reference – AN2219.
Note: For CY8C29X66 devices related Application note please click here.
Development Kits:
CY3210-PSoCEval1 supports all PSoC 1 Mixed-Signal Array families, including automotive,
except CY8C25/26xxx devices. The kit includes an LCD module, potentiometer, LEDs, and
breadboarding space.
CY3214-PSoCEvalUSB features a development board for the CY8C24x94 PSoC device.
Special features of the board include USB and CapSense development and debugging
support.
Note: For CY8C29X66 devices related Development Kits please click here.
The MiniProg1 and MiniProg3 devices provide interfaces for flash programming and debug.
CYPRESS mmsn m runnlnuw uwmh—mwwwm anx‘m-uxw 5545.5“.qu mlul. my, .. ”n, mm mm ., I, “up.” w. W m w w) 3”." 1...»; -!C\um\u——u l—m‘mm .mwzsz»~aa. warm“ 9 bum". “ a.“ man.“ u. m.”
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 6
Introduction
1.2.1 PSoC Designer
PSoC Designer is a free Windows-based Integrated Design Environment (IDE). Develop your
applications using a library of pre-characterized analog and digital peripherals in a drag-and-drop
design environment. Then, customize your design leveraging the dynamically generated API
libraries of code. Figure 1-1 shows PSoC Designer windows. Note: This is not the default view.
1. Global Resources – all device hardware settings.
2. Parameters – the parameters of the currently selected User Modules.
3. Pinout – information related to device pins.
4. Chip-Level Editor – a diagram of the resources available on the selected chip.
5. Datasheet – the datasheet for the currently selected UM
6. User Modules – all available User Modules for the selected device.
7. Device Resource Meter – device resource usage for the current project configuration.
8. Workspace – a tree level diagram of files associated with the project.
9. Output – output from project build and debug operations.
Note: For detailed information on PSoC Designer, go to PSoC® Designer > Help > Documentation >
Designer Specific Documents > IDE User Guide.
Figure 1-1. PSoC Designer Layout
CYPRESS‘ minus»; m mnmw g)” Yi’HLSS Hm;gl.‘l32m_2| m 0133121 x34_sLM wazemmjw M21" HSSP_L‘(‘&:m M227; FIA p,“ . m u IZ£52125 Push-Pol WM 5...: E25429? -uxl\umlnaem~\u tisdsssrumv Uta modal £23225 -M>cmc um Mum ctsaus -usauAm Uau Max £2me Pflsjwn Emu: guys Ulav Mod-h E) V <> um bngm J cm mum (XXIX-(Ii
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 7
Introduction
1.2.2 Code Examples
The following webpage lists the PSoC Designer based Code Examples. These Code Examples can
speed up your design process by starting you off with a complete design, instead of a blank page
and also show how PSoC Designer User modules can be used for various applications.
http://www.cypress.com/go/PSoC1Code Examples.
To access the Code Examples integrated with PSoC Designer, follow the path Start Page > Design
Catalog > Launch Example Browser as shown in Figure 1-2.
Figure 1-2. Code Examples in PSoC Designer
CYPRESS EKIEIWED m mun-w inn-m nun-mamuwu-ww uw-wwwtum usmmuu—mv—M Em-mmm—lml-I‘nm sand—numn-wmmo-‘mnnu umAIJimE—In—v Kw-mwml—fiM mun-M -Ixsb~l—.un(iEU—m Entusnumn-wE—fim moan In... um-mhmr—w mam li-ubh—n uwa—ocu—mzu—n-a unau-wn-t—um um Mu—I‘ht—uI—u m-mu-mzu‘h—l fiw‘nmhl‘n-Mwu: um4~osmmu| m-mI—fiuh—s—u-mnul um-mtfiuua-‘u—m-m‘ lmchn- an.» Inn-um: mm", - u nun ”mm um... .- .m. u not an ammo-o m .u m n m. um—mmumm I/Ihvluuw- u m t—zun nu ma - um.) ( u m—m pix-u: n- mm: 1/ qu-uu Inn-"ul— Mm um_ancmul mm on uxul'lfll Ix mum. ; 1mm. u “mm:- umJnmn-m mug-gm: mu .—m - an :— ml n. um angina-Allin Autumn. «m... u- m... n In" tum—l Inh- umJuzch-zuzn
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 8
Introduction
In the Example Projects Browser shown in Figure 1-3, you have the following options.
Keyword search to filter the projects.
Listing the projects based on Category.
Review the datasheet for the selection (on the Description tab).
Review the code example for the selection. You can copy and paste code from this window to
your project, which can help speed up code development, or
Create a new project (and a new workspace if needed) based on the selection. This can speed
up your design process by starting you off with a complete, basic design. You can then adapt that
design to your application.
Figure 1-3. Code Example Projects, with Sample Codes
@cYPREss
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 9
Introduction
1.2.3 PSoC Designer Help
Visit the PSoC Designer home page to download the latest version of PSoC Designer. Then, launch
PSoC Designer and navigate to the following items:
IDE User Guide: Choose Help > Documentation > Designer Specific Documents >
IDE User Guide.pdf. This guide gives you the basics for developing PSoC Creator projects.
Simple User module Code Examples: Choose Start Page > Design Catalog >
Launch Example Browser. These code examples demonstrate how to configure and use PSoC
Designer User modules.
Technical Reference Manual: Choose Help > Documentation >
Technical Reference Manuals. This guide lists and describes the system functions of PSoC
devices.
User module datasheets: Right-click a User module and select “Datasheet.” This datasheet
explains the parameters and APIs of the selected user module.
Device Datasheet: Choose Help > Documentation > Device Datasheets to pick the datasheet
of a particular PSoC device.
Imagecraft Compiler Guide: Choose Help > Documentation >
Compiler and Programming Documents > C Language Compiler User Guide.pdf. This guide
provides the details about the Imagecraft compiler specific directives and Functions.
1.2.4 Technical Support
If you have any questions, our technical support team is happy to assist you. You can create a
support request on the Cypress Technical Support page.
If you are in the United States, you can talk to our technical support team by calling our toll-free
number: +1-800-541-4736. Select option 8 at the prompt.
You can also use the following support resources if you need quick assistance.
Self-help.
Local Sales Office Locations.
@cYPREss
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 10
Introduction
Visit http://www.cypress.com for additional learning resources in the form of datasheets, technical
reference manual, and application notes. For the latest information about this kit, visit
http://www.cypress.com/go/CY3210-PSoCEval1.
PSoC Designer: PSoC Designer Overview
http://www.cypress.com/go/psocdesigner
PSoC Designer Training: PSoC Designer On-Demand Training Series and Videos
http://www.cypress.com/psoctraining
PSoC Programmer, COM Hardware Layer Supported Languages
http://www.cypress.com/go/psocprogrammer
PSoC Programmable System-on-Chip™ Datasheets
http://www.cypress.com/?mpn=CY8C29466-24PXI
http://www.cypress.com/?mpn=CY8C27443-24PXI
AN75320 - Getting Started with PSoC 1
This application note describes the capabilities of PSoC 1 devices and the PSoC Designer devel-
opment environment used to configure and program these devices. An introductory project is
included to help you develop PSoC 1 applications.
AN73212 - Debugging with PSoC 1
This application note introduces the elements of the PSoC 1 debugger system and explains how
to configure and use them effectively.
AN2010 - PSoC 1 Best Practices and Recommendation
This application note provides introductory guidelines and best practices for developing PSoC 1
systems; it exposes some common mistakes designers make.
AN74170 - PSoC 1 Analog Structure and Configuration with PSoC Designer
This application note explains the analog structure of standard PSoC 1 devices and how the
global analog parameters affect many of the analog user modules.
AN2027 - Using the PSoC Microcontroller External Crystal Oscillator
The external crystal oscillator in the PSoC microcontroller has specific requirements for correct
operation in different configurations. This application note details these requirements.
AN2014_Introduction to PSoC 1 Programming
This application note discusses how to design an application to enable ISSP with PSoC Designer
using either the device reset or power cycle programming mode.
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 11
Introduction
1.3 Documentation Conventions
Table 1-1. Document Conventions for Guides
Convention Usage
Courier New Displays file locations, user entered text, and source code:
C:\ ...cd\icc\
Italics Displays file names and reference documentation:
Read about the sourcefile.hex file in the PSoC Designer User Guide.
[Bracketed, Bold]Displays keyboard commands in procedures:
[Enter] or [Ctrl] [C]
File > Open Represents menu paths: File > Open > New Project
Bold Displays commands, menu paths, and icon names in procedures:
Click the File icon and then click Open.
Times New Roman Displays an equation: 2 + 2 = 4
Text in gray boxes Describes cautions or unique functionality of the product.
CYPRESS“ EMEEDDEI‘I m wuonnnw‘ CY32’I 0-PSOCEVAL’I *— mm: m: (vazxn'ESncEvmx w Au Manama;
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 13
2. Getting Started
This chapter describes how to install and configure the CY3210-PSoCEVAL1 kit.
2.1 Kit Installation
To install the kit software, follow these steps:
1. Insert the kit DVD into the DVD drive of your PC. The DVD is designed to auto-run and the kit
installer startup screen appears.
Note You can also download the latest kit installer from http://www.cypress.com/go/CY3210-
PSoCEval1. Three different types of installers are available for download.
a. CY3210-PSoCEval1_ISO: This file (ISO image) is an archive file of the optical disc provided
with the kit. You can use this to create an installer DVD or extract information using WinRar or
similar tools.
b. CY3210-PSoCEval1_ Single Package: This executable file installs the contents of the kit
DVD, which includes PSoC Programmer, PSoC Designer, kit code examples, kit hardware
files, and user documents.
c. CY3210-PSoCEval1_Single Package (without prerequisites): This executable file installs only
the kit contents, which includes kit code examples, hardware files, and user documents.
2. Click Install the CY3210-PSoCEVAL1 to start the kit installation, as shown in Figure 2-1.
Figure 2-1. Kit Installer Startup Screen
CYPRESS‘ mmsn m runnlnvw' 5k gm y“ mm [m new map a ‘ pm um IV “M‘s“ fi mm.” H WWW a m. i m. g mm. a may. a WWW, Wm m.“ m wk 5; WWMW r: ya; 514mm m Sb (VilflHKquVAH Ins'allihleld Wizard Welco-e Io III: ImIallShiald Wizad 101 I332] fl-PSdIVAU The Instalfihield Wizard wil has: W321 D—PSaEEVAU m yuu compulu Tn emim, cllck Nu Select lnldu whats Sena wil mlal files i |mld|DI3210~PSoCEVAL1 m. E:\ngam FAIesVZyplass
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 14
Getting Started
Note If auto-run does not execute, double-click cyautorun.exe file on the root directory of the
DVD, as shown in Figure 2-2. To access the root directory, click Start > My Computer > CY3210-
PSoCEVAL1 <drive:>.
Figure 2-2. Root Directory of DVD
3. On the startup screen, click Next to start the installer.
4. The InstallShield Wizard screen appears. On this screen, choose the folder location to install
the setup files. You can change the folder location for setup files using Change, as shown in
Figure 2-3.
5. Click Next to launch the kit installer.
Figure 2-3. InstallShield Wizard
6. On the Product Installation Overview screen, select the installation type that best suits your
requirement. The drop-down menu has three options: Typical, Complete, and Custom, as
shown in Figure 2-4. If you are uncertain, proceed with the default setting (Typical).
7. Click Next to start the installation.
CYPRESS‘ Ewinnsnmrwumuw Cylnslallev m LVJIIU PSnuvAu Lu onducl Imuumnn mum-w Emma m: mmu lype mat befl smlx ymv reeds Ehmse may” ar msld‘ahm Fvnducl mzm PSDCEVAU IND-Hanan 1w: Twea‘ v; Imus me man mum reams at MZWFSnEEVALI 1m Vuhwm woman "and to la: mum mama‘» Adah: Reade! (ylnsldllev m CVJZIUVPSnCEVAU 1.0 Infldlalion Page Phase wan wMe setup mask/Carlyn: INSZVEIPSHZEVAU an yaurcawulev 5“th A‘ vpsacpwmasew .rpsucpmgmmua u n ma g maukngmmm an “25 USEBam‘asflev H26 Eudgefionlm‘Panafi ¢ El H25 Examp‘stnde “25 DamaDalabaxe H28 PSDCDEX‘EMYSENP PSaCDesmneLEnveS 2 2551 El PSuCDemgneLEnmemfi 2 m n F Baum ac522551 u v‘ < x=""> Get the inside scoop on Cypress products‘ Cthrann- ummev-m www.(yp~ss.(om/galb|ogs Cr
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 15
Getting Started
Figure 2-4. Installation Type Options
8. When the installation begins, a list of all packages appear on the Installation Page. A green
check mark appears against every package that is downloaded and installed, as shown in
Figure 2-5.
9. Wait until all the packages are downloaded and installed successfully.
Figure 2-5. Installation Page
CYPRESS Ewinnsnmrwumuw ‘ Cylnslaller In: CV321DVPSnCEVAL1 Ln w- fl fl 6,. M 4» ‘5; v )9 "7 ¢
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 16
Getting Started
10.Click Finish to complete the installation.
Figure 2-6. Installation Complete
After software installation, drivers are installed when MiniProg1 is connected to the PC for the first
time. Verify driver installation by opening PSoC Programmer with the MiniProg connected to the
USB port of the PC. The connected device will be listed under the Port Selection window in PSoC
Programmer.
Note Advanced users can skip to “Code Examples” on page 31.
CYPRESS‘ Enninnsn m mmuw Global Resources Menus Toobal Dame Resource Meter Use! Mums Dmsham Workspace Explore! mm. vQ mammals.“ summmmnw mmcmmm m - w v" wm.“ ‘xz~x\W—W:T;R...Wm., MM mun v.1 1 I I l “mum: mm Sumner mm“! um... m... M if”? , a, - AA .1 : ~ ‘JVmumNr-dmvt u a mu“. m m: I my ' 11mm ,9» ‘ mummum 3:22,: am ‘ ' ' rw-im in». u." pnwmmummm ea H i 3 mm mm. m M mm ~ L'm‘ raw;- : usumsusevmm p F HhAKs :W. W.” 22:22:”: .1 m semen“ m2 overview E I :v-‘w : m 1321:: u . w. . .W a .mm W “mm W. W “Wm M. M Plnnur Illa chlp Ednor Vllw Unr Moduln catalog
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 17
Getting Started
2.2 PSoC Designer
PSoC Designer is the integrated design environment (IDE) that you can use to customize your PSoC
application. The latest version of PSoC Designer has several new features, bug fixes, and support
for new PSoC devices.
This section gives a brief introduction on the PSoC Designer Interconnect View. Additional details on
the PSoC Designer software is given in the Code Examples chapter on page 31.
1. Click Start > All Programs > Cypress > PSoC Designer <version> > PSoC Designer <ver-
sion>.
Figure 2-7. PSoC Designer Interconnect View
Note The Datasheet and Resource Meter windows are hidden by default. To include them in
the view, click on View and select the required windows.
Note For more details on PSoC Designer, see the PSoC Designer IDE Guide at the following loca-
tion: <Install_directory>:\PSoC Designer\<version>\Documentation. You can also
access this document via the Help menu (Help > Documentation).
See Additional Learning Resources on page 5 for links to PSoC Designer training. The PSoC
Designer quick start guide is available at: http://www.cypress.com/?rID=47954
CYPRESS‘ EHBEnnEn m runnunw Ffle Loud may." teams Power Wm ., M “5“ mm; saw 31v 15v mv W“ O" m... M mmwn
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 18
2.3 PSoC Programmer
This section gives a brief introduction on programming PSoC; for kit specific programming instruc-
tion, see Programming Specifications and Connections on page 20.
1. Click Start > All Programs > Cypress > PSoC Programmer <version> > PSoC Programmer
<version>.
2. Select the MiniProg from Port Selection.
Figure 2-8. PSoC Programmer Window
3. Click the File Load button to load the hex file.
4. Use the Program button to program the hex file on to the chip.
5. When programming is successful, the “Programming Succeeded” message appears in the Action
pane.
6. Close PSoC Programmer.
Note For more details on PSoC Programmer, see the user guide at the following location:
<Install_directory>\Cypress\Programmer\<version>\Documents
2.
@CYPRESS'
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 19
3. Kit Operation
The CY3210-PSoCEVAL1 kit helps in evaluating applications using the PSoC 1 family of devices.
This kit can be used to work with the different user modules provided in the PSoC Designer software
and explore hardware features that are integrated into the PSoC 1 device.
3.1 Evaluating the PSoC 1 Device
The CY3210-PSoCEVAL1 board is populated with a preprogrammed CY8C29466-24PXI part. To
evaluate the default project programmed on the board, make the following hardware connections:
Connect the jumper (shunt) at JP1 and JP2.
Connect the potentiometer (VR on connector J5) and port P0[1] on connector J6 using one of the
single-strand jumper wires (see Figure 3-1). This connects one of the PSoC pins to the potenti-
ometer.
After the connections are made, plug in the MiniProg to the ISSP header. Connect the MiniProg to
the PC using the USB cable provided. Power the kit using PSoC Programmer. For more information
on using PSoC Programmer, see Programming Specifications and Connections on page 20. The
CY3210-PSoCEVAL1 can be powered from a DC supply jack, battery terminals, or using the
MiniProg. The PWR LED5 lights up (red) when the board is powered.
You can vary the analog input by varying the potentiometer (R7). The output is displayed on the LCD
module. LCD contrast control potentiometer (R6) can be used to vary the LCD contrast.
The PSoC MiniProg gives you the ability to program PSoC parts quickly and easily. It is small and
compact, and connects to your PC using the USB cable. During prototyping, the MiniProg can be
used as in-system serial programming (ISSP) to program PSoC devices, as shown in Figure 3-2.
MiniProg1 does not support I2C communication. The CY3240-I2USB and MiniProg3 can be used as
a USB-I2C Bridge for debugging I2C serial connections and communicating to PSoC devices.
CYPRESS" («Dwain m Yuuunnuw A '.
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 20
Kit Operation
Figure 3-1. PSoCEVAL1 Evaluation Board
3.1.1 Programming Specifications and Connections
When the MiniProg is connected, you can use PSoC Programmer to program the CY3210-
PSoCEVAL1 Evaluation kit. Plug in the USB cable into the MiniProg before attaching it to the ISSP
header on the board. When using a USB cable with MiniProg, keep the length under six feet to avoid
signal integrity issues.
When using MiniProg, the LEDs blink at a variable rate to track connection status. The green LED
near the USB connector turns on after MiniProg is plugged into the computer and is configured by
the operating system. If MiniProg cannot find the correct driver in the system, this LED does not turn
on. After the device is configured, the LED stays on at about a 4-Hz blink rate. This changes during
programming, where the blink duty cycle increases.
The red LED (Figure 3-2) at the bottom turns on when the MiniProg powers the part. The LED is off
when power is provided by the target board.
CYPRESS" ' {MIEWEnmn-Nunnuw Status LED — V, Power LED ISSP Header VolLage Regulatar File Load R3232 \nterface Power LED Yoggle Powev mm" 4 > l mmvmgvmmnz mum, mmhaqwnswwmz mm mm mm” mm a" m mmmucmmm mm. m M as» ‘22 mm m m m m WWW m.m>,w..mm Pam.“ wmmmvsmjnmph,mc,muwusmjampw-,.Dc,umr,Lw m m s- w» 3mm WON m, mm, Mn
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 21
Kit Operation
Figure 3-2. Programming PSoC Device
Figure 3-3. PSoC Programmer Screen
@CYPRESS'
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 22
Follow these steps to program using MiniProg1:
1. Connect the MiniProg1 to the PC using the USB cable.
2. Plug in the MiniProg1 to the ISSP header on the CY3210-PSoCEVAL1 board.
3. When USB is connected to the MiniProg1, LED (green) glows in the MiniProg1.
4. Open PSoC Programmer.
5. Click the Load File button and browse to the hex file location (<Install_direc-
tory>:\Cypress\CY3210-PSoCEVAL1\<version>\Firmware\ ASM_Example_AD-
C_UART_LCD\ASM_Example_ADC_UART_LCD.hex). Click Open to select the hex file.
6. Click Connect or double-click on the respective MiniProg under Port Selection to select or con-
nect to MiniProg.
7. Make sure the Power Cycle radio button is selected to power the kit using USB power.
8. Click Program or press [F5] to initiate programming.
9. The green LED on the MiniProg1 blinks to indicate the progress of programming.
10.After successful programming, the red LED on MiniProg1 is powered off.
11.Select the Toggle Power button in PSoC Programmer to power the board and verify output.
See the section “Replace CY8C29466-24PXI with CY8C27443-24PXI” on page 74 for instructions
on how to replace the CY8C29466-24PXI PSoC part with CY8C27443-24PXI.
3.
er Sel
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 23
4. Hardware
This section provides an overview of the development kit hardware, including power system, jumper
setting, and programming interface. To start using the board, go to “Code Examples” on page 31.
4.1 CY3210-PSoCEVAL1 System Block Diagram
The CY3210-PSoCEVAL1 Evaluation Kit consists of:
Power supply system
Programming interface
PSoC 1
RS-232 interface
Prototyping area
Character LCD interface
Figure 4-1. System Block Diagram
3RZHU6HOHFWLRQ
-XPSHU
3RZHU6XSSO\
6\VWHP
56
&RQQHFWRU
,663 3URJUDPPLQJ
+HDGHU
3URWRW\SLQJ$UHD
3XVK%XWWRQ6ZLWFKHV
3RWHQWLRPHWHU
 /('V
3RUWV33
%UHDG%RDUG
3DGVIRU 9'' DQG*1'
36R&
56
7UDQVFHLYHU
&KDUDFWHU/&'
'LVSOD\
/&'&RQWUDVW
&RQWURO
9$GDSWHU
9%DWWHU\
CYPRESS‘ {unfunny m Ynuunnuw R5132 Transmwev uART RX pm HART rx pm Prmolyplng Area R5232 Intsflaca cnaracm LCD \mareaae vouage Regulator Jumper UPS] .9 se‘ecl Pmr 0mm" 13 av / 5V) DC sunwy Jack 97v Bauery TennmaIs moms. 33 Comm 5’)‘ R2 wIEljl ‘1 £031 7 mama Reset swwch ISSP ngmmmmg Hezdev Push Emma Mammy Chip 5mm Mm SWM (Analog Inpm) ”5°C “9W3 JP1 connects P15 m HART RX pm GPIO EXPSM‘W‘ PM JPZ connect: P27 |o UAR1 rx pm
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 24
Hardware
4.2 Functional Description
The CY3210-PSoCEVAL1 Evaluation Kit demonstrates the function of PSoC 1 devices. Connect the
device to onboard peripherals such as potentiometer, LEDs, LCD, and RS-232. The board also has
additional features such as a general prototype area (bread board) and an ISSP programming
header. It provides different voltage domains; see 4.2.1 Power Supply System.
Figure 4-2. CY3210-PSoCEVAL1 Evaluation Board
4.2.1 Power Supply System
The power supply system on this board is versatile. The kit can be powered in three ways: using a
MiniProg unit, DC wall adaptor, or a 9-V battery. The DC wall adaptor must be of 9 V to 12 V, 1-A
rating unit. The onboard voltage regulator converts input 9 V/12 V into 3.3 V/ 5 V. Selection between
3.3 V and 5 V is done using jumper JP3. When the jumper (shunt) is not connected, the regulator
gives the output voltage of 5 V; installing the jumper gives a 3.3-V output.
Note Use only one power supply at a time. Do not use a power supply that is less than 7 V or
exceeds 12 V.
If the board needs to be powered via external 3.3-V or 5-V supply, the power input should be con-
nected to the VCC sockets of the J5 connector (Figure 4-9). The external voltage must be less than
5.5 V.
Warning Any voltage input greater than 12 V connected on these headers will permanently dam-
age the board components.
BYPRESS‘ [mum m munnnuw' vcc EXT 1““ vcc Q' 0 Q: T 3 ” 2 ‘ 2 “ 3 l. 1 1&1 PMOSL unwsugxm) PMOS( MPSOQSL-T} QS PMOS( DMPsovxLfl) RI7 Tm 1K nhm
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 25
Hardware
Figure 4-3. Power Supply Schematic
4.2.1.1 Protection Circuit
A reverse-voltage and over-voltage protection circuit is added at the expansion port on VCC lines.
The protection circuit consists of two P-channel MOSFETs on the power line allowing the power/cur-
rent to flow from input to output depending on the voltages applied at the external board connector.
Figure 4-4 is the protection circuit placed between the VCC domain near the prototype board (on J5
connector) and the onboard components. This circuit disconnects or behaves similar to an open
switch if an external voltage above 5.6 V is applied on the VCC pins of the J5 connector.
Warning Any voltage input greater than 12 V connected on these headers will permanently damage
the board components.
Figure 4-4. Protection Circuit
9-V Battery Connector
9-V to 12-V 1-Amp Input
Install Jumper for 3.3-V Operation and
Remove Jumper for 5-V Operation
J CYPRESS‘ ' smum w vnunmnw'
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 26
Hardware
4.2.1.2 Jumper Settings
Figure 4-5. Jumper Settings
The functions of JP1, JP2, and JP3 are as follows:
JP1 connects P16 to Rx pin for UART communication and should be removed for normal I/O
operation.
JP2 connects P27 to Tx pin for UART communication and should be removed for normal I/O
operation.
JP3 controls the voltage regulator settings and should be removed for normal 5 V operation.
When the jumper (shunt) is inserted, the board is regulated with a voltage of 3.3 V.
When the jumper (shunt) is removed, the board is regulated with a normal 5-V operating voltage.
BYPRESS' [mum m vnunnnuw' vcc m g E a g mam E E .I m a m m
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 27
Hardware
4.2.2 Programming Interface
This kit allows programming of the PSoC device via the ISSP programming header using a
MiniProg.
Figure 4-6. Programming Interface Schematic
4.2.3 PSoC 1 Parts
Two parts are available with the CY3210-PSoCEVAL1 Evaluation Kit.
PSoC CY8C29466-24PXI 28-Pin DIP
PSoC CY8C27443-24PXI 28-Pin DIP
These parts incorporate 12-bit ADC, 6-bit DAC, flexible internal clock generators, 8-bit PWM, and 8-
bit counter.
Table 4-1. Pin Description
Pin
No.
Pin
Name Description Connected To
1 P0[7] Analog column mux input J6.8
2 P0[5] Analog column mux input and column output J6.6
3 P0[3] Analog column mux input and column output J6.4
4 P0[1] Analog column mux input J6.2
5P2[7] J7.8
6P2[5] J7.6
7 P2[3] Direct switched capacitor block input J7.4
8 P2[1] Direct switched capacitor block input J7.2
9SMP
Switch mode pump (SMP) connection to external components
required SMP
10 P1[7] I2C serial clock (SCL) J8.8
11 P1[5] I2C serial data (SDA) J8.6
CYPRESS' [mum m munnnuw'
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 28
Hardware
4.2.4 RS-232 Interface
The RS-232 interface is a serial communication physical interface through which information trans-
fers in or out one bit at a time. The board has an RS-232 transceiver for evaluation, using RS-232
(UART) for low-power designs. The RS-232 transceiver has a Tx and Rx configuration.
Supply voltage is 3.3 V to 5 V; output voltage Vout (High) is Vcc–0.6 V; and Vout (Low) is 0.4 V.
Figure 4-7. RS-232 Interface Schematic
12 P1[3] J8.4
13 P1[1] Crystal (XTALin), I2C Serial Clock (SCL), ISSP-SCLK J8.2 and XTALIN /Sclk
14 VSS Ground connection Vss
15 P1[0] Crystal (XTALout), I2C Serial Data (SDA), ISSP-SDATA J8.1 and XTALout/
Sdata
16 P1[2] J8.3
17 P1[4] Optional external clock input (EXTCLK) J8.5
18 P1[6] J8.7
19 XRES Active high external reset with internal pull-down XRES/ TP4 DNP
20 P2[0] Direct switched capacitor block input J7.1
21 P2[2] Direct switched capacitor block input J7.3
22 P2[4] External analog ground (AGND) J7.5
23 P2[6] External voltage reference (VREF) J7.7
24 P0[0] Analog column mux input J6.1
25 P0[2] Analog column mux input and column output J6.3
26 P0[4] Analog column mux input and column output J6.5
27 P0[6] Analog column mux input J6.7
28 VDD Supply voltage VCC
Table 4-1. Pin Description (continued)
Pin
No.
Pin
Name Description Connected To
CYPRESS' ' smum w vnunrmuw' nu no H mm up! DNP ISSP Cmsm
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 29
Hardware
4.2.5 Prototyping Area
The prototyping area has three complete ports for custom circuit development: port 0, port 1, and
port 2. These ports can be used with the prototyping area to create simple yet elegant analog
designs.
Figure 4-8. Prototyping Area Schematic
There are power and ground connections close to the prototyping area for convenience. The area
also has four LEDs and two push button switches for application evaluation, including the Reset
switch. This area also includes a potentiometer to be used for analog system evaluation work.
Note If the board needs to be powered via external 3.3-V or 5-V supply, the power input should be
connected to the VCC sockets of the J5 connector. The external voltage needs to be less than 5.5 V.
Warning Any voltage input greater than 12 V connected on these headers will permanently damage
the board components.
BYPRESS' smum m vnunrmuw'
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 30
Hardware
Figure 4-9. Prototyping Area Schematic
4.2.6 Character LCD Interface
The kit has a character 2×16 alphanumeric LCD module, which goes into the character LCD header,
J9. The LCD runs on a 5-V supply and can function regardless of the voltage on which PSoC is
powered.
LCD Interfacing Schematic
Potentiometer R6
allows to vary the
LCD contrast
@CYPRESS'
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 31
5. Code Examples
Six code examples are included in the following sections. All code examples are available on the
CY3210-PSoCEVAL1 kit DVD or at this location: <Install_directory>:\Cypress\
CY3210-PSoCEVAL1\<version>\Firmware.
5.1 My First Code Example
5.1.1 Project Description
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. The project uses the
following modules:
ADCINC: This module processes the programmable gain amplifier (PGA) output at the rate of 180
samples per second and produces the corresponding digital output.
PGA: This module is used at unity gain to supply the input to ADC.
UART: This is an 8-bit universal asynchronous receiver transmitter (UART). The clock divider VC3
generates the baud clock for the UART by dividing 24 MHz by 156. The UART internally divides VC3
by 8, resulting in a baud rate of 19,200 bps. The ADC output is sent to the PC using UART module.
LCD: This module is used to display the ADC output (hex) values. If the ADC has completed
conversion, the output is displayed on the LCD as ASCII text. The same is transmitted to the PC
through a RS-232 cable.
Note This code example (C_Example_ADC_UART_LCD) is located in the Firmware folder.
5.1.2 Creating My First PSoC 1 Project
1. Open PSoC Designer.
2. To create a new project, click File > New Project.
3. In the New Project window, select the chip-level icon. Name the project Example_My_First_P-
SoC_Project, as shown in Figure 5-1.
4. In the Location field, enter the path in which the project is to be created.
-CYPRESS‘ Enninnsn m mmuw New Pvnjec' 3mm twat i1 Chpbvd um Lacaiun \m— C] kawacaNamg : we m n A m: met [1 Evealeglechwlorwukwaae fined Cream: New Ploled v 1m Device Genevahe'Mgm‘ Me mm C v Ereahe: an emva I: , based Ehwleve‘ meet for msmrzlm dewce my pmpeuype :uppnn: Use! Mmme Sasha" and placemsl New Project 31mm”: £1 Chpbvd Lacaiun \m— C] kawacaNamg : we m n A r: e met [1 Evealeglmwwwukwaae Fined Creation: New qued v 1m Device Genevahe'Mgm‘ Me mm C v Ereahe: an emva I: , based Ehwleve‘ meet for msmrzlm dewce my pmpeuype :uppnn: Use! Mmme Sasha" and placemsl
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 32
Code Examples
Figure 5-1. New Project Window
5. To select the target device, click Device Catalog, as shown in Figure 5-2.
Figure 5-2. Select Device Catalog
6. The Device Catalog window opens. Select CY8C29466-24PXI from the list and click Create
Project with 'CY8C29466-24PXI'.
aCYPRESS‘ Enninnsn m mmuw Dewz-YYDS AHDSwz-s . mcwaeoma Nam ‘Fmd Egsvaudu‘ss ‘flvavtlmags *Favmtss WEE2BEZ323LTK‘ UFN VSK w u 3Um525 \ndeaBEEI WEE2E33323WK‘ 28 SSEIP VSK w 23 3Um525 \ndeaBEEI m8c28m32w u TUFP VSK w on 3Um525 \ndeaBEEI W8c282332wm 28 SSEIP ‘2 VSK w u; 3Um525 \ndeaBEEI WEE2BE¢3323LT>< u="" tufp="" 82.3="" vsk="" w="" on="" 3um525="" \ndeabeei="" wee2be¢3523ltkw="" a8="" ufn="" 82.3="" vsk="" w="" u="" 3um525="" \ndeabeei="" wee2e35223wk‘="" 28="" sseip="" 82.3="" vsk="" w="" 23="" 3um525="" \ndeabeei="" wee2s3€s="" 23ww="" 28="" sseip="" v2="" ‘6="" na="" 32k="" 2k="" 23="" 3="" [i="" m="" 5="" 25="" ‘ndmei="" m="" 855]="" wee2s3€s="" 23s="">< 28="" sehe="" v2="" ‘6="" na="" 32k="" 2k="" 23="" 3="" [i="" m="" 5="" 25="" ‘ndmei="" m="" 855]="" where-36="" 23m="" 33="" tufp="" v2="" ‘6="" na="" 32k="" 2k="" 3d="" 3="" [i="" m="" 5="" 25="" ‘ndmei="" m="" 855]="" where-36="" 23ww="" 3e="" sseip="" v2="" ‘6="" na="" 32k="" 2k="" 33="" 3="" [i="" m="" 5="" 25="" ‘ndmei="" m="" 855]="" weber-36="" 23m="" tufp="" v2="" ‘6="" na="" 32k="" 2k="" 53="" 3="" [i="" m="" 5="" 25="" ‘ndmei="" m="" 855]="" where-36="" 23ltk‘="" 3e="" mlf="" v2="" ‘6="" na="" 32k="" 2k="" 33="" 3="" [i="" m="" 5="" 25="" ‘ndmei="" m="" 855]="" wee2s3€sv2wke="" 28="" sseip="" v2="" ‘6="" na="" 32k="" 2k="" 23="" 375="" a8525="" amq="" 3uaavz5e]="" wee2se~36v2wke="" 3e="" sseip="" v2="" ‘6="" na="" 32k="" 2k="" 33="" 375="" a8525="" amq="" 3uaavz5e]="" wee2s3€s="" 23w="" 28="" sseip="" v2="" ‘6="" na="" 32k="" 2k="" 23="" 3="" [i="" m="" 5="" 25="" am="" 3h="" m="" ese]="" where-36="" 23w="" 38="" sseip="" v2="" ‘6="" na="" 32k="" 2k="" 33="" 3="" [i="" m="" 5="" 25="" am="" 3h="" m="" ese]="" cvbczwsszalev="" 43="" mm="" 73="" 7:"="" no="" 32k="" k="" 33="" 3="" [no="" 525="" #7431710="" 355/="" se‘eched="" 8w="" (889945572488;="" \="" fi‘tevi="" avnhed="" u="" \="" 828828="" mm="" 353="" ar="" 353="" \="" d="" d="" d="" d="" d="" d="" d="" d="" e="" v="" d="" d="" d="" d="" d="" d="" d="" d="" d="" d="" d="" 928823888288="" mm="" ‘m8529355="" 2am="">
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 33
Code Examples
Figure 5-3. Device Catalog Window
7. In the Generate 'Main' File Using: option, select C and click OK.
8. By default, the project opens in Chip view, as shown in Figure 5-4.
CYPRESS‘ mm“ m runnunw ”swam, : a: a. in um mm...“ M m M.“ 1... W.” m, JEQCVSH‘Q‘ &avla JgAHHVKwEV-Krr >74MLQVMVQELH, V mm WWW MM WK... PM“ A a ' w L» n - “(Kin ‘X‘LM , qumnprwjn‘, Hum: um...E ' \_i V:Eu€:;;y,fimv$ljs , my: .KEWM C K...“ Spur-1W K A m: K 3 mm K a w K 3 Km am a 1 lm K ; rm m K a m User Modules a g ADCS a‘.‘ 'E‘ a: ADCINCVR a‘.‘ DelSig a: DUALADC a: DUALADca «2‘ EonC :1} Sims d mmoc d mmocs E a Amplifiers E a Analog Comm
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 34
Code Examples
Figure 5-4. Default View
9. Configure the modules required for this design. Also, connect the modules together and to the
pins on the PSoC. In the User Modules section, expand the ADCs folder.
Figure 5-5. User Modules Window
10.In this folder, right-click on ADCINC and select Place. Choose the Single Stage Modulator
option for the Multi User Module dialog.
CYPRESS Ewinnsnmrwumuw Choose the ADCINC Modulator Order Choose a drcuit topology and click the or button or click ‘Callcel', below. The Incremental ADC permits a Iradeoff to be made between l'nsband quantization noise and the number of p5oc blacks required. The secondsnrder modulator does a better job afshifling quantization noise out oi band where it is leduced by the decimation filter. This implnves SNR but requires one additional switched capacitor analog P5oc block. © Firstsurder Modulator: This topology Select uses a single analog switched (apacltur Si" IE PSaC block and one digital 95oc black. . 5‘39 e The analog block may he placed in any "Musl‘atm ASC or ASD black. The PWM block maps onto any Digital black Secondrnrder Modulator: This circuit tuualugv requires two switched o capacitor PSuC blacks, one more than Select the the firstrurder modulator. These two Double bloele always map vertically into an Sb 3 analog column so they share the same Madufifatm comparator bus (and the same clock). The PWM black maps onto the same , locations as the firstorder modulator topology. V Eile gdit mew Mama—Bi 3695.E$2fi*_
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 35
Code Examples
Figure 5-6. Multi User Module
The user module (UM) is placed in the first available analog block. By default, the UM is placed
on an Analog Switched Capacitor Type C block. It should be shifted to a Switched Capacitor Type
D block, as explained in the next step.
Note The analog block in ADCINC is configured as an integrator. Switched Capacitor Type C is
a filter and Type D is an integrator. Refer to the ADCINC UM data sheet and Technical Reference
Manual from Help > Documentation for more details on analog blocks.
11.To change the UM placement, click on Next Allowed Placement icon (see Figure 5-7). The next
possible module for placement is highlighted. Click on the icon again so that the ASD11 analog
block is highlighted. Now, click on the Place User Module icon (see Figure 5-7) to place the user
module in ASD11 analog block.
Figure 5-7. PSoC Designer Toolbar
Place User Module
Next Allowed Placement
CYPRESS‘ EKBEWED m runnunw w gyms; mm Ascm : i B Asmn Parameters-ADGNCJ v n x Name ADCINI:_1 mmm m H p , w Datameal Unxigned Resolution 12 B It Data Clock VEI ClockPhase Novmal Poslnpul AEBIJ1 Neglnpul AEBIJIJ NeglnpulGain Disconnected Pulsewidlh 1 FWM Output None
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 36
Code Examples
Figure 5-8. ADCINC User Module Placement
12.Configure the ADCINC_1 properties, as shown in Figure 5-9.
Figure 5-9. ADCINC User Module Properties
13.In the User Modules window, expand the Amplifiers folder and double-click on PGA to place a
programmable gain amplifier (PGA) in the design.
14.By default, the PGA is placed on the ACB00 analog block. To change the placement to ACB01
analog block, click on the Next Allowed Placement icon (see Figure 5-7).
Note Move the PGA User Module to a block above the ADCINC UM. This is because, the input
to the ADCINC UM is routed through a PGA.
. CYPRESS gunmen m runnunw Pam“ GAJ v n 3: Name PGAJ \ ' 1‘ ‘ , ‘, Liam 1mm \npul Analogtolumn_lnwt5elecl_1 Hefevence AEND Andafiu: 0mm Analonflu:
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 37
Code Examples
Figure 5-10. PGA User Module Placement
15.Configure the PGA properties, as shown in Figure 5-11.
Figure 5-11. PGA User Module Properties
16.Click on AnalogColumn_InputSelect_1 multiplexer in the Design window and change the input
multiplexer to AnalogColumn_InputMUX_0. The analog input from P0[1] is routed to the ADC
module through a PGA at unity gain (Gain is a configurable parameter in the PGA module).
CYPRESS" Eminnsnmrwnmuw AnalwculuannputSelecfl Paameters-LCDJ v 4 x Nam LCDJ LEDPDM Pun_2 BalGlaDh Enable Name Ind-mares Ihe name used u: Idem'ly |h|s Use Mudule instance
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 38
Code Examples
Figure 5-12. Connecting PGA to Port Pin
17.In the User Modules window, expand the Misc Digital folder and double-click on LCD to place an
LCD in the design. Configure the properties of the LCD UM. Enable the BarGraph property to
include additional APIs into the project and allow the bar graph display on the LCD.
Figure 5-13. LCD User Module Properties
Notes
a. This UM does not use digital or analog blocks. On mapping the LCD to a port, it can be
viewed in the design, as shown in Figure 5-14.
b. The LCD module can be placed on ports 0, 1, or 2. Port 2 is selected because some of the
port pins of port 0 and port 1 have other uses.
-CYPRESS' minus»; m mnmw Pam Lou. In: Name LED_1 L 7 "udtt‘r, LtI ‘ ‘ , , ' t t , D LEDPovt Povt_2 Barfi vaph Enable Name Indexes the name used to identiy th's ”LL" Use! Module instance lmrs uAnTJ v q: x Nam LIARTJ H’ty‘w‘lv A" Black v53 RX Input Ruw_E| |nput_2 1x Ou|put Rm DuluuLa IX Interrupt Made Txnegamw Elnckfiync Sync m 5;:ka FmedBmlev Dtsdfle Murruslze ts Emmanflarmmatnr 13 Paam_DaInItev 32 \gnmeEhamBehw 32 Embtejackfipac: Dtsabte RX uutm Nune Rx Etc-ck um Nuns T>< chunk="" flu|="" nuns="" \nvavtrx="" input="" nuvmd="" nun="" infinite:="" the="" new="" med="" lo="" dainty="" this="" uaev="" mm:="" 'mtame="">
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 39
Code Examples
Figure 5-14. LCD User Module Placement
18.In the User Modules window, expand the Digital Comm folder and double-click on UART to
place a UART in the design. Configure the properties of the UART UM, as shown in Figure 5-15.
Figure 5-15. UART User Module Properties
19.Route the RX signal of UART to P1[6]. There are two methods to do this:
a. Auto Routing: While holding the [Shift] key on the keyboard, click on the RX Input terminal.
PSoC Designer highlights the available pins/terminals to which routing is possible. Without
releasing the [Shift] key, click on the Port_1_6 pin on the left. The Row and Column intercon-
nects are automatically configured to connect the selected terminals.
-CYPRESS' Enninnsn m runnmnw
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 40
Code Examples
Figure 5-16. Auto Routing
b. Manual Routing: Configure the look-up table (LUT) on Row_0_Input2 to GlobalOddEven bus.
To do so, click on the Row_0_Input_2 bus to open the Digital Interconnect window.
Figure 5-17. Digital InterConnect Window
20.Click on Row_0_Input_2 demultiplexer in the Interconnect window and select GlobalInOdd_6;
click Close.
CYPRESS‘ Enninnsn m runnmnw 0.ng lnlercnnnect RnwilLlnuuLZ GIE Gluhalnfldd ‘2 E mum thalnEve ‘ GlobalnEve Mi; mammal:
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 41
Code Examples
Figure 5-18. Configure Row_0_Input_2 to GlobalInOdd_6
21.Click on GlobalInOdd_6. Select Port_1_6 from the drop-down list in the Pin field; click OK.
Figure 5-19. Pin Select
Figure 5-20. Pin Select
22.Route the TX signal of UART to P2[7]. There are two methods to do this:
a. Auto Routing: Press the [Shift] key on the keyboard and click on the TX Output terminal.
Without releasing the [Shift] key, click on the Port_2_7 pin on the right hand side.
-CYPRESS‘ Enninnsn m mmuw ROI 1 1 ROI Rona] 0.ng lnlercnnnett RnwilLUutpuL'J
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 42
Code Examples
Figure 5-21. Auto-Routing
b. Manual Routing: Configure the LUT on Row_0_Output3. To do so, click on Row_0_Output3
to open the Digital Interconnect window.
23.In this window, enable Row_0_Output_3_Drive_1 to connect to GlobalOutEven_7.
Figure 5-22. Digital InterConnect Window
24.Click Close.
EGYPRESS‘ 7 soon; 5050 V 1? W Er}, _, T G‘au _. » I my. \ LdHLfl
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 43
Code Examples
25.Click on GlobalOutEven_7. Select Port_2_7 from the drop-down list in the Pin field; click OK.
Figure 5-23. Pin Select
Figure 5-24. Pin Select
26.Configure the Global Resources window to match the following figure.
CYPRESS‘ minus»; m mnmw 'awmnu-ux-mhmmm v [an Pwel Selim: [Von EPujrock 3253mm F'LL_Mud2 Slnpjrmel vc1= SysDk/N v22: vn m v53 Sauce vca Diwdu SysUk Souvee SysUk‘Z Dlsabl: Ana‘ng Paws. R2! Mux AGndBWas: np-Amp Bla: AJulLinar SwmchMudeF'uw Tnp Va‘tage [LVD [s LvoThyuueaack Watchdog Enabh VD I) Vidal 5 w I 24mm SysDk/B Mama Disable 512_Hz a 1 SysElk/l 156 Ward No 5:: [In/Ref Low wad/zw-amdaap Disable Law Law arr A aw [5 0w; Dlsable Disable Saba: Ihe Valle [1 ha 55]!» MW" In divide Ihe V53 scum |o ahhh vca, which a a mm "a can be m .0)? kasvac: 'Exalee_My_Fns|_P5stifle”? [I pluck] a D ExalnvleJ‘LF LPSaE_PIoie:l [EYEZSISE-ZJ E I Exameymsxjsocjvqecx[chm] a I Loadable Conlguralmns a D example_my_hrx‘_pwc_pluied~4L|xeandub I ADCINCIZJ I PGAJ E1 LEDJ l UARTJ i Exande_My_Fwst_FSuE_quau [Pmml] E i Examv‘eJl‘yfwsLPSoC_onleu a . Some: files E1 Mm: t. bod an" Heads! Flex ib Ll Hashsecunlym m i Dutnuth‘et m i External Header: Edi 3i
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 44
Code Examples
Figure 5-25. Global Resources Window
Note
a. The clock divider VC1 provides a 3-MHz sample clock to the ADCINC, resulting in a sample
rate of 180 samples per second.
b. The clock divider VC3 generates the baud clock for UART by dividing 24 MHz by 156. The
UART internally divides UART clock (VC3 in this example) by 8, resulting in a baud rate of
19200 bits per second. See the UART UM data sheet for details.
27.Open the existing main.c file in Workspace Explorer. Replace the existing main.c content with the
content of the embedded My_First_Example_Project_Main.c file, which is available within the
attachments feature of this PDF document.
Figure 5-26. Workspace Explorer Window
ACYPRESS' ' Enninnsnlnrnnnmuw ngmm Pan J Ha m yam \:AEmp1s.My_F-:LP5uc_Pm\su\Exanu\a_My_rua_P5uc_Pv Plugemmmg Sallmgs mm , E] Mum 0 Ham (9 Puw- Eye‘s Vevxlmalm 0 On Q m Wm @ ——Tougle Power Button MIM Vevmnl an Program Button
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 45
Code Examples
28.Save the project.
29.To build the project, click Build > Generate/Build 'Example_My_First_PSoC_Project'.
30.Connect the CY3210 PSoCEVAL1 board to a PC through a MiniProg1.
Figure 5-27. Connect MiniProg1 to Board
The board can be programmed either through PSoC Designer IDE or by launching PSoC Pro-
grammer. To program the board using PSoC Programmer, see “Programming Specifications and
Connections” on page 20. To program the board through PSoC Designer, follow these steps.
Note When programming the board through PSoC Designer, close any open instance of PSoC
Programmer.
a. Click on Program > Program Part.
Figure 5-28. Program Part Window
CYPRESS‘ EHBEnnEn m runnunw “ ngmm Pan Hat VII: path C:\Exauu|a_My_ PSnE_F'lwec?\Exanvle_My_leK_FSoE,Fv ‘ Fugj‘v‘ng::?vg H W mm "rm‘nir"“ 0 R?» H. 3» n m Upstaion Succeeded!
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 46
Code Examples
b. In the Program Part window, configure the following settings:
Port Selection: Select MiniProg1/xxxxxxxxxxx and then Connected
Acquire Mode: Power Cycle
Verification: Off
Power Settings: 5.0 V
c. Click on the Program button (see Figure 5-28) to start programming the board.
d. Observe the programming status on the progress bar.
Figure 5-29. Programming Status
e. When programming is successful, the 'Operation Succeeded!' message is displayed.
Figure 5-30. Operation Succeeded!' Message
5.1.3 Verifying Output using LCD
1. Set up the board with the following connections using the jumpers (shunts) and single strand
jumper wires:
a. Connect P01 to VR using a single strand jumper wire. This connects one of the PSoC pins to
the potentiometer.
b. Place jumper (shunt) on JP1 to connect P16 and Rx.
c. Place jumper (shunt) on JP2 to connect P27 and Tx.
d. Connect an RS-232 cable from connector J1 to a COM port on the PC.
e. Remove jumper (shunt) JP3 to operate the board at 5 V. The LCD display is seen for 5 V
operation only.
2. Power the board by clicking on the Toggle Power button (see Figure 5-28) in the Program Part
window.
3. The ADC value is shown on the LCD display. A bar graph corresponding to the ADC value is also
displayed. The ADC value varies from 0000-0FFF for input voltage of 0 V to 5 V. The input volt-
age can be varied by rotating the potentiometer (R7) connected to VR.
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 47
Code Examples
Note The measured value might have an error of upto 10 counts due to ADC offset or potentiom-
eter inaccuracy.
Figure 5-31. LCD Displaying ADC Value
4. Vary the potentiometer and observe the change in the value of LCD.
Note ADC values may fluctuate several counts due to system noise or if the potentiometer volt-
age is at the edge of an ADC count.
5. Save and close the project.
5.1.4 Verifying Output using UART
The PSoC project in “Creating My First PSoC 1 Project” on page 31 uses an UART module in the
design. The ADC value that is displayed on the LCD can be viewed on a terminal application such as
HyperTerminal or TeraTerm on a PC. To view this output, apart from the hardware connections in
“Verifying Output using LCD” on page 46, a RS-232 cable needs to be connected from the CY3210-
PSoCEVAL1 board to a COM port on a PC, as shown in Figure 5-32.
CYPRESS‘ mm“ m mmuw (0M1 Prnpemes Pan Selim: El: we! securid Data his an Nuns §|w hi: I flew canlml None
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 48
Code Examples
Figure 5-32. CY3210-PSoCEVAL1 Connected to RS-232 Cable
1. Connect the hardware as explained in “Verifying Output using LCD” on page 46 section.
2. Open a terminal application such as HyperTerminal or TeraTerm with these parameters:
a. Baud Rate: 19200
b. Data: 8-bit
c. Parity: None
d. Stop: 1-bit
e. Flow Control: None
Figure 5-33. HyperTerminal Settings
CYPRESS‘ ‘IIV EMBEnnEnINrnMnIRuw example rHyperTerminrzl Rb mm WW (m nmgm Hw D S I 3 D E Q \ QBFD QBFD OBFD QBFE flBFD QBFE QBFE QBFE QBFE flBFE QBFE QBFE UBFD QBFE OBFD QBFD QBFD QBFD QBFD OBFE QBFE (\w cannedeauuuzg Autadetect 192mm stRm (“PS MUM (awe vatema
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 49
Code Examples
3. Power the board by clicking on the Toggle Power button in the Program Part window
4. The ADC value is displayed on the HyperTerminal and on the LCD, as shown in Figure 5-34 and
Figure 5-35
Figure 5-34. Verify Output on LCD
Figure 5-35. Verify Output on HyperTerminal
EMPRESS
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 50
Code Examples
5.2 Code Example 2: ASM_Example_ADC_UART_LCD
5.2.1 Project Description
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. The project uses the
following modules:
ADCINC: This module processes the programmable gain amplifier (PGA) output at the rate of 180
samples per second and produces the corresponding digital output.
PGA: This module is used at unity gain to supply the input to ADC.
UART: This is an 8-bit universal asynchronous receiver transmitter (UART). The clock divider VC3
generates the baud clock for the UART by dividing 24 MHz by 156. The UART internally divides VC3
by 8, resulting in a baud rate of 19,200 bps. The ADC output is sent to the PC using UART module.
LCD: This module is used to display the ADC output (hex) values. If the ADC has completed conver-
sion, the output is displayed on the LCD as ASCII text. The same is transmitted to the PC through a
RS-232 cable.
5.2.2 Creating the Project
The procedure for creating this project is similar to the flow described in 5.1.2 Creating My First
PSoC 1 Project. The previous example demonstrated coding in C language, while this example
implements the same functionality in Assembly language. The LCD bargraph function is disabled to
keep the code compact.
To create the project:
1. Follow steps 1 to 8 from 5.1.2 Creating My First PSoC 1 Project.
2. In the Generate 'Main' File Using: option, select Assembly and click OK.
3. Follow steps 10 through 28 from 5.1.2 Creating My First PSoC 1 Project.
4. Open the existing main.asm file in Workspace Explorer. Replace the existing main.asm content
with the content from the file located at <Install_directory>:\Cypress\CY3210-PSo-
CEVAL1\<version>\Firmware\ASM_Example_ADC_UART_LCD\ ASM_Example_AD-
C_UART_LCD\main.asm.
5. Follow steps 30 through 32 from 5.1.2 Creating My First PSoC 1 Project to build the project and
program the device.
32E: \T\ uuuu gfifim
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 51
Code Examples
Figure 5-36. Device Configuration for ADC Conversion and LCD Display
5.2.3 Hardware Connections
ADC input (0–Vdd): Connect P01 to VR
Serial Rx: Place jumper (shunt) on JP1 to connect P16 and Rx
Serial Tx: Place jumper (shunt) on JP2 to connect P27 and Tx
Connect RS-232 cable to the PC
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 52
Code Examples
Figure 5-37. Hardware Connection: Code Example 2
5.2.4 Code Example 2 Flowchart
Start
Initialize UART, PGA,
ADC, LCD
Enable Global Interrupts
Read Result, Clear Flag
Print Result to UART
Display Results in HEX
on LCD
ADC Converted
Data Available?
No
Yes
CYPRESS‘ Enninnsn m mmuw 'whhvruin‘vwwhhww (OMI Propellies Pun 524mg: Bflwsvsewnd — V Qaabls a v Em None v gmp m: ‘1 v Bow cnmo‘ None v
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 53
Code Examples
5.2.5 Verifying Output using LCD
When the example code is built and programmed into the device, reset the device by pressing the
RESET button or power cycling the board. The voltage of the potentiometer is measured by the ADC
and is output as a four-digit hex value on the LCD. The value displayed on the LCD should change
as the potentiometer is turned (see Figure 5-38).
Note Remove jumper JP3 to verify output at 5 V. The LCD display will not be seen at 3.3 V
operation.
Figure 5-38. Verify Output - Code Example 2
5.2.6 Verifying Output using UART
Open a terminal application such as HyperTerminal or TeraTerm with these setup parameters:
Baud Rate: 19200
Data: 8-bit
Parity: None
Stop: 1-bit
Flow Control: None
The ADC value is displayed on the HyperTerminal and on the LCD.
Figure 5-39. HyperTerminal Settings
CYPRESS‘ Enninnsn m mmuw ckampk Hypul'ermuml He m wew (au Yvansfev new BEDS DEQ 07D9 WDR fl7D9 MDR MDB 0709 0709 0709 0709 0709 0709 0709 0709 0709 WDB U7D9 U7D8 U7D8 07D8 07DR 07D9 07DR 07D8 (unnzctedflflflfl Autndeted wzunarm mm mm NW name "mew
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 54
Code Examples
Figure 5-40. Verify Output on HyperTerminal
@chREss § 55%;; m: ME" 3 33 3E". """ mm m»
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 55
Code Examples
5.3 Code Example 3: ASM_Example_Blink_LED
5.3.1 Project Description
This project demonstrates how an LED blinks at a constant duty cycle using a hardware PWM.
PWM8: The clock dividers VC1, VC2, and VC3 are used to divide the 24-MHz system clock by 16,
16, and 256, respectively. The resulting 366-Hz clock is used as the input to an 8-bit PWM. This in
turn produces an LED blink period of 1.4 Hz.
Figure 5-41. Device Configuration to Blink an LED
CYPRESS" Eminnsnmrwnmuw
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 56
Code Examples
5.3.2 Hardware Connections
Connect P20 to LED1.
Figure 5-42. Hardware Connection: Code Example 3
5.3.3 Code Example 3 Flowchart
Start PWM,
Enable PWM Interrupt
Enable Global Interrupt
Blink LED
) CYPRESS"
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 57
Code Examples
5.3.4 Verifying Output
When the example code is built and programmed into the device, make all the hardware connections
and reset the board by pressing the RESET button or by power cycling the board. The LED1 blinks
with a blink period of 1.4 Hz.
Note Remove the jumper JP3 to verify output at 5 V.
Figure 5-43. Verify Output: Code Example 3
5.4 Code Example 4: ASM_Example_DAC_ADC
5.4.1 Project Description
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. The project uses the following user modules:
Counter8: An 8-bit counter is used to generate an interrupt at the DAC update rate (1/64 sine wave
period). By adjusting the counter period, the DAC frequency and the resulting sine frequency can be
modified.
DELSIG8: Current ADC conversion values are used to reload counter period. ADC input voltage is
between 0 V and Vdd, depending on the potentiometer.
PGA: This module is implemented as buffer with user-programmable gain.
DAC6: This module converts digital input to analog output, which is used to generate sine wave. The
DAC output is routed to P0[5] in the chip design. When P0[5] is connected to an LED on the board
using single strand jumper wire, the LED blink period varies with the position of potentiometer. The
sine wave pattern can be observed on an oscilloscope when the DAC output (P0[5]) is connected to
the oscilloscope.
' sumnmm mnmw M van mun :1]; .E ‘ .E —E} ‘D‘ m i x i } 1 m m m m V HE , H3 42 ”E m B3 j J .é. 2 > W my. W 3 can
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 58
Code Examples
Figure 5-44. Device Configuration to Output a Sine Wave
*CYPRESS‘ Ewinnsnmrwnmuw
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 59
Code Examples
5.4.2 Hardware Connections
ADC Input (0–Vdd): Connect P01 to VR
DAC Output (0–Vdd): Connect P05 to LED1 and CRO
Figure 5-45. Hardware Connections: Code Example 4
5.4.3 Code Example 4 Flowchart
Start ADC Value
Update Counter
Turn on PGA,
Start DAC
Read Data, Clear Flag
A=0x03
Update DAC,
Update Rate
ADC Converted
Data Available?
No
Yes
Enable Global Interrupts
Counter Period
less than 0x03
YesNo
. CYPRESS‘ Ewinnsnmrwumuw Tak fl, Triq’d M P05: 16.0flms CURSOR # Type Amphmdr Source E H1 aV 4.68V Cum! 2 -2,28V CH1 mnv M ZS‘Ums EH1 / enamv Use multlvuvpnse knob w move Cum 1
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 60
Code Examples
5.4.4 Verifying Output
After the example code is built and programmed into the device, make all the hardware connections
and reset the board by pressing the RESET button or by power cycling the board. LED1 is a sine
wave output whose period is based on the ADC. Turning the potentiometer changes the ADC value
and controls the frequency of the sine wave. The sine wave output can be viewed on an oscillo-
scope.
Note Remove the jumper JP3 to verify output at 5 V.
Figure 5-46. Output Sine Wave
Figure 5-47. Verify Output: Code Example 4
YPRESS' EKIEWED m mnmw pat-:— E ‘ more, o Wolkspace 'AS M_E xample_Dynamic_PWM_PH 5' [1 pvoiecll a’ E . ASM_Example_Dynamic_PV/M_PRS [WECZSMEB a? x: I AS M_E xample_Dynamic_PWM_PH 8 [Chip] 7' E . n sm_exa I\_lew Loadable Configuration I Coun|em_1 00 E; _ PHS_Euniig~1 LlsevMudulzs E; h PWM_Cnnlig -1 User Modules ‘ ASM_Example_Dynami-:_PWM_PRS [Pinnul] @ fl ASM_Example_Dynamic_P\A/M_PRS
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 61
Code Examples
5.5 Code Example 5: ASM_Example_Dynamic_PWM_PRS
5.5.1 Project Description
This project demonstrates the Dynamic Reconfiguration capability of PSoC Designer. A set of user
modules is called a configuration. A loadable configuration consists of one or more UMs placed with
module parameters, global resources, pinouts, and generated application files. The UMs used and
the register settings can be changed easily. The application can switch in and out of configurations in
real-time, allowing greater use of the chip resources. This is similar to memory overlaying or using
more than 100 percent of the resources in an FPGA design. Imagine a vending machine where a
PSoC monitors and controls environmental conditions such as temperature and humidity, dispenses
drinks, counts money, makes change, controls LEDs and an LCD display, and implements capacitive
sensing buttons or a touchscreen interface. Now, imagine that once a day for about a minute, it
reconfigures itself such that it can send information back to a central office. This is the power of
PSoC with dynamic reconfiguration.
To add loadable configurations to a PSoC project, right-click the Loadable Configuration folder in
the Workspace Explorer and select New Loadable Configuration. A new folder is created with a
default name, Configx, where x is the number of alternate configurations.
The new configuration can be renamed based on the project. All PSoC resources (digital and analog
blocks) can be reused. A loadable configuration can be deleted if no longer required. However, the
base configuration (the default configuration) cannot be deleted.
When using dynamic reconfiguration, global parameters are set in the same manner as single con-
figurations. However, changes to the base configuration global parameters are propagated to all
additional configurations. Therefore, global parameter changes made to an additional configuration
are done locally to that particular configuration. For instance, if global parameter #1 has a specific
value in "Base" loadable configuration, it will have the same value in "New" loadable configuration.
But not vice versa: if global parameter #2 has a specific value in "New" loadable configuration, it will
have the default (or base-specific) value in "Base" loadable configuration." The same also applies to
port pin settings.
In this project, dynamic reconfiguration is demonstrated by configuring a PWM in the digital block
DBB01 in one configuration. The same block is used to configure a PRS in the second configuration.
A Counter8 UM is placed in the base configuration that drives the PWM or PRS module based on
the configuration that is loaded. A switch on the CY3210-PSoCEVAL1 board is used to toggle
between configurations.
When the SW switch is released, the PRS configuration is unloaded (if already loaded), and the
PWM configuration is loaded. In this configuration, LED1 and LED2 are used to output the PWM
Pulse Width and PWM Terminal Count, respectively.
Elfiflmi A :5 mmmmnmmmmgmggmggmg
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 62
Code Examples
When the SW switch is pressed, the PWM configuration is unloaded and the PRS configuration is
loaded. In this configuration, LED1 and LED3 are used to output the PRS Pulse Density and PRS
Bitstream, respectively.
The APIs UnloadConfig_<configname> and LoadConfig_<configname> are used to unload and load
the required configurations
Counter8: In the base configuration, it takes a clock of 732 Hz as an input.
PRS8: The PRS configuration contains a PRS with pulse density (analogous to pulse width) and a
bitstream output that is shifted out to LED pin.
PWM8: The PWM configuration contains a standard 8-bit PWM with a duty cycle of 50 percent. Both
the pulse width and terminal count outputs are displayed on LEDs.
Figure 5-48. Base Configuration
@chREss EHEEEEHEHHHH j 3335: mg 1 fl
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 63
Code Examples
Figure 5-49. PWM Configuration
Figure 5-50. PRS Configuration
5.5.2 Hardware Connections
User button: Connect P14 to SW
PWM pulse width or PRS pulse density: Connect P20 to LED1
PWM terminal count: Connect P22 to LED2
PRS bitstream: Connect P23 to LED3
Ewinnsnmrwumuw ACYPRESS‘
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 64
Code Examples
Figure 5-51. Hardware Connection: Code Example 5
5.5.3 Code Example 5 Flowchart
Start Clock Generator,
Load PRS Configuration
Start PWM
Unload PWM Configuration,
Load PRS Configuration
Start PRS,
Load Compared Value
Button Pressed?
No
Yes
Update PRS Configuration,
Load PWM Configuration
Button Released
No
Yes
CYPRESS‘
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 65
Code Examples
5.5.4 Verifying Output
Program the board with the hex file; disconnect power and make all hardware connections. Remove
the LCD module and power the board. When the switch is released, the PWM configuration is
loaded and LED1 and LED2 blink with PWM Pulse Width and PWM Terminal Count, respectively.
When the switch is pressed, the PRS configuration is loaded and LED1 and LED3 blinks with PRS
Pulse Density and PRS Bitstream, respectively.
Note Remove jumper JP3 to verify output at 5 V.
Figure 5-52. Verify Output: Code Example 5
mmmgmmgamgggfifi gun a u a J r! ”Managua magma“ gunning“
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 66
Code Examples
5.6 Code Example 6: ASM_Example_LED_Logic
5.6.1 Project Description
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.
PWM8: Two 8-bit PWM UMs process a 93.37-kHz clock with periods of 256 and 255, respectively.
This produces the LED beat frequency of 1.4 Hz.
Figure 5-53. Device Configuration to Combine PWMs using Output Logic
) CYPRESS" Eminnsnmrwnmuw
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 67
Code Examples
5.6.2 Hardware Connections
Connect P20 to LED1
Figure 5-54. Hardware Connection: Code Example 6
5.6.3 Code Example 6 Flowchart
5.6.4 Verifying Output
After the program is built and programmed into the device, make all the hardware connections and
reset the board by either pressing the RESET button or by power cycling the board. The LED1 blinks
at a frequency of 1.4 Hz.
Note Remove jumper JP3 to verify output at 5 V.
Enable PWM1 and PWM2
Blink LED
EMPRESS"
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 68
Code Examples
Figure 5-55. Verify Output: Code Example 6
See “Replace CY8C29466-24PXI with CY8C27443-24PXI” on page 74 for instructions on how to
replace the CY8C29466-24PXI PSoC part with CY8C27443-24PXI.
A 2-“
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 69
A. Appendix
The schematic and board layouts are available on the CY3210-PSoCEVAL1 kit DVD or at this
location: <Install_directory>:\Cypress\CY3210-PSoCEVAL1\<version>\Hardware.
A.1 Schematic
A.1.1 CY3210-PSoCEVAL1 Board Schematic
1
1
2
2
3
3
4
4
5
5
6
6
D D
C C
B B
A A
1
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134, U.S.A.
1
Title: CY3210-PSoCEVAL1
REF 13352 *B
8/22/2012 1:46:48 PM
C:\P4V\hardware\psoc\Eval_Boards\CY3210-PSoCEval1\Board_RevF\Desgin files\PSoCEval1_PDC-9286A.Sch
Title
Size: Number:
Date:
File:
Revision:
Sheet of
Time:
Orcad B
P00
P01
P02
P03
P04
P05
P06
P07
P20
P21
P22
P23
P24
P25
P26
P27
SMP
XRES
1
2
3
4
5
6
7
8
J6
1
2
3
4
5
6
7
8
J7
1
2
3
4
5
6
7
8
J8
P15
P13
P17
P11
P16
P14
P12
P10
VCC
Reset
12
S2
32kHz
Y1
DNP
100pF
C9
DNP
12pF
C10
DNP
VCCVCC
R8
R9
P07
1
P06
27
P05
2
P04
26
P03
3
P02
25
P01
4
P00
24
P27 5
Vref/P26 23
P25 6
AGND/P24 22
P23 7
P22 21
P21 8
P20 20
P17 10
P16 18
P15 11
P14 17
P13 12
P12 16
Xin/Sclk/P11
13
Xout/Sdata/P10
15
SMP
9
Xres
19
Vcc 28
Vss
14
U2
0.1uF,16V
C6
1
2
3
4
5
J11
VCC
ISSP Connector
P11A
P10A
TP4
DNP
330
R10
0
R15
D
1
3
2
J10
Vin
10uF,16V
C8
22uF,10V
C7
TP2
DNP
TP3
DNP
D1
VCC
1
2
+
-
J12
0
R11
Vin
3Vout 4
ADJ
1
U3
750
R13
249
R12
887
R14
1
2
JP3
Install jumper on JP3 for 3.3 Volt operation
1
2
3
4
5
J14
DNP
VCC
Vcc 16
C1+ 1
C1- 3
C2+
4
C2-
5
R1in 13
R2in 8
T1out 14
T2out 7
R1out
12
R2out
9
T1in
11
T2in
10
V+ 2
V-
6
Gnd
15
U1
1
6
2
7
3
8
4
9
5
DB9-F
J1
VCC
VCC
0.47uF,16V
C2
0.1uF,16V
C1
0.1uF,16V
C3
0.47uF,16V
C5
0.47uF,16V
C4
RX
TX
1
2
JP1
DNP
1
2
JP2
DNP
P27
P16
1
2
3
4
J13
CTS
RTS
10uF,16V
C11
Red
LED5
VCC
1K
R1
TP6TP5 TP1 GND
R7
Red
LED4
1K
R5
Red
LED3
1K
R4
Red
LED2
1K
R3
Red
LED1
VCC
1K
R2
1 2
S1
VCC
VCC_EXT
VCC_EXT
1
2
3
4
5
6
7
8
9
10
11
J5
SMP
VCC
R6
P25
P23
P21
P26
P24
P22
P20
Vss
1
Vdd
2
Vo
3
RS
4
R/W
5
E
6
D0
7
D1
8
D2
9
D3
10
D4
11
D5
12
D6
13
D7
14
J9
Small Breadboard
Bread Board
J2
PDC9286 Rev*C
121-28600 Rev*E
S
3
G
1
D2
Q1
PMOS( DMP3098L-7)
220ohm
R16
D2
0
R18
1K ohm
R17
VCCVCC_EXT
S3
G
1
D
2
Q2
PMOS( DMP3098L-7)
S
3
G
1
D2
Q3
PMOS( DMP3098L-7)
CYPRESS ; §§§§§§§§§§§ Q .31" =.§%%%33::§:_é3§:5.=
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 70
Appendix
A.2 Board Layout
Figure A-1. Top Copper Layer
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 71
Appendix
Figure A-2. Bottom Copper Layer
CYPRESS' ' smnmmmnmw . + — “[13:33 I? E‘ xnzsucc E manflMEj ‘3 '(|:‘ .11on Elm] D D g [3“ Mrs JPZ mm E5 Em D E362 n n J11 El; 02 Ll |_| GNDD U] H mm: E [El |c—sn—‘ns v1 Wigs; 1* E E E g ' E cn In: E C‘Sfl‘fgfii ”DDR9 3I I “wmvnvnN—‘D nwmrmwfio nwmv-nmacr P EEEEEEELsEEEEEEEE 933333333 :7 nl | I | | | I I fix J5 W P? 353 ”m 33” an. 53% LEDl IMEIInz LED2 IIEZIM El LED3 Iqum END Lam IIEjns D18 LEA ucc\E_ 3 GND I D En _ END CY3210—PSoCEvd1 "1"!“ r 1“‘|_ [II-u "‘ :5 E '- J 3';- . IGNP I .
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 72
Appendix
Figure A-3. Top Overlay
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 73
Appendix
A.3 Bill of Materials
Item Qty Reference Value Description Manufacturer Manufacturer Part No.
1 1 rev *B PDC-9286 PSoC EVAL1 Board Cypress PDC-9286
2 3 C1, C3, C6 0.1uF,16V Capacitor YAGEO (PHYCOMP) CC0805ZRY5V9BB104
3 3 C2, C4, C5 0.47uF,16V Capacitor MULTICOMP MCCA000287
4 1 C7 22uF,10V Capacitor NICHICON UWX1A220MCL1GB
5 1 C8 10uF,16V Capacitor NICHICON UWT1C100MCL1GB
6 1 C11 10uF,16V Capacitor TAIYO YUDEN EMK316BJ106KL-T
7 1 D1 50V, 1A Schottky Diode DIODES INC. RS1A-13-F
8 1 J1 DB9-F Female DB-9 TE Connectivity//Amp 5747844-2
91J2 - 3M solderless breadboard super
strip 3M 923273-I
10 1 J5 11 Header, 11-Pin 3M 929850-01-36-RA
11 3 J6, J7, J8 8 8-Pin Header, Female 3M 929850-01-36-RA
12 1 J9 14 14-Pin header, Female 3M 929850-01-36-RA
13 1 J10 - Power connector CUI Inc PJ-102A
14 1 J11 5 ISSP connector MOLEX 22-23-2051
15 J12 - 9-Volt battery connector KEYSTONE 593
16 1 J12 - 9-Volt battery connector KEYSTONE 594
17 1 J13 4 Header, 4-Pin 3M 929850-01-36-RA
18 5 LED1, LED2, LED3,
LED4, LED5 Red Red LED LUMEX SML-LXT0805IW-TR
19 5 R1, R2, R3, R4, R5 1K Resistor, SMT PANASONIC ERJ6GEYJ102V
20 1 R6 10K Potentiometer Panasonic EVN-D8AA03B14
21 1 R7 10K Potentiometer BOURNS 3352T-1-103LF
22 2 R8, R9 0 Resistor, SMT PANASONIC ERJ6GEY0R00V
23 1 R10 330 Resistor, SMT PANASONIC ERJ6GEYJ331V
24 1 R11 0 Resistor, SMT PANASONIC ERJ8GEY0R00V
25 1 R12 249 Resistor, SMT PANASONIC ERJ6ENF2490V
26 1 R13 750 Resistor, SMT PANASONIC ERJ6ENF7500V
27 1 R14 887 Resistor, SMT PANASONIC ERJ-6ENF8870V
28 2 S1, S2 - Swtich, SPST OMRON ELECTRONIC
COMPONENTS
B3F-1022
29 3 TP1, TP5, TP6 - Test point KEYSTONE 5006
30 1 U1 3V 3V RS-232 tranceiver (1.0uF
Caps) TEXAS INSTRUMENTS MAX3232IDR
31 1 U2 28 pin 28 pin DIP socket, machine pin MILL MAX 110-99-328-41-001000
32 1 U3 3.3/5V Adjustable Voltage Regulator TEXAS INSTRUMENTS LM317MKTPR
33 1 JP3 2 Header, 2-Pin, Male Sullins Connector Solu-
tions
PBC36SAAN
34 4 N/A BUMPER BUMPER CLEAR
.375X.15"DOME Richco Plastic RBS-12
35 2 JP1, JP2 2 Header, 2-Pin, Male TE Connectivity//Amp 0-0142270-3
NO LOAD Components
36 1 C9 12pF Capacitor PANASONIC ECJ-2VC1H120J
37 1 C10 100pF Capacitor PANASONIC ECJ-2VC1H101J
38 1 J14 - Ground conn. N/A
39 3 TP2, TP3, TP4 - Simple Test point Keystone Electronics 5006
40 1 Y1 32kHz Crystal ECS Inc ECS-3X8
‘3‘CYPRESS‘ ' Ewinnsnmrwumuw
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 74
Appendix
A.4 Replace CY8C29466-24PXI with CY8C27443-24PXI
The CY3210-PSoCEVAL1 kit includes two PSoC parts, CY8C29466-24PXI and CY8C27443-24PXI.
The CY8C29466-24PXI part is placed on the IC socket of the board when shipped. To replace the
default part with CY8C27443-24PXI, follow these instructions.
Use an IC extractor – place the ends of the extractor between the IC and the socket. Gently pull the
IC out evenly, away from the board. If an IC extractor is not available, using a nonmetallic tool, lift
one side of the IC, as shown in Figure A-4. Do not lift the IC completely because this can damage
the pins on the opposite side.
Figure A-4. Lift IC - One Side
Repeat on the other side to lift the silicon from the socket, as shown in Figure A-5.
Figure A-5. Lift IC - Other Side
Place the CY8C27443-24PXI silicon on the IC socket. Ensure that the silicon notch is aligned with
the notch on the IC socket; see Figure A-6. Press down gently to finish the replacement.
eCYPRESS gunmen m mnmw
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 75
Appendix
Figure A-6. Place New Chip
CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide, Doc. #: 001-66768 Rev. *F 76
Revision History
Document Revision History
Document Title: CY3210-PSoCEVAL1 PSoC® 1 Evaluation Kit Guide
Document Number: 001-66768
Revisi
on ECN# Issue Date
Origin
of
Chang
e
Description of Change
** 3150243 01/21/2011 RKPM Initial version of kit guide.
*A 3208590 03/29/2011 RKPM
Updated Code Examples chapter on page 31:
Added “My First Code Example” on page 31.
Other updates to text and figures throughout the document.
*B 3223525 04/11/2011 SASH
Updated Code Examples chapter on page 31:
Updated “My First Code Example” on page 31:
Updated “Project Description” on page 31:
Updated Figure 5-25, Figure 5-26, and Figure 5-29.
*C 3744453 09/14/2012 RKPM Multiple updates throughout the document.
*D 3820101 11/20/2012 ARVI Updated images across the document.
*E 4953267 10/08/2015 DIMA
Updated Introduction chapter on page 5:
Updated “Additional Learning Resources” on page 5:
Updated description.
Added “PSoC Designer” on page 6.
Added “Code Examples” on page 7.
Added “PSoC Designer Help” on page 9.
Added “Technical Support” on page 9.
*F 5753924 09/01/2017 NIBK Updated Cypress Logo and Copyright.
Distribution: External
Posting: None

Products related to this Datasheet

PSOC WITH MINIPROG PSOC EVAL BRD