Cypress Semiconductor PSoCEval User Guide and Example Projects

PSoCEval User Guide and Example Projects
Cypress MicroSystems, Inc.
2700 162nd Street SW, Building D
Lynnwood, WA 98037
Fax: 425.787.4641
1
2
3
TABLE OF CONTENTS
INTRODUCTION TO PSOCEVAL
Introduction to the PsoCEval.....................................3
What Comes with my PSoCEval? .............................4
PSoCEval Power Supply Options..............................6
Introduction to MiniProg ...........................................7
Specications for MiniProg ....................................... 9
Operating Changes to the PsoCEval..........................9
Introduction to Example Projects.............................10
Example #1 ADC Conversion and LCD Display ......................11
Example #2 Blink an LED.........................................................16
Example #3 Output a SINE Wave..............................................19
Example #4 Dynamically Re-congure a PWM .......................24
Example #5 Combine PWMs using Output Logic ....................29
Cypress Support.......................................................32
Welcome to the new exciting world of the PSoCEval!
PSoCEval allows you to evaluate what PSoC has to offer. The board includes an LCD module, potentiometer, LEDs, and plenty of breadboard space. This user guide includes ve different example projects that can be used with the PSoCEval board. The MiniProg can program both the PSoC on your PSoCEval board or on a proto board you might build using a ve-pin header.
The example projects can answer your questions. Want to see how PSoC can talk with an LCD? Hook up the LCD module and output your sensor’s data. Curious how PSoC’s dynamic re-conguration is reshaping how designers do business? Switch back and forth between different types of PWMs. Test both the digital and analog resources of our system-on-a-chip in your application.
Use PSoCEval to gain insight into how the PSoC’s breadth of exibility and functionality can work for you!
4
5
WHAT COMES WITH MY PSOCEVAL?
Please conrm that your kit includes the following items:
PSoCEval Evaluation Board
MiniProg Programmer
LCD Module
CY8C29466-24PXI 28-Pin DIP Sample
PSoC Designer CD
USB Cable
Wire Pack
User Guide
For additional technical information a schematic is available online
at www.cypress.com/ >> Developer Kits.
Regulator
Breadboard
RS232
Transceiver
ISSP Header
Reset
Button
POT
Button
LCD
Contrast
LCD Module
6
7
PSOCEVAL POWER SUPPLY OPTIONS
INTRODUCTION TO MINIPROG
The following are PSoCEval power supply options:
1. Powered by the MiniProg unit.
2. Powered by a 9-12V DC wall transformer with positive tip barrel plug and a 100 mA or higher rating. Recommended model is CUI Inc., EPAS-101W-12.
3. Powered by a 9V battery connected to battery terminals.
4. Powered from the ICE pod in socket.
Only one of the power supplies should be used at a time. Do not use a power supply that is less than 9V or exceeds 12V.
The Cypress MicroSystems MiniProg gives you the ability to program PSoC parts quickly and easily.
It is small and compact, and connects to your PC using the provided USB 2.0 cable.
During prototyping, the MiniProg can be used as an in-system serial programmer (ISSP) to program PSoC devices on your PCB. (See Application Notes AN2014 and AN2026 available online at www.cypress.com for more details.)
For production purposes, it is recommended that you use the CY3207ISSP programmer or a third-party production programmer.
Once the MiniProg is connected, you can use PSoC Programmer software to program. (This free software can either be launched from within PSoC Designer or run as a stand alone program.)
8
9
SPECIFICATIONS FOR MINIPROG
OPERATING CHANGES TO THE PSOCEVAL
The operating temperature of the MiniProg is from 0° C to 50° C.
Always plug the USB cable into the MiniProg before attaching it to the ve-pin header on the board.
When using an ISSP adapter cable with MiniProg, keep the length under six inches 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 congured by the OS. If MiniProg cannot nd the correct driver in the system, this LED will not turn on. After the device has been congured, the LED stays on at about a 4-Hz blink rate. This changes during programming, where the blink duty cycle increases.
The red LED at the bottom turns on when the MiniProg powers the part. The LED is off when power is provided by the target board.
To use an external 32 kHz crystal oscillator, R8 and R9 on the PSoCEval board must be removed. C9 and C10 must be added, with values determined by the type of feedback desired. It is recommended that you use unbalanced feedback, with C9 at 12 pF and C10 at 100 pF. (See Application Note AN2027 online at www.cypress.com for complete details.)
To use PSoCEval at 3.3V, two parts will need to be swapped on the board: the regulator and the RS232 transceiver, shown in Figure 1. Suitable replacements or their equivalents are as follows:
Regulator: TI UA78M33CKTPR (Digikey 296-13425-1-ND)
RS232 Transceiver: Maxim MAC3232CSE (Digikey MAX3232CSE-ND)
10
11
INTRODUCTION TO EXAMPLE PROJECTS
Four Example Projects are described in the following sections. Each section is organized as follows:
EXAMPLE PROJECT #1 ADC CONVERSION
AND LCD DISPLAY
Project Name: ASM_Example_ADC_UART_LCD
Project Name: PSoC Designer project name.
Purpose: Overview of the project.
Implementation: Describes the funtionality.
Connections: Pin connections to wire up the PSoCEval board.
Pictures are included to help you verify your wiring for each project.
Example Code (main.asm): Code to run the project.
The example projects are available in PSoC Designer. To use them, open PSoC Designer and browse to select the correct le. The example projects are found in …\Program Files\Cypress
MicroSystems\ PSoC Designer\Examples. Choose the chip type you
desire and open the project’s .soc le (CY8C29x66 comes with the PSoCEval board).
When using the MiniEval programmer, do not use the “Connect” and “Download” buttons in PSoC Designer. Theys are for use with an In-Circuit Emulator (ICE).
Purpose: To demonstrate the 12-bit incremental ADC by measuring the voltage of the potentiometer, transmitting the conversion result out the UART, and displaying it on the LCD.
Implementation: This project enables the LCD, UART and ADCINC12, and then goes into an endless loop.
In the loop, the ADC status (as it monitors the potentiometer) is checked. If the ADC has completed a conversion, the result is placed in “iResult” and the HEX value is transmitted out the serial port and displayed on the LCD as ASCII text.
The clock divider VC1 provides a sample clock of 3 MHz to the ADCINC12, resulting in a sample rate of 180 samples per second.
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.
Loading...
+ 11 hidden pages