You are here

Matt's Tips: Finding Code Examples for PSoC Creator | Cypress Semiconductor

Matt's Tips: Finding Code Examples for PSoC Creator

This is a reblog from the PSoC Today! entry I did last May 2014.  I'm posting this again in hopes of getting more visibility for the example project finder in Creator.  I also plan to discuss some plans we have for example projects (which we will start calling "Code Examples") in the PSoC Creator forum.  That's here, in case you were unaware.


Users new to a tool almost always agree on one thing - more (good) examples are better!  Even experienced users don't want to reinvent the wheel.  To that end, this post will cover a few ways you can find examples for PSoC Creator.

The Example Finder

In PSoC Creator, there are a couple of ways to find example projects.  Many of you are familiar with finding example projects for particular components (I'll discuss this in a bit), but in Creator 3.X there is also an example finder accessible from the file menu. See the screenshot below.

 

 

 

 

 

 

 

 

 

Once you select "Example Project", you will get a search tool which allows you to customize your results based on keyword, architecture, etc.    Notice in the image below that once you select an example project from the left-hand side, there are two tabs on the right that give you more information about the project.  

(1) The documentation tab, highlighted in yellow in the screenshot, gives you a description of the project.  Sometimes the descriptions are elaborate and sometimes they are just a basic overview of what the project does.   Also notice the buttons at the bottom of the dialog box which allow you to add the project to the existing workspace or a new one.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(2) The Sample Code tab shows the code that comes with the example.  See the image shown next.  You can copy and paste code from this window if you don't want to use the example project as a basis for your new project.  I find this helpful to see how the various APIs for a given component are called.

Finding examples for specific Creator components

Most components have example project(s) associated with them.   You can find these projects by simply right-clicking on the component. See the image below. When I right click on the themistor component, one of my options is Find Example Project .

You can bring up this menu from the Component browser as well. While this feature has been around for a while, I still run across folks who have just not noticed it.  I'm out to fix that!  I use "Open Datasheet" and "Open Component Web Page" frequently as well.

The Future

In the future, we plan on adding both more examples AND more ways to search for the examples such as by solution space or by "degree of difficulty".  What examples would you like to see?  How would you like to search for them?  Hit me up in the comments or email me directly at mdl@cypress.com

Best regards to my brothers and sisters in PSoC.

--Matt


Matt Landrum, PSoC Software Customer Advocate

Cypress Semiconductor- Portland, OR

Comments

Bob Marlowe's picture

Hi Matt,
some of the problems that pop up frequently are not directly related to Cypress PSoCs, but may cost a lot of time until running as desired: Printing numbers.
Showing a float value formatted on the chacacter LCD or sent via UART or even USBUART to a controlling device. Yes, we all know functions like ftoa() or sprintf() but sometimes it is difficult to get them to work. Even the simple LCD needs some attention to right justify the output and keeping the update rate slow enough.
Room for an example project, the enhanced version to print int32, int64 and other formats.

MattLandrum's picture

Good comment, Bob. Thanks.

odissey1's picture

Hi Matt,
Besides "certified" examples from Cypress, there are numerous user's projects scattered through forums posts (some are very useful). What I am missing is a repository, similar to the Object Exchange by Parallax:
http://obex.parallax.com/,
where users can upload their projects.
Would it be too hard to allocate such web-space?
odissey1

Michael J's picture

Thanks for this Matt,

Just some thoughts when tracking down and implementing examples...

In my case, I often have to find, and build/run a project that uses some input device and displays some formatted output (as text, for demo to customers). [not lcd display]

Currently I have to add a uart to the program, insert lots of code and "ifdef" defines to catch debug, wire leads, find a rs232/usb plug run a terminal app.,etc, etc...

Everything thing works, but the whole process is very tedious and time consuming.

I have a request for a text output screen/window that runs via the standard programming usb port(in debug mode). Built into PSoC Creator.

Perhaps this is already available, but I have yet to see it.

Any thoughts?

Regards Michael.

78RPM's picture

I think a lot of users want help with DMA examples -- when to use multiple TDs versus multiple DMA components, how to adjust for coherency. Include samples of device to SRAM, SRAM to device, SRAM to SRAM, and with 8-bit and 12 to 16-bit examples.

Crusty's picture

Hi Matt,
I an New to PSoc and C but very much used to programming 8 bit.
I am also very pleased with my progress using examples and videos.
In the version of C that you are using in Creator 3x I seem to be having trouble in finding or getting instructions on how to add other functions such as #include. before I start hacking the environment I wold like to know where I can safely download functions not bundled with Creator. Tis might be a good tutorial?

jordanss123 jordanss123's picture

replica yeezy boost 350 Thanks for your submission. I also think that laptop computers are becoming more and more popular these days, and now will often be the only sort of computer used in a household.

 

 
sainianky835_2719406's picture

Feel some good and incredible with euchre games online games.Guys if are good gamer then you should go on this online game website 

nishgau28_2730811's picture

I was looking for some hacks for nba games as i play these games all the time, and I got a website which has cheats for all nba games. 2k18 locker codes ps4 With the help of it I was able to generate free VC and locker codes for my games. Now I have access to unlimited RP and VC. Its interesting.

 

Muneer Ahmed's picture

This is only the data I am discovering all over the place. A debt of gratitude is in order for your website, I simply subscribe your online journal. This is a decent blog.. Owensboro preschool

asadalikhatrint_2946251's picture

The Switzerland points of interest are many such that you have to book your Swiss ski packages, book hotel accommodation in advance, and visit Swiss Alps mountain region. hotel comparison sites

asadalikhatrint_2946251's picture

Your free voyante par téléphone is waiting for your call to the 0892 22 20 22 to deliver you a complete voyance par tel, and permits you to see the future. Love relationship, work, family... you got questions We offers you answers.

Muneer Ahmed's picture

This article gives the light in which we can watch the truth. This is exceptionally decent one and gives indepth data. A debt of gratitude is in order for this decent article.  subscription

asadalikhatrint_2946251's picture

I curious more interest in some of them hope you will give more information on this topics in your next articles. interesting blog posts

asadalikhatrint_2946251's picture

Play G7WIN’s Casino games the way you like! G7WIN offers a 'no download' Flash gaming platform, enabling you to instantly play a huge and diverse range of over 150 popular, as well as up and coming new games. Online Casino Malaysia

asadalikhatrint_2946251's picture

New Generation Top American brands with great comfort and quality. Latex waist trainer in London

Muneer Ahmed's picture

I've been contemplating composing an extremely tantamount post in the course of the last couple of weeks, I'll most likely keep it straightforward and connection to this rather if thats cool. Much obliged compare supplements

asadalikhatrint_2946251's picture

IOur focus is to supply a quality bespoke designed aluminium façade solutions to the commercial, institutional and mass residential sectors across the world. hulabond cladding

ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.