introduction to psoc creator for 6.131 and 6 -...
TRANSCRIPT
![Page 1: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/1.jpg)
Introduction to PSoC Creator for
6.131 and 6.115
Massachusetts Institute of Technology
Department of Electrical Engineering and
Computer Science
![Page 2: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/2.jpg)
Section Objectives
You will be able to:
• Follow the PSoC Creator Design Flow and develop
projects
• Find and use the tools available within the software IDE
• Compile, build and program PSoC 3/5 applications
• Debug PSoC 3/5 applications
![Page 3: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/3.jpg)
Configure
• Start a new project
• Place components
• Configure components
• Connect components
Develop
• Build hardware design and generate component APIs
• Write application code utilizing component APIs
• Compile, build and program
Debug
• Perform in-circuit debug using the MiniProg3 and PSoC Creator
Reuse
• Capture working hardware/software designs as your own components for
future use
PSoC Creator Design Flow
![Page 4: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/4.jpg)
1. Go to www.cypress.com
2. Go to ProductsProgrammable System-on-chipPSoC
Software
3. Click on PSoC Creator. (PSoC Creator is the IDE for PSoC
3 and 5 designs, PSoC Designer is for PSoC 1 designs)
4. Click download. Scroll to the bottom of the page and click
on the first link.
5. You will be prompted to login. Create an account to do so.
6. Use the download manager. Click “launch.” Install the
typical version of Creator. Run the update manager.
Step 1: Download PSoC Creator
![Page 5: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/5.jpg)
Step 2: Start PSoC Creator
![Page 6: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/6.jpg)
Update to PSoC 5
FileNewNew Project
Step 3: Create a New Project
![Page 7: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/7.jpg)
PSoC Creator Design Canvas
![Page 8: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/8.jpg)
Drag pin from Component Catalog on right
Step 4: Place/Configure Digital Pin
![Page 9: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/9.jpg)
Catalog Folders
• Analog – ADC
– Amplifier
– DAC
• Digital – Registers
– Functions
– Logic
• Communication – UART
–Display
–System
Datasheet access
Component Catalog
![Page 10: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/10.jpg)
Drag needed components from Component Catalog
Step 5: Adding Other Components
![Page 11: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/11.jpg)
• Double-click on a component to open its component
configuration dialog box
• Change configuration
• Click on Datasheet in bottom left corner for component
description and APIs
Step 6: Component Configuration
![Page 12: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/12.jpg)
Contents: • Features
• General description of component
• When to use component
• Input/Output connections
• Parameters and setup
• Application Programming Interface
(API)
• Sample firmware source code
• Functional description
• DC and AC electrical
characteristics
Component Datasheets
![Page 13: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/13.jpg)
Step 7: Connecting Components
Use wire tool (or shortcut key “w”) to connect components
wire tool
![Page 14: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/14.jpg)
Clocks
Interrupts
• Set priority and vector
DMA
• Manage DMA channels
System
• Debug, boot parameters, sleep
mode API generation, etc.
Pins
• Map I/O to physical pins and ports
• Over-ride default selections
Design-Wide Resource Manager (.cydwr)
![Page 15: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/15.jpg)
In .cydwr file, route schematic pins to physical pins on the
PSoC chip (on right: name to pin mapping)
Step 8: Configure PSoC I/O
![Page 16: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/16.jpg)
• Priority may be changed: defaults to 7 (lowest priority)
• Edit ISR code in interrupt Creator-generated .c file
Interrupts
Creator-generated ISR
![Page 17: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/17.jpg)
System
• System settings
• Debug settings
• Voltage Configuration
![Page 18: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/18.jpg)
Clock Configurations
• Clocks are allocated to slots in the clock tree
• 8 digital, 4 analog
• Clocks have APIs
• Reuse existing clocks to preserve resources, if possible
Clocking tree
![Page 19: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/19.jpg)
System Clocking Tree
![Page 20: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/20.jpg)
Step 8: Add main.c Code
![Page 21: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/21.jpg)
Step 9: Build Project
Errors/warnings here
![Page 22: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/22.jpg)
Step 9: Build Process
• API Generation
• Compilation
• Configuration Generation
• Configuration Verification
Generated APIs
![Page 23: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/23.jpg)
Step 10: Program Device
![Page 24: Introduction to PSoC Creator for 6.131 and 6 - MITweb.mit.edu/6.131/www/document/creator_for_mit.pdf · 2019-12-09 · Introduction to PSoC Creator for 6.131 and 6.115 Massachusetts](https://reader034.vdocument.in/reader034/viewer/2022042322/5f0caed17e708231d4369def/html5/thumbnails/24.jpg)
Step 11: Debug
Memory contents