Changing the Embedded WorldTM
PSoC:
Configurable Mixed-Signal Array with On-chip Controller
Objectives
 Cypress overview
 Introduce Cypress MicroSystems &
PSoCTM System on Chip
 PSoC Designer Development Kit
 Demo with Software and Dev. Tool
 Support
 Applications
2
Divisions
CYPRESS
MPD
DCD
TTD
PCD
CMS
Memory
Product
Division
Data
Communication
Division
Timing
Technology
Division
Personal
Communication
Division
Cypress
MicroSystems
• Async SRAM
• Sync SRAM
• NoBL / QDR
• MoBL
• NVM
3
• Specialty Memory
DP-RAM, FIFO
• Communication
• CPLD Ultra 37000
• CPLD Quan. 38K
• CPLD Delta 39K
• HOTLink / PSI
• IP Solutions
• Software Tools
• FTG
• Low Speed USB
• RF PLLs
• Full Speed USB
• HS Clock Control • High Speed USB
• Clock Distribution • USB Hubs
• Spread Spectrum • USB Dev. Tools
• USB Ref. Designs
• WirelessUSB
• Neuron
• PSoC
• Support Tools
• App. Notes
Cypress MicroSystems Strategy
Provide a Single Chip Programmable Solution for
small electronic products
Leveraging Cypress Semiconductors World leader
position in USB – 80% world Market share in the
respective market.
The M8C Core in PSoC is used in the USB product
 Proven Technology – 185+ million M8 microcontrollers
sold
4
Microcontroller Market
Cypress
Cypress Marketplace
Embedded
Cypress
5
Current Embedded Marketplace:
• Each part covers small
functionality
• Families tend to cluster;
second sourcing leads to
overlaps
• Customers believe they
need custom micros
Cypress Strategy:
• Provide part numbers that
each cover MORE
functionality (i.e., cover
hundreds of competitive
devices)
PSoC™ System on Chip
Benefits
What has changed for you?
The search for the perfect part is over
PSoC reduces your system’s parts count
PSoC adapts to changing Customer Requirements
PSoC simplifies purchasing and inventories
Better than a custom part
No NRE
No Waiting
No Minimum quantities
6
Security Sensor Application
Traditional Approach
Competitive Solutions
Op
amp
LP
filter
A/D
Microcontroller
D/A
Sensor
Digital Outputs
LEDs
7
Op
amp
What They can do
We can Do So Much More!
PSoC Microcontrollers
Sensor
Op
amp
LP
filter
A/D
Microcontroller
D/A
Digital Outputs
LEDs
8
Op
amp
Decrease System Costs
Traditional CO Solution
8-bit Micro
$2.00
Crystal + Caps
$0.57
Filters
$0.30
Amps
$0.20
Speaker Driver
$0.15
LED Drivers
$0.05
Circuit Board
$1.20
Assembly
$1.60
System BOM = $6.07
9
Cypress CO Solution
PSoC Micro.
Circuit Board
Assembly
$2.00
$0.90
$1.40
PSoC BOM = $4.30
Parts Reduction
Do you use these external components?








Op Amps and Comparators
PWMs
Filter components
Analog drivers
Transistors / Buffers
External ADC
High speed crystal
Pseudo Random Sequence Generator
These are external components that could
be integrated with a PSoC design
10
Why Choose PSoC?
Parts Reduction
90+ Parts
11
20+ Parts
PSoC = Programmable System-on-Chip
- Create your customized chip
User Defines :
What Functions Appear
When They Appear
How They Interconnect
12
Example of “What Functions Appear”
 One 8-Bit Counter
 One 16-Bit Timer
 One Full-Duplex
UART w/Baud Rate
Generator
 One SPI Slave (Full
Duplex) Controller
 One 4-Input 8-Bit
Delta-Sigma A/D
 One 6-Bit D/A
 One 8-Bit D/A
 Two Low-Pass
Filters (Bi-Quad)
13
Example of “What Functions Appear”
 One 16-Bit Counter
 One 8-Bit PWM
 One Half-Duplex
UART
 One SPI Master
 One 12-Bit
Incremental A/D
 One Low-Pass Filter
(Bi-Quad)
 One 8-Bit D/A
 Two Instrumentation
Amplifiers
14
Example of “What Functions Appear”
Both of these devices are made from the same chip
- PSoC can be defined to meet customer requirements with
Countless configuration possibilities
 One 8-Bit Counter
 One 16-Bit Timer
 One Full-Duplex UART
w/Baud Rate Generator
 One SPI Slave (Full
Duplex)
 One 4-Input 8-Bit DeltaSigma A/D
 One 6-Bit D/A
 One 8-Bit D/A
 Two Low-Pass Filters
15
 One 16-Bit Counter
 One 8-Bit PWM
 One Half-Duplex UART
 One SPI Master
 One 12-Bit Incremental A/D
 One Low-Pass Filter
 One 8-Bit D/A
 Two Instrumentation
Amplifiers
Example of “When They Appear”
Dynamic Re-Configurability means both devices can be
the SAME CHIP at DIFFERENT TIMES in the SAME
APPLICATION
 One 8-Bit Counter
 One 16-Bit Timer
 One Full-Duplex UART
w/Baud Rate Generator
 One SPI Slave (Full Duplex)
 One 4-Input 8-Bit DeltaSigma A/D
 One 6-Bit D/A
 One 8-Bit D/A
 Two Low-Pass Filters
16
 One 16-Bit Counter
 One 8-Bit PWM
 One Half-Duplex UART
 One SPI Master
 One 12-Bit Incremental A/D
 One Low-Pass Filter
 One 8-Bit D/A
 Two Instrumentation
Amplifiers
Dynamic Reconfiguration
23 Hours 59 minutes per day
 Accepts Money
 Distributes Beverages
A few seconds each night
 Dynamically reconfigures into a 300
baud Modem
 Transmits coin, beverage and
maintenance status to central office
Benefits
 Only cost delta is phone interface
 Increased machine profitability
17
Example of “How They Interconnect”
 An 8-Bit Counter
 Counts positive edges on pin 4
 Sets pin 25 high after 10 edges
Same 8-Bit Counter Later
INPUT
OUTPUT
INPUT
OUTPUT
INPUT
OUTPUT
 Counts positive edges on pin 8
 Sets pin 21 high after 15 edges
Same 8-Bit Counter Finally
 counts positive edges on pin 13
 Sets pin 16 high after 77 edges
18
World-Class MCU Features
 24 MHz/4 MIPs Operation at 5V
 12 MHz Operation at 3.3V
 Single-cell (1.2V to start) Operation at up to 24MHz
 With Built-in Voltage Pump and Three Passive
Components
 Eight-Level Low Voltage Detection/Alert
 Built-In Multiply-Accumulate Hardware (MAC)
 8 X 8 Multiply, 32-Bit Accumulate
 Answer Available Immediately on Next Instruction Cycle
 2.5% Accurate Oscillator with no ext. Components
 PLL for Precise Time-base With Inexpensive Watch
Crystal
 Flexible Sleep Modes, as Low as 5μA in Standby
19
World-Class MCU Features
 All Flash Program Memory (4 to 16 Kbytes)
 EEPROM Emulation in Flash
 Four Memory Protection Modes
 Allows Factory or Field Upgrade on Individual 64-byte
Blocks
 From One Block up to the Entire Flash Memory Protectable
 Robust Read/write Protection Algorithm for Added Security
 In-System Programmable
 Supports Production Test/Calibration Re-Programming
 Supports Field Upgrade of firmware or configuration
20
World-Class MCU Features
 Configurable I/O Pins
 Every Pin Can Source 10mA and Sink 25mA
 Integrated/Selectable Pull-up and Pull-down Resistors
 Selectable as Interrupt Source on Either Edge or Change in
State
 8 Muxable Analog Inputs (except 8-pin device)
 Up to 4 Analog Outputs w/ 40mA Integrated Drive
 4 Direct Input Analog Lines (except 8-pin and 20-pin devices)
21
PSoC Blocks
Analog
PSoC Blocks
Programmable
Interconnect
X1
X2
32 kHz Crystal
Oscillator
Internal 32 kHz
Oscillator
Watchdog
Timer
Sleep
Timer
Precision Oscillator
and PLL
Temperature
Sensor
Low Voltage
Detection
Power-on-Reset
Control
Addr/Data
Interrupt
Controller
SRAM
Addr/Data
Internal Address/Data Bus
Voltage
Reference
Internal Address/Data Bus
Programmable
SystemonChip
Blocks
FLASH
Program
Memory
PSoC Blocks
M8C
8-Bit
Microcontroller
Core
Digital
PSoC Blocks
Decimator
MAC
Multiply/Accumulate
General Purpose
I/O
Internal I/O Bus
Pin by Pin Configurable
I/O Transceivers
Total I/O Pin Count
Varies by Device
22
PSoC BlocksThe Underlying Hardware
Analog Blocks (12)
Digital Blocks (8)
 Three Types
 Two Types
Continuous Time (4)
Basic Type (4)
Switch Capacitor A (4)
Communications Type (4)
Switch Capacitor B (4)
 Programmed at the
Function Level
 Not programmable at the Gate
Level
23
Digital PSoC Blocks
Eight 8-Bit Digital PSoC Blocks Available
Four Digital Comm Blocks
All Basic functions, plus
SPI Master
SPI Slave
I2C
IrDA
CRC16
Async Rx
Async TX
UART
 Four Digital Basic Blocks
 Timer, Counter, PWM
 Dead Band Generator (2
Phase Underlapped Clock)
 Pseudo Random Source
(PRS)
 Cyclic Redundancy Check
Generator (CRC)
DR0
DR1
DB
DB
DR0
DB
DR1
DI
IN
PROC
DATA
DO
CLK
CLK
CLKS
COMM
ONLY
INPUT
REG
CR1
CONFIG
TIME, CTR, CRCPRS, UART, ETC
24
DB
DI
DO
OUT
PROC
TXD
RXD
DR2
TXD
CLK
RXD
COMM
ONLY
Analog PSoC Blocks
Port Inputs
CC
Bloc Outputs
OBUS
PWR
CP
CK
AGND
 Amplifiers
 Comparators
 Filters: 2, 4, 6 pole
LP,BP,HP,Notch
 ADCs: Incremental, D-S, SAR
 DACs
CEN
VREF
CBUS
P[2:0]
VDD
N[2:0]
F2
OBUS
G
OS
Bloc Inputs
OUT
AGND
VREFS
RESISTOR
MATRIX
GOUT
LOUT
G
P(IN)
AGND
VREFVREF+
T[2:0]
R
F[1:0]
CT Bloc
AGND
SC Bloc
VSS
Continuous Time
f1*AZ
CC
0-31 C
CF
16-32 C
CC
Inputs
A.IN
REF Inputs
CARR
(f2+!AZ)*F.IN1
f1*AZ
A.IN
f1*F.IN0
C.IN
CA Inputs
CC
0-31 C
f1
CA
0-31 C
SN
CA Inputs
f2+AZ
REF Inputs
OS*f2B
f2
OBUS
f1*!AZ
f1
f2
f2
A.REF
CB Inputs
f2+!B.SW
CS
CB
0-31 C
CBUS
(f2+!AZ)*F.IN1
f1*F.IN0
f1*!AZ
CB
0-31 C
f2+!B.SW
CB Inputs
PWR
B.IN
B.IN
f2+AZ
CF
16-32 C
A.SIGN
A.SIGN
A.REF
CA
0-31 C
OS*f2B
f1*B.SW
OBUS
f1*B.SW
f1
CS
CBUS
PWR
Switched Cap A
25
Switched Cap B
User Modules
 User Module =
Pre-configured Digital and Analog PSoC Blocks
 Analogous to an On-chip Peripherals
 Timer- Counters – PWM’s
 UART – SPI
 A/D –DAC’s - SAR
 Defines the Register Bits for Initial Configuration
 Selected via Double Click in IDE
 User Modules Include
 Application Programmer Interfaces (APIs)
 Interrupt Service Routines (ISRs)
 Specific UM Data Sheets
26
Digital User Modules




8, 16, 24, 32-bit Timer
8, 16, 24, 32-bit Counter
8, 16-bit PWM
8, 16-bit Dead Band Generator
(2 Phase Underlapped Clock)






27
Pseudo Random Source (PRS)
Cyclic Redundancy Check (CRC) Generator
SPI Master
SPI Slave
Full Duplex UART
IrDA receiver and transmitter
Analog User Modules
 A/D Converters







8-bit Successive Approximation
8-bit Delta Sigma
11-bit Delta Sigma
12-bit Incremental
7-13 bit Variable Incremental
Dual input 7-13 bit Variable Incremental
Tri input 7-13 bit Variable Incremental
 D/A Converters
 6, 8, and 9-bit
 6 and 8 bit multiplying
 Filters
 2-pole Low-pass filter
 2-pole Band-pass filter
 Amplifiers
 Programmable Gain Amplifier
 Instrumentation Amplifier
 Inverting Amplifier
 Programmable Threshold Comparator
 DTMF Dialer
28
Software User Modules/
Reference Designs
Software User Modules:
 I2C Master
 I2C Slave
 EEPROM
 LCD – Interface for Hitachi HD44780 controller
Reference Design (hard- and software) :




29
LIN-Bus controller
300 Baud modem
Electronic Ballast For Fluorescent Lamps Q2 2003
Power Line Modem 2400 BAUD Q2 2003
Product Family
Flexible, Highly Integrated SOC, Cost-competitive Solution
Single
Flash
RAM Battery
Marketing Part No.(Kbytes) (Bytes) Pump Package
CY8C25122-24PI
4
N
PDIP
256
CY8C26233-24PI
8
256
Y
PDIP
CY8C26233-24SI
8
256
Y
SOIC
CY8C26233-24PVI
8
256
Y
SSOP
CY8C26443-24PI
16
256
Y
PDIP
CY8C26443-24SI
16
256
Y
SOIC
CY8C26443-24PVI
16
256
Y
SSOP
CY8C26643-24PI
16
256
Y
PDIP
CY8C26643-24PVI
16
256
Y
SSOP
CY8C26643-24AI
16
256
Y
TQFP
31
Pins
8
20
20
20
28
28
28
48
48
44
PSoC Microcontroller
Families
CY8C25xxx/26xxx





8 Digital PSoC blocks
12 Analog PSoC blocks
16k Flash
128-256 bytes SRAM
6-44 IO
 CY8C24xxx
CY8C27xxx
Improvements:
- Analog
- Digital
 4 Digital PSoC blocks
 6 Analog PSoC blocks
 4k bytes Flash
 256 bytes SRAM
 6-16 IO
 CY8C21xxx
 4 Digital PSoC blocks
 12bit ADC
 4k bytes Flash
 256 bytes SRAM
 6-16 IO
32
Sample Roadmap
CY8C21xxx
CY8C21xxx
CY8C27643
Functionality
CY8C26643
CY8C21xxx
CY8C27443
CY8C26443
CY8C27233
CY8C26233
CY8C27122
CY8C25122
Current
Q2 2003
Q4 2003
Q3 2003
CY8C24xxx
CY8C24xxx
Development
34
Objectives
 Cypress overview
 Introduce Cypress MicroSystems &
PSoCTM System on Chip
 PSoC Designer Development Kit
 Demo with Software and Dev. Tool
 Support
 Applications
35
PSoC
Designer
Integrated Development Environment
-
Device Editor
Application Editor
C Compiler
Assembler
Librarian
- Debugger
36
PSoC Designer
Device Editor – Modes of Operation
Device Editor has Three Windows of Operation
 Selecting
User Modules
 Placing
User Modules
 Specifying
Pin-out
37
Device Editor - The End Result
User Clicks “Generate Application” Icon
The Software Takes All User Inputs;
- Generates files specifying the
configured device
- Sets up the source files for the
project application code
- Moves the user to Application
Editor to start coding
- Creates a custom configuration sheet
based on your inputs – Your custom
“data sheet”
38
Software IDE Application Editor
For Users to Write Code
For Users to Assemble/Compile Code
- View and edit
individual source files
- Set and remove
bookmarks (Editing
tool)
- Set and remove
breakpoints
(Debugging tool)
- Assemble/compile
individual files
- Build entire project
including
assemble/compile* all
flies in project
- Source line error
pointer
39
*The C compiler needs to be enabled for use
PSoC Designer C Compiler
The CY3202-C compiler is fully integrated into the
PSoC Designer IDE. PSoC Designer supports C
source level debugging. In order to activate the
compiler, you must enable an upgrade.
Features Include:
• ANSI C Compiler
• Supports Inline Assembly and Can Interface with
Assembly Modules
• Integrated code compressor
• Modern Stack-Based Architecture
• 7 Basic Data Types Including IEEE 32-Bit Floating Point
• Assembler and Linker
• Math and String Libraries
• C Interrupt Service Routines
• Librarian
40
Software IDE Debugger
Interface to ICE Unit
- View contents of
Register and
Memory spaces
- Change the
contents of these
spaces
- Connect to ICE
- Run/Halt /Single
Step
- Set breakpoints and
event points
- Capture trace
41
Development Kit
CY3205-DK Basic
Development Kit
 Kit includes
everything to
support the 28-pin
PDIP package
 Price: $248
42
PSoC ICE Pod Kits
Pup
Smallest POD on the market fits
customer PCB better.
Pod
Versions are available for all
device/package types
Mask
Foot
43
Sold separately to support
various pin-outs
Every part type/package type has
a pod/foot
What is a Y-programmer ???
 Programmer board with socket available for
each package type
 Connects to ICE
44
Objectives
 Cypress overview
 Introduce Cypress MicroSystems &
PSoCTM System on Chip
 PSoC Designer Development Kit
 Demo with Software and Dev. Tool
 Support
 Applications
45
PSoC Microcontroller Design Flow
Determine system requirements
Choose User Modules
Place User Modules
Set global and User Module parameters
Define the pin-out for the device
Generate the application
Review generated code
Demonstrate working configuration
46
Our Project Requirements:
Blink two LEDs at approx 2Hz, with duty cycle of 40%
and 20%
Implementation:
Create An MCU with Two Pulse Width Modulators:




47
Select Two PWM User Modules
Set the PWM parameters
Initialize the global clocks
Connect the PWM outputs to the PSoC Pup LEDs
Our Project Implementation:
Use on chip clock resources (24V1, 24V2)
to generate clocks for selected User Modules
P2[2]
16-bit
PWM
÷ 65535
(93kHz)
(1.5MHz)
24MHz
÷16
(1.4Hz)
÷16
24V1
24V2
P2[3]
16-bit
PWM
PSoC devive
÷ 65535
(1.4Hz)
Pup
board
48
Let’s Create Our Project
Start PSoC Designer
Click Start New Project
Select Create a new Configuration
Type in the name GettingStarted
 Set destination directory
Desktop/default or select one
49
Let’s Create Our Project
Select the Base Part
 View the drop-down menu and the catalog
 We’ll use CY8C26443-24PI (28 PDIP, same as the pod)
50
Let’s Create Our Project
Select Project’s Language
 Assembly and C languages available, (C, only if enabled)
 We’ll choose assembly
51
Select User Modules
Explore the “Select” Mode of Device Editor




User Module Catalog ( tabs on left side of screen)
Resource Manager (right side of screen)
User Module Data Sheet Viewer (bottom middle of screen)
Adding, Deleting, User Module Instances
Select User Modules for this Project
Go to the indicated tab section and double-click
 PWMs tab,PWM16 : An 16-bit Pulse Width Modulator
 Repeat the selection and Select a second PWM16
52
Place User Modules
Explore the “Place” Mode of Device Editor




Next Position icon
Selecting the “Active” UM block
Place Here icon
Unplace icon
Place User Modules for this Project
 STOP!
 How do I know where to place the User Modules?
 How does PSoC Designer help me?
53
How to Place User Modules
Try-out the modules individually first
 See how restrictive they are, then return to place
PSoC Designer will only allow the modules to be placed where
the chip can support them
PSoC Designer will not prevent a placement that may create a
conflict for resources
 Example: If you have an ADC and temperature sensor, they both
use the comparator bus. There is only one comparator bus per
column, therefore these two UMs must reside in separate
columns in order to be used simultaneously.
Read the UM Data Sheets for details
Use the Cypress MicroSystems Online Resources
 www.cypressmicro.com/support
54
Place User Modules
Place the two selected UM’s in the default positions.
PWM16_1 – Digital Blocks DBA00/DBA01
PWM16_2 – Digital Blocks DBA02/DBA03
Recommend to put the PWM’s in the Basic Digital Blocks to
Save the Digital Com Blocks
55
Configure Global Resources
CPU_Clock: Set to 12MHz
32K_Select: Set to Internal
 Not using an external crystal
PLL_MODE: Set to Disable
 PLL can only be enabled when 32K_Select is External
(crystal)
Sleep_Timer: Set to the default value of 512_Hz.
24V1= 24MHz/ N: Set to 16
 This divides 24MHz by 16 = 1.5MHz
24V2=24V1/N: Set to 16
 This divides the 24V1 by 16 (1.5MHz/16=94kHz)
Analog Power: Set to SC On/Ref Low
 This is required to power up any of the analog blocks,
depending on the number of analog functions. A Ref
Med or Ref High may be required (and will increase
power consumption)
56
Configure Global Resources
Ref Mux: Set to (Vcc/2) ±Bandgap (the default)
Op-Amp Bias: Set to Low (the default)
 This is not recommended as anything but low
A_Buff_Power: Set to Low (default)
 This selects the power level of the analog output buffer
 There is a tradeoff between drive output
power and power consumption.
Low is adequate for most projects
SwitchModePump: Set to Off
VoltMonRange:
Set to 5.0V
VoltMonThreshold: Set to 80%
57
Configure User Modules
PWM_1: We want to generate a 1/5 duty cycle
User module parameters can be configured in two ways:
through the GUI or through the User Module Parameters
window. In this class we will use the User Module Parameters
window in the left bottom corner.
-
58
Set Clock to 24V2 (94kHz)
Set Enable High to keep the PWM always running
Set Period to 65535 (1.4Hz)
Set PulseWidth to 13107
Compare Type Less Then Or Equal
Interrupt Type Terminal Count
Set Output to Global_OUT_2
Configure User Modules
PWM_1: We want to generate a 1/5 duty cycle
59
Configure User Modules
PWM_2: We want to generate a 2/5 duty cycle
-
60
Set Clock to 24V2 (94kHz)
Set Enable High to keep the PWM always running
Set Period to 65535 (1.4Hz)
Set PulseWidth to 26214
Compare Type Less Then Or Equal
Interrupt Type Terminal Count
Set Output to Global_OUT_3
Interconnect Blocks
to Resources
What interconnection possibilities are there?
Device Inputs
Device Outputs
Clocks
Block-to-block
When you specify a PSoC block connection to a
pin you are making a physical connection to the
hardware of the PSoC device.
61
Define the Pin-out
What pins need to be defined?
 UM Inputs
 UM Outputs
 General Purpose IO
 Block-to-block
What pin-out options are there?
 Permanent vs. test/debug
What happens as pins are defined?
Pin-out our project
 LEDs
 SignalOut
62
Interconnect Blocks
to Resources
Connect PWM_1 output to the pins
We have already enabled the output from block Global_Out_2
Go to Pin 21 (Port_2 Bit 2) Enable the Port 2_2 (top choice) pin
and then Chose Global_OUT_2 (strong)
This will result in turning the pin dark red for Global Out
Port 2 is connected to the LEDs on the Pup board.
63
Interconnect Blocks
to Resources
Connect PWM_2 output to the pins
We have already enabled the output from block Global_Out_3
Go to Pin 7 (Port_2 Bit 3) Enable the Port 2_3 pin and then
select Global_OUT_3 (strong)
This will result in turning the pin dark red for Global Out
Port 2 is connected to the LEDs on the Pup board.
64
Configuration Complete!
Save project- Go to File tab
Now What? Where are we?
Time to Generate Application
 All settings used by PSoC Designer
to create the boot-up code to configure
the registers at reset
 ISRs are created (but not updated)
 APIs are created or updated
 Device Data Sheet generated
You must Generate Application whenever changes are made
to the configuration
Now switch to the Application Editor view
65
Time to Create
Application Code
PSoC Designer creates application code for the user based
on the inputs from the Device Editor configurations.
View the files on the left side of the
application window. All interrupt routines,
header files, include files, configuration
tables.
Application code for using the selecting
User Modules can be used as supplied or
modified by the user.
66
Create Application Code
Open the PWM16_1.asm file
Select the PWM16_1_Start line routine and copy and paste it
into the main.asm file
Open the PWM16_2.asm file
Select the PWM16_2_Start line routine and copy and paste it
into the main.asm file
export _main
_main:
; Insert your main assembly code here.
call
PWM16_1_Start
call
PWM16_2_Start
ret
67
Create Application Code
68
Build Project
Assembles code, links, and locates
Can individually assemble files as well
Explore Application Editor Features
 Project file management (view/add/delete files)
 Finding compilation errors
69
Execute Project
Within Debugger
Switch to the Debugger – What’s Different?
 Looks like Application Editor, but files are
read-only
Connect to the ICE
Download the project to ICE
70
Execute Project
Within Debugger
Select the green arrow – Go button
The two LED’s should flash at rotating rates
Let’s set a breakpoint on the first line of
code in the main.asm routine
71
Execute Project
Within Debugger
72
Execute Project
Within Debugger
Select the green arrow – Go button
The program will stop at the first call to Start the
PWM
Use the Step function (First blue arrow) to step
through the assembly code.
Observe the LED’s
73
Execute Project
Within Debugger
74
Objectives
 Cypress overview
 Introduce Cypress MicroSystems &
PSoCTM System on Chip
 PSoC Designer Development Kit
 Demo with Software and Dev. Tool
 Support
 Applications
75
On-line Support
Self help knowledge base
Submit online applications
support with a 4 hour
response guarantee
 Community PSoC forum
76
Additional Support Resources
www.cypressmicro.com
Application Notes
Reference Designs
Cypress Field Application Engineers
Cypress Design Center Engineers
77
Tele-Training
 Live Classes 4 Day’s a Week
 Actual design projects completed in the
two hour classes with high quality
presentation and full documentation
 Taught by Factory PSoC Experts
 Classes for all levels of Experience
78
External Design Resources
 Over 140 Design Consultants are enrolled in the
Cypress MicroSystems program.
 Contact information and a short bio can be found at
either page listed here:
www.cypress.com/support/cypros.cfm
 Full Consultant Support Program
 Factory Training
 Monthly Newsletter
 Free Tools, Samples, Software
79
Objectives
 Cypress overview
 Introduce Cypress MicroSystems &
PSoCTM System on Chip
 PSoC Designer Development Kit
 Demo with Software and Dev. Tool
 Support
 Applications
80
Application - Examples
81
Reference Design
Lin Bus
Reference
Design
Available Now!
82
LIN Bus Reference Design
Overview
LIN bus reference design created jointly by Cypress
Microsystems and Crealie Logiciel Enfoui
 Includes hardware board
 Includes all software
 Includes PSoC configurations for master and slave nodes
Demonstrates the use of PSoC in LIN applications
Has 1 master node, and 2 slave nodes
Passes simple messages to light LEDs
Packaged into reference design kit with all documentation
($195 US)
83
Lin Bus Demonstration Board
84
Reference Design
Power Line Modem
2400 BAUD, EN50065-1
Compliance and a spare
microcontroller
Remote monitoring / control applications
Thermostat
Lighting
Replace DALI in ballast
85
PSoC Solution
AC Line interface standard passive design
Filters are clock synchronous
S+K filter uses 4 external parts
12.0 MHz oscillator
 External replaced by on-chip PLL
COMP
BPF2
UM
AC Hot
BPF2
UM
BPF2
UM
LPF2
UM
AC Neut
PWM
/12
3*SPIS
Delay
Clk
PWM
/12
Ext
12.0 MHz
Osc
86
PWM
/100
L.O.
120 kHz
UART
Rx
PGA
COMP
Reference Design
(CY3220BALLAST-RD)
Electronic Ballast
For Flourescent Lamps Using PSoC
PSOC is ideal for
electronic ballasts:
control the lamp drive circuit
can also add connectivity.
Benefits:
Reduced circuit complexity/
lower build cost.
Digital dimming, networking.
Better “manufacturability” as
PSOC ballasts are the first
TRUE digital ballasts.
87
Competitive Solution
Current Best Competitive Ballast
Implementation
MCU
$1.20
Ballast Controller IC
$2.50
Power Factor Chip
$0.75
Other Components
$8.55
Total ballast cost
$13.00
STUFF all this into a single low
cost PSoC
88
PSoC Value Solution
Current Best Competitive Ballast
Comparison
MCU
$2.20
Transistor Driver IC
$.45
Power Factor Chip
$0.75
Other Components
$7.80
Total ballast cost
$11.20
PSoC costs more than the MCU it
replaces, but the overall BOM
cost goes down
89
Important Features for Ballast
Reference Designs
Drives one or two lamps, T8 or T5
Low total harmonic distortion
High power factor >= 98%
Standby power less than 1W
Inherent transistor protection
Dimming range 0.1-100%
Timed pre-heat of filaments
Missing lamp detection
Short/open detection on four filaments
DALI communication (Digital Addressable Lighting
Interface) serial communication standard for
remote monitoring and control of lighting systems
90
PSoC Applications
Tachometers
Traditional tachometer implementation
Sensor Amplifier
$0.35
MCU
$1.00
Display driver
$0.75
GPIO @ $0.05/button
$0.10
Integrated Crystal
$0.15
A/D Converter
$0.75
EEPROM
$0.35
Total traditional cost
Industry tachometer
examples
91
$3.45
STUFF all this into a single low cost
PSoC
PSoC Applications
Tachometers
Traditional tachometer implementation
PSoC
$2.00
MCU
$0.00
Display driver
$0.00
GPIO @ $0.05/button
$0.00
Integrated Crystal
$0.00
A/D Converter
$0.00
EEPROM
$0.00
Total PSoC cost
Industry tachometer
examples
92
$2.00
Tachometer Block Diagram
Display
Driver
EEPROM
Real Time
Clock
PWMs
PSoC
PSoC
Core Tachometer function
8 bit
Counter
I2C
MPU
600 kHz
Timer Value
30 kHz
8 bit
Count
30kHz
8 bit
TACH
timer
HW Capture
Comparator
MPU
TACH_1
PGA
Tach
A=1
93
Charge Pump for Ultra
Low Voltage Operation
2-Pole low
pass filter
More
Filters,
Amplifiers,
A/D
converters if
needed
Clocks for
external use
Random
Number
Generators
PSoC Application
Motor Control
Fan Motor
PSoC
Thermistor
Temperature
PSoC
PGA ADC LUT
TIMERS
94
Temperature
Speed
PWM
UART
Mode Control
RS-232
PSoC user modules
PWM_8
 Drives motor
UART
 Used to upload speed value to PC and download mode
to the PSoC
Baud rate clock
 57.6 kb/s
Communication interval timer
 2 Hz interrupt. Loads speed value into UART, updates
PWM.
PGA
 Connects thermistor network to ADC.
Delta-Sigma ADC
 Converts thermistor input.
95
PSoC firmware
LUT A
 Contains gain so that small temperature change results
in large change in fan speed.
LUT B
 Manual mode, increase in PWM duty cycle proportional
to movement of slide control in Lab View.
UART Interrupt Service Routine (ISR)
 Eliminates polling that may waste throughput.
Communication timer ISR
 2 Hz, updates PWM compare register, sends PWM duty
cycle to Lab View.
Main
 Initialize user modules, handles commands from Lab
View
Design will run without PC communication link
96
PSoC Applications
Magnetic Card Reader
Traditional one or two channel
magnetic card reader implementations
Sensor Amplifiers
$0.50
MCU
$1.00
Display driver
$0.75
GPIO @ $0.05/button
$0.10
Integrated Crystal
$0.15
A/D Converter
$0.35
EEPROM
$0.35
Total traditional cost
Industry examples
97
$3.20 to $15 depending
on application
STUFF all this into a single low cost
PSoC
PSoC Value
Traditional mag card implementation
PSoC
$n.nn
MCU
$0.00
Display driver
$0.00
GPIO @ $0.05/button
$0.00
Integrated Crystal
$0.00
A/D Converter
$0.00
EEPROM
$0.00
Total PSoC value
Industry examples
98
$3.20 to $15
Customers’ cost are also
reduced by fewer components,
ease of manufacturing, shorter
development time, and leverage
with the reuse of PSoC!
Magnetic Card Reader Block Diagram
Display
Driver
EEPROM
Real Time
Clock
x16
x10
100
PWMs –
Motor Drive
Charge Pump for Ultra
Low Voltage Operation
I2C
Bit Timer 1
Ref
Lo
Core Mag Reader
10K
33K
Comparators
PWM-1
470pF
0.1uF
Dual
Magnetic
Head
x16
100
10K
Ref
Hi
x10
UART
Baud Rate
Generator
Ref
Lo
33K
Tx
Out
Comparators
PWM-2
470pF
99
0.1uF
Ref
Hi
Bit Timer 2
PSoC
PSoC Application
Pyroelectric Motion Detector
Traditional PIR detector implementation
Sensor Amplifier
$0.35
MCU
$1.00
Relay Driver
$0.35
GPIO @ $0.05/button
$0.10
Integrated Crystal
$0.15
Comparator
$0.20
EEPROM
$0.35
Total PSoC cost
Industry PIR Detection
examples
100
$2.50
PSoC Value
Traditional PIR detector implementation
Sensor Amplifier
$0.00
PSoC
$n.nn
Relay Driver
$0.00
GPIO @ $0.05/button
$0.00
Integrated Crystal
$0.00
Comparator
$0.00
EEPROM
$0.00
Total PSoC value
$2.50
STUFF all this into a single low cost
PSoC
Industry PIR Detection
examples
101
75% of the Analog blocks and 61% of
the digital block still available for free
product enhancement.
PIR Detector Block
Diagram
Display
Driver
EEPROM
Real Time
Clock
PWMs
Charge Pump for Ultra
Low Voltage Operation
I2C
Core PIR function
MUX
PIR
Element
PGA
PGA
ADCINC
13Bit @
240 sps
Alarm
MCU
More
Filters,
Amplifiers,
A/D
converters if
needed
Clocks for
external use
Random
Number
Generators
PSoC
102
Customer Example Precision Solar
Their Business
 Highway signs
Benefits They Cared About
 “The perfect fit MCU”
 Low cost / high function
tools
 Excellent application
support
Successful Sales Strategy
 Distributor identified/ Rep
made it happen
 Had their schematic
analyzed by CMS
applications
103
Customer Example – Wildseed/Elektrobit
Their Business
 Cell phone with “skin”
 Adapt phone to market
Benefits They Cared About
 Wide range of peripheral
functions
 Ability to add features to
their product
 Ability to offload main
processor
Successful Sales Strategy
 Distribution presentation
to start the process
 Training to reduce time to
productivity
 Support for the consultant
doing the design
104
Customer Example Dynalite
Their Business
 Commercial lighting
components
Benefits They Cared About
 Flexibility
 Analog integration
Successful Sales Strategy
 Lots of persistence and
hard work by distributor
 Range of capability of
PSoC
105
Customer Example - Eaton
Their Business
 Inductive sensors
Benefits They Cared About
 Integration/board size
reduction
 Common platform
requirement
Successful Sales Strategy
 Aligning customer with
consultant
 Support for entire
application,not just PSoC
106
Customer Example Teleflex
Their Business
 Marine and truck gauges
Benefits They Cared About
 Inventory reduction
 400 gauges replaced
 Board diversity reduction
Successful Sales Strategy
 Distribution partner
support
 Consultant instrumental in
PSoC choice.
 Great support for the
customer and consultant
107
Customer Example – Icon
Their Business
 Fitness equipment
Benefits They Cared About
 High integration
 Cost reduction from part
reduction
 Flexibility/customizability
Successful Sales Strategy
 Hands-on full day training
 Great support
 Competitive pricing
108
Customer Example – CKesp
Their Business
 Facial Massagers
Benefits They Cared About
 Single Hardware platform
 High integration
 Cost reduction from part
reduction
Successful Sales Strategy
 Support for the consultant
doing the design.
 PSoC Sales Champion in
the UK
109
Descargar

files / File /PSOC