Transcript files / File /PSOC
Changing the Embedded World TM
PSoC:
Configurable Mixed-Signal Array with On-chip Controller
2
Cypress overview
Introduce Cypress MicroSystems & PSoC TM System on Chip
PSoC Designer Development Kit
Demo with Software and Dev. Tool
Support
Applications
Objectives
Divisions
CYPRESS 3 MPD Memory Product Division
• • • • •
Async SRAM Sync SRAM NoBL / QDR MoBL NVM DCD Data Communication Division TTD Timing Technology Division PCD Personal Communication Division
•
Specialty Memory
• • • • • • •
DP-RAM, FIFO Communication CPLD Ultra 37000 CPLD Quan. 38K CPLD Delta 39K HOTLink / PSI IP Solutions Software Tools
• • • • •
FTG RF PLLs HS Clock Control Clock Distribution Spread Spectrum
• • • • • • • •
Low Speed USB Full Speed USB High Speed USB USB Hubs USB Dev. Tools USB Ref. Designs WirelessUSB Neuron CMS Cypress Micro Systems
• • •
PSoC Support Tools App. Notes
Cypress MicroSystems Strategy
4 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
5 Cypress Cypress
Microcontroller Market
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
6
What has changed for you?
The search for the
perfect part PSoC reduces
is over 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
7
Security Sensor Application Traditional Approach
Competitive Solutions Op amp Sensor LP filter A/D Microcontroller D/A Digital Outputs Op amp LEDs
8
What They can do We can Do So Much More!
PSoC Microcontrollers Sensor Op amp LP filter A/D Microcontroller D/A Op amp Digital Outputs LEDs
Decrease System Costs
9
Traditional CO Solution
8-bit Micro Crystal + Caps Filters Amps Speaker Driver LED Drivers Circuit Board $2.00
$0.57
$0.30
$0.20
$0.15
$0.05
$1.20
Cypress CO Solution
PSoC Micro.
Circuit Board Assembly $2.00
$0.90
$1.40
PSoC BOM =
$4.30
10
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
Why Choose PSoC?
Parts Reduction
11
90+ Parts 20+ Parts
12 PSoC = Programmable System-on-Chip
- Create your customized chip User Defines :
What
Functions Appear
When
They Appear
How
They Interconnect
13
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 )
14
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
15
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 Delta Sigma A/D One 6-Bit D/A One 8-Bit D/A Two Low-Pass Filters 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
16
Example of “When They Appear”
Dynamic Re-Configurability
means both devices can be the
SAME CHIP
at
DIFFERENT TIMES 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 Delta Sigma A/D One 6-Bit D/A One 8-Bit D/A Two Low-Pass Filters in the
SAME
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
17
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
Example of “How They Interconnect”
18
An 8-Bit Counter
Counts positive edges on pin 4
Sets pin 25 high after 10 edges
Same 8-Bit Counter Later
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
INPUT INPUT INPUT OUTPUT OUTPUT OUTPUT
19
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
20
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
21
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)
PSoC Blocks
Programmable S ystem o n C hip Bloc ks
X1 X2
FLASH Program Memory
Voltage Reference 32 kHz Crystal Oscillator Internal 32 kHz Oscillator Watchdog Timer Sleep Timer
SRAM M8C 8-Bit Microcontroller Core
Precision Oscillator and PLL Temperature Sensor Low Voltage Detection Power-on-Reset Control Addr/Data Interrupt Controller Addr/Data PSoC Blocks
Analog PSoC Blocks
Programmable Interconnect
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
23
PSoC Blocks The Underlying Hardware
Digital Blocks (8)
Two Types Basic Type (4) Communications Type (4) Programmed at the
Analog Blocks (12)
Three Types Continuous Time (4) Switch Capacitor A (4) Switch Capacitor B (4
)
Function Level Not programmable at the Gate Level
Digital PSoC Blocks
Four Digital Basic Blocks
Timer, Counter, PWM
Dead Band Generator (2 Phase Underlapped Clock)
Pseudo Random Source (PRS) Eight 8-Bit Digital PSoC Blocks Available Cyclic Redundancy Check Generator (CRC)
Four Digital Comm Blocks
All Basic functions, plus
SPI Master
SPI Slave
I 2 C
IrDA
CRC16
Async Rx
Async TX
UART DATA CLKS INPUT REG DR1 DB DR0 DB DR1 IN PROC DI DR0 DO CLK CLK TXD RXD COMM ONLY CR1 CONFIG TIME, CTR, CRCPRS, UART, ETC DB DI DO OUT PROC CLK TXD RXD COMM ONLY DR2 DB 24
25
Analog PSoC Blocks
Amplifiers Comparators Filters: 2, 4, 6 pole LP,BP,HP,Notch ADCs: Incremental,
D-S
, SAR DACs CC Inputs C.IN
A.IN
CA Inputs REF Inputs A.SIGN
A.REF
CB Inputs B.IN
CC 0-31 C
f
1 CA 0-31 C SN
f
2 +AZ
f
1 *AZ CF 16-32 C
(f
2 +!AZ)*F.IN1
f
1 *F.IN0
f
2
f
2 CB 0-31 C
f
1 *!AZ
OS*
f
2 B OBUS CS CBUS PWR
f
1
Switched Cap A
Port Inputs Bloc Outputs OBUS AGND V REF P[2:0] N[2:0] Bloc Inputs AGND V REFS G PWR CC CP CK F2 V DD G R CT Bloc AGND P(IN) AGND V REF V REF+ T[2:0] F[1:0] SC Bloc V SS
Continuous Time
CEN OS CBUS OBUS OUT GOUT LOUT CARR A.IN
CA Inputs REF Inputs A.SIGN
A.REF
CB Inputs B.IN
f
1
f
2 CC 0-31 C CA 0-31 C
f
2 +AZ
f
1 *!AZ
f
2 +!B.SW
CB 0-31 C
f
2 +!B.SW
CF 16-32 C
f
1 *AZ
(f
2 +!AZ)*F.IN1
f
1 *F.IN0
f
1 *B.SW
f
1 *B.SW
OS*
f
2 B OBUS CS CBUS PWR
Switched Cap B
User Modules
26
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
27
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) Pseudo Random Source (PRS) Cyclic Redundancy Check (CRC) Generator SPI Master SPI Slave Full Duplex UART IrDA receiver and transmitter
28
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
29
Software User Modules/ Reference Designs
Software User Modules:
I 2 C Master
I 2 C Slave
EEPROM
LCD – Interface for Hitachi HD44780 controller Reference Design (hard- and software)
LIN-Bus controller
300 Baud modem : Electronic Ballast For Fluorescent Lamps Q2 2003 Power Line Modem 2400 BAUD Q2 2003
31
Product Family
Flexible
, Highly
Integrated SOC
,
Cost-competitive
Solution
Flash RAM Marketing Part No.
(Kbytes) (Bytes) Single Battery Pump Package Pins CY8C25122-24PI CY8C26233-24PI CY8C26233-24SI CY8C26233-24PVI CY8C26443-24PI CY8C26443-24SI CY8C26443-24PVI CY8C26643-24PI CY8C26643-24PVI CY8C26643-24AI
4 8 8 8 16 16 16 16 16 16 256 256 256 256 256 256 256 256 256 256 N Y Y Y Y Y Y Y Y Y PDIP PDIP SOIC SSOP PDIP SOIC SSOP PDIP SSOP TQFP 8 20 20 20 28 28 28 48 48 44
32
PSoC Microcontroller Families
CY8C25xxx/26xxx
8 Digital PSoC blocks
12 Analog PSoC blocks 16k Flash
128-256 bytes SRAM
6-44 IO
CY8C27xxx
Improvements: - Analog - Digital
CY8C24xxx
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
34
Sample Roadmap
CY8C21xxx CY8C27643 CY8C21xxx CY8C26643 CY8C26443 CY8C26233 CY8C25122 Current CY8C27443 CY8C27233 CY8C21xxx Q3 2003 Q4 2003 CY8C27122 Q2 2003 CY8C24xxx CY8C24xxx Development
35
Cypress overview
Introduce Cypress MicroSystems & PSoC TM System on Chip
PSoC Designer Development Kit
Demo with Software and Dev. Tool
Support
Applications
Objectives
36
PSoC Designer
Integrated Development Environment
Device Editor -
Application Editor C Compiler
-
Assembler Librarian
-
Debugger
37
PSoC Designer
Device Editor – Modes of Operation Device Editor has Three Windows of Operation
Selecting
User Modules
Placing
User Modules
Specifying
Pin-out
Device Editor - The End Result
38 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”
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
40 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
41
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
42 CY3205-DK Basic Development Kit
Kit includes everything to support the 28-pin PDIP package
Price: $248
Development Kit
43
Pup Foot
PSoC ICE Pod Kits
Pod Mask
Smallest POD on the market fits customer PCB better.
Versions are available for all device/package types Sold separately to support various pin-outs Every part type/package type has a pod/foot
44
What is a Y-programmer ???
Programmer board with socket available for each package type Connects to ICE
45
Cypress overview
Introduce Cypress MicroSystems & PSoC TM System on Chip
PSoC Designer Development Kit
Demo with Software and Dev. Tool
Support
Applications
Objectives
46
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
47
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:
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:
48 Use on chip clock resources (24V1, 24V2) to generate clocks for selected User Modules
P2[2] 16-bit PWM ÷ 65535 (1.4Hz) 24MHz ÷16 (1.5MHz) 24V1 ÷16 (93kHz) 24V2 P2[3] 16-bit PWM ÷ 65535 (1.4Hz) PSoC devive Pup board
49
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
50
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)
51
Let’s Create Our Project
Select Project’s Language
Assembly and C languages available, (C, only if enabled) We’ll choose assembly
Select User Modules
52 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
53
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?
How to Place User Modules
54 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
55
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
Configure Global Resources
56 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)
57
Configure Global Resources
Ref Mux: Set to (V cc /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%
Configure User Modules
58 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.
- 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
59
Configure User Modules
PWM_1: We want to generate a 1/5 duty cycle
60
Configure User Modules
PWM_2: We want to generate a 2/5 duty cycle
-
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
61
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.
62
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
63
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.
64
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.
Configuration Complete!
65 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
66
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.
Create Application Code
67 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
68
Create Application Code
69
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
70
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
71
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
72
Execute Project Within Debugger
73
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
74
Execute Project Within Debugger
75
Cypress overview
Introduce Cypress MicroSystems & PSoC TM System on Chip
PSoC Designer Development Kit
Demo with Software and Dev. Tool
Support
Applications
Objectives
76 Self help knowledge base Submit online applications support with a 4 hour response guarantee
Community PSoC forum
On-line Support
77
Additional Support Resources
www.cypressmicro.com
Application Notes Reference Designs Cypress Field Application Engineers Cypress Design Center Engineers
Live Classes 4 Day’s a Week
Tele-Training
78
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
79
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
80
Cypress overview
Introduce Cypress MicroSystems & PSoC TM System on Chip
PSoC Designer Development Kit
Demo with Software and Dev. Tool
Support
Applications
Objectives
81
Application - Examples
82
Reference Design
Lin Bus Reference Design Available Now!
83
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)
84
Lin Bus Demonstration Board
Reference Design
Power Line Modem 2400 BAUD, EN50065-1 Compliance and a spare microcontroller 85 Remote monitoring / control applications
Thermostat
Lighting
Replace DALI in ballast
86
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 AC Hot AC Neut Ext 12.0 MHz Osc COMP PWM /12 PWM /100 BPF2 UM BPF2 UM BPF2 UM PWM /12 Delay Clk 3*SPIS LPF2 UM L.O.
120 kHz PGA COMP UART Rx
Reference Design
(CY3220BALLAST-RD)
Electronic Ballast For Flourescent Lamps Using PSoC
87 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.
88
Competitive Solution
Current Best Competitive Ballast Implementation MCU Ballast Controller IC Power Factor Chip Other Components $1.20
$2.50
$0.75
$8.55
Total ballast cost $13.00
STUFF all this into a single low cost PSoC
89
PSoC Value Solution
Current Best Competitive Ballast Comparison MCU Transistor Driver IC Power Factor Chip Other Components $2.20
$.45
$0.75
$7.80
Total ballast cost $11.20
PSoC costs more than the MCU it replaces, but the overall BOM cost goes down
90
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
91
PSoC Applications Tachometers
Traditional tachometer implementation Sensor Amplifier MCU Display driver GPIO @ $0.05/button Integrated Crystal A/D Converter EEPROM Total traditional cost $0.35
$1.00
$0.75
$0.10
$0.15
$0.75
$0.35
$3.45
Industry tachometer examples STUFF all this into a single low cost PSoC
92
Industry tachometer examples
PSoC Applications Tachometers
Traditional tachometer implementation PSoC MCU Display driver GPIO @ $0.05/button Integrated Crystal A/D Converter EEPROM Total PSoC cost $2.00
$0.00
$0.00
$0.00
$0.00
$0.00
$0.00
$2.00
93
Tachometer Block Diagram
TACH_1 Display Driver Core Tachometer function 8 bit Counter MPU EEPROM 600 kHz PGA Tach A=1 8 bit Count 30kHz Real Time Clock 30 kHz PWMs Timer Value HW Capture Charge Pump for Ultra Low Voltage Operation I2C More Filters, Amplifiers, A/D converters if needed Clocks for external use Random Number Generators
94
PSoC Application Motor Control
Fan Motor
PSoC Thermistor
Temperature
PGA
PSoC
ADC TIMERS LUT PWM UART RS-232
Temperature Speed Mode Control
95
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.
96
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
97
Industry examples
PSoC Applications Magnetic Card Reader
Traditional one or two channel magnetic card reader implementations Sensor Amplifiers MCU Display driver GPIO @ $0.05/button Integrated Crystal A/D Converter EEPROM $0.50
$1.00
$0.75
$0.10
$0.15
$0.35
$0.35
Total traditional cost $3.20 to $15 depending on application STUFF all this into a single low cost PSoC
98
Industry examples
PSoC Value
Traditional mag card implementation PSoC MCU Display driver GPIO @ $0.05/button Integrated Crystal A/D Converter EEPROM Total PSoC value $n.nn
$0.00
$0.00
$0.00
$0.00
$0.00
$0.00
$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!
99
Magnetic Card Reader Block Diagram
Display Driver 100 470pF Dual Magnetic Head 100 EEPROM 10K 33K 0.1uF
Real Time Clock x16 x10 PWMs Motor Drive Ref Lo – Comparators Charge Pump for Ultra Low Voltage Operation Bit Timer 1 Core Mag Reader PWM-1 Ref Hi UART Baud Rate Generator x16 x10 Ref Lo 10K 33K Comparators PWM-2 470pF 0.1uF
Ref Hi Bit Timer 2 I2C Tx Out
PSoC
100
PSoC Application Pyroelectric Motion Detector
Traditional PIR detector implementation Sensor Amplifier MCU Relay Driver GPIO @ $0.05/button Integrated Crystal Comparator EEPROM Total PSoC cost $0.35
$1.00
$0.35
$0.10
$0.15
$0.20
$0.35
$2.50
Industry PIR Detection examples
101
PSoC Value
Industry PIR Detection examples Traditional PIR detector implementation Sensor Amplifier PSoC Relay Driver GPIO @ $0.05/button Integrated Crystal Comparator EEPROM $0.00
$n.nn
$0.00
$0.00
$0.00
$0.00
$0.00
Total PSoC value $2.50
STUFF all this into a single low cost PSoC 75% of the Analog blocks and 61% of the digital block still available for free product enhancement.
102
PIR Element Display Driver Core PIR function MUX EEPROM PGA PGA
PIR Detector Block Diagram
Real Time Clock PWMs Charge Pump for Ultra Low Voltage Operation ADCINC 13Bit @ 240 sps MCU Alarm I2C More Filters, Amplifiers, A/D converters if needed Clocks for external use Random Number Generators PSoC
103
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
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
105
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
106
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
107
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
108
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
109
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