PSOC Logic Trainer

Thread Starter

danadak

Joined Mar 10, 2018
4,057
I see many posts here where beginners/students are doing basic logic design.

PSOC has a logic fabric that can be dragged and dropped onto a schematic canvas
and then wired up to pins. Also available is ability to use Verilog to do logic design.
Even a state machine wizard (or use LUT component) to implement sequential
machines.

PSOC as a part is much more than just this, with its ARM core(s), DSP engine, and analog
resources, but code less basic logic design quite simple, from gate level to MSI like components.
Component list attached, a component is a PSOC onchip resource.

Trainer article attached.

Two cheap dev boards, one $ 4 (PSOC 4), the other $ 10 (PSOC 5LP), and a arduino footprinted
board (PSOC 4 Pioneer) for < $30.

Dev IDE is PSOC Creator and compiler, both free - http://www.cypress.com/products/psoc-creator-integrated-design-environment-ide


Regards, Dana.
 

Attachments

Last edited:
I have seen you mention this in several other posts and it has caught my eye. However, when I follow any of your links I get info which is FAR above my level of understanding. Is there a tutorial or, even better, a beginner's kit with clear instructions?

At the moment I know nothing about programming. Back in the days of the IBM 1620 I could write FORTRAN IV, but those neurons have been replaced many times over the last decades.

Any help? Thanks.
 

Thread Starter

danadak

Joined Mar 10, 2018
4,057
There is a "PSOC 101" series, just google it, watch the first 4 for starters.

I started with FORTRAN in 70's and did a number of ASM, Basic over the years,
finally learned C (the prior languages really helped). The only aggravation I find
in C is its strongly typed. But today's tools warn you and offer suggestions in
some cases.

At the most basic level, if you do no code, you can still do basic logic just by
drag and drop, and wiring tool between the objects. But thats using 1% of the
capability of the part.

I urge you to tackle C if you want to do embedded work.

The boards to get started, 2, one $4, the other $ 10, the tool and compiler free.

http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits Low end

http://www.cypress.com/documentatio...oc-5lp-prototyping-kit-onboard-programmer-and High end

http://www.cypress.com/products/psoc-creator-integrated-design-environment-ide

Tons of projects already done -

https://www.element14.com/community/thread/23736/l/100-projects-in-100-days?displayFullThread=true

http://www.cypress.com/documentation/code-examples/psoc-345-code-examples

http://www.cypress.com/blog/problem-solver/100-projects-100-days-psoc-4-ble Bluetooth projects specifically

Those you can look at how code was done to get a "feel".


Regards, Dana.
 

dendad

Joined Feb 20, 2016
4,452
I may have another look to see if they have made it easier. When the PSOC boards were new, I purchased a stack of them but could not figure out how to drive them. My son, who is a very good programmer took a day to just wink an LED. That made me feel a bit better. Another friend had trouble too getting any sense out of them as well.
Feed back I sent was for them to try to make the boards easy to use, with demo code that actually worked. It may be I looked at them to early and a revisit is in order. I hope so, as they do sound wonderful, but so far, my idea is to snap off the USB to serial part of the boards and use that, and toss the rest.
 

Thread Starter

danadak

Joined Mar 10, 2018
4,057
Which board did you buy ?

The early PSOC 4 boards, CY8CKIT-049, did have driver/firmware setup
issues, the new release of Win 10 as I recall, compounding the problem,
that's long since behind us.

There is a "PSOC 101"series of videos that takes you thru a series learning
sessions, Lesson 1 has you blinking an LED pretty quickly. Most of these
videos 10 min or less.

There is also a series on "PSOC 101 Creator", for IDE, to get you over the "new"
IDE learning hump, eg. basic navigation to some advanced ones, like creating
custom components, DMA.....Dont watch them all, just the first couple.

Both series have an intro video, frankly does not add much, go to Lesson 1
right away.

I would say for a prior experienced embedded user fairly straight forward, for
a first time micro user it is a climb.

But for basic logic, where no code needed, its fairly easy to drag and drop and
config, then simple build and program execute.

I appreciate its easy for an experienced user to lessen the learning curve,
but the rewards are really quite significant. I use them now as test bed
generators for PSOC projects. where I need to generate stimulation inputs
to check out the project being worked on. Many times all within same project.

Regards, Dana.
 
Last edited:
Dana, Please tell me if I have understood the first four lessons. The device is really meant to enable Iot programs but in the examples you have posted over the last few weeks you are not really using the main purpose of the board, but are taking advantage of the built in and easily built programs to provide a simpler device which you do not intend to connect to the internet. Or am I totally misunderstanding?

Assuming I'm right, how much of the C language will I have to learn to operate one with some ease?

A side question--the instruction videos are not well laid out--no easy "next lesson" button. Are there any lessons especially about the two boards you often mention.

I want to thank you for posting this; whether I investigate further or just drop it I have learned something today.
 

Thread Starter

danadak

Joined Mar 10, 2018
4,057
You are right., Cypress uses the term IOT a lot lately, has made a big
investment in Bluetooth. However the origins of PSOC has been broad
based embedded/analog solutions.

Most of my activity has been as a general purpose processor with just
enough analog and DSP and logic fabric to solve many multichip designs
with one part.

The two boards are, in their view, so basic and general purpose there is
no board specific video I am aware of. However there is a 3'rd board, PSOC
Pioneer, which is a PSOC 4 board, low end, with Arduino footprint so it can
take various Arduino "hats" to do add other capabilities, like power drivers
for stepper motor. That board does have some videos. Its $ 30. There is an
equivalent board, with quite a few videos, for Bluetooth work. 3'rd listed below

http://www.cypress.com/documentation/development-kitsboards/cy8ckit-042-psoc-4-pioneer-kit $30

http://www.cypress.com/documentation/development-kitsboards/cy8ckit-044-psoc-4-m-series-pioneer-kit $25 (Better than above board)

http://www.cypress.com/documentatio...-042-ble-bluetooth-low-energy-ble-pioneer-kit $ 49 Bluetooth centric

I found C Basic like in its use, and started with simple stuff like define a variable, test
it against a constant or another variable, and then write to pins, or to display.... Every
component in PSOC (other that simple logic) has an associated datasheet and APIs
that you call to manipulate it, like start it, stop it, change its characteristics like duty
cycle of a PWM, or timer values for delay.....You right click a component and open
a config wizard for it or its datasheet to look at the list/description of APIs and how to
type them and pass variables to/from them.

Every PSOC part has ~ 30 -50 projects in the IDE you can use as a base to make your
own project. For example using an A/D that feeds a digital filter then using DMA stuffs a DAC
with output of filter to recreate filtered signal. Some simple and complex stuff going on, but you
can get the jist of code. Or a project that just blinks an LED.....

Watching the videos and doing the video examples helps with the learning curve.
Some people find computing aggravating, cannot deal with walls of newness, I see
that often with elderly trying to help them. I instruct them google in your own words
what you want, PSOC is same because it has a very deep forum on cypress.com.
You can do the same with C, web is rich with experience.

When I learn a new language or part I assign myself a simple problem. Like input a
frequency and get it out another pin / 10, or press a button, light an led. By doing
this it forces you to look at menus, and a C book or video, and things start coming
together.

Regards, Dana.
 

Thread Starter

danadak

Joined Mar 10, 2018
4,057
By the way, I am elderly, also afflicted with change resistant.

But the I am addicted to technology, cannot resist :)

Regards, Dana.
 
Dana, I fear I'm taking up too much of your time. If you want to say "Enough--no more hand-holding!" I won't hold it against you.
Suppose I buy one each of the $4 and $10 boards. Is there any documentation? You say no video which doesn't surprise me 'cause I looked pretty carefully But tutorials? App notes? Or do I have to get a larger board, learn the processes and transfer them to the smaller ones?

Thanks
 

Thread Starter

danadak

Joined Mar 10, 2018
4,057
Docs for each board at bottom of links I posted earlier.

Or do I have to get a larger board, learn the processes and transfer them to the smaller ones?
No, start with $ 4. It has less overall capability due to its chip PSOC 4, but more than
enough to get started. And of course there is the 100 projects in 100 days that you
can examine.

http://www.cypress.com/documentation/application-notes/an79953-getting-started-psoc-4

This video is for the PSOC Pioneer board, but can be run on this low end board, you just
have to change which pin is assigned to led.

http://www.cypress.com/video-library/psoc-software/how-get-started-psoc-4-turning-onoff-led/108361

Here is a general approach to blinking LED with PSOC Creator, eg. creating first project
from scratch.

https://learn.sparkfun.com/tutorials/freesoc2-introduction/getting-started-with-psoc-creator


Regards, Dana.
 
Last edited:

Thread Starter

danadak

Joined Mar 10, 2018
4,057
Some general pointers -

1) When you start a new project you have to pick the part you are working
with in the New Project dialog. The part number is in manual, or use a magnifying
glass and read it directly off chip.

2) When you drag a component (a resource inside psoc) out of catalog, screen on
right side) and drop it on schematic -

a. Double click it to invoke the configure wizard.
b. Right click it to rotate, flip....
c. Right click it to get to its datasheet

3) If you get an error when building project double click the error shown in build
output window at bottom of screen. Most, not all, of the time that will highlight the
code problem or a problem routing wire on schematic.

4) Supplied projects or ones you get off web. PSOC Creator does regular update
releases of the tool, and fixes/changes for components. So when opening one
of these projects you should first update components and their config as supplied
in the project. That's a menu item in upper most menu bar, "Project" followed by
"Update Components", do this after project is opened.

5) Modern IDEs, lots of windows, easy to loose a window. Two key windows,
schematic, 4 tabs on left hand explorer window, click "Components" TAB, then
"TopDesign.cysh" file in explorer window. Other main window to get to pins, clock
editor, other HW click "Source" TAB, then "Design Wide Resources" in explorer
window. In topmost menu "View" item gets you to other windows.



Regards, Dana.
 
Last edited:

Thread Starter

danadak

Joined Mar 10, 2018
4,057
The I/O on a 5LP is 62 general purpose I/O. There are additional dedicated I/O.

The PSOC 6 dual arm core BGA has 104 GPIO.

Regards, Dana.
 
Thanks, Dana. I guess I'll give it a $4 throw.

I to, am an old person--had my 83rd birthday a couple of weeks ago. I have to clear off my computer desk in order to work on electronic assemblys, so I usually only get a couple of hours a week hands on. So, don't expect to hear moans, cries of success, or begging for help for a while.

Thanks again.
 

dendad

Joined Feb 20, 2016
4,452
I just checked and the PSoC versions I have are the
10 x CY8CKIT-049-41-xx PSoC 4 and,
10 x CY8CKIT-049-42-xx PSoC 4.
Actually, now there are only 5 off each as I gave some away.
I'll have to dust off the Windoze box and see if I can work them. It would be nice if all the IDEs were available on Macs too.
 

Thread Starter

danadak

Joined Mar 10, 2018
4,057
I have seen some threads where VMWARE was used, also Wine, but
nothing that seems solid. You could always do a post at the Cypress
forum and see if any progress has been made.

Regards, Dana.
 

dendad

Joined Feb 20, 2016
4,452
I have been battling to load the IDE. Boy, there is a lot of hoops to jump through!
I must admit I hate to have to fill out my life history just to get the software to run so I can write code that will encourage me to buy their products. Why can't I just install something that works? There was an old install that the license had elapsed. It looks to be running even though I did not complete all the questions.
It may be a Win10 thing. I've had to update Visual Studio too. I really do not like Windows ;)
After being at it for ages, I think I'll quit for the day. I think the learning curve is going to beat me again.
 
Last edited:

Thread Starter

danadak

Joined Mar 10, 2018
4,057
Once you have downloaded only remaining disclosure item is to
get the license for the Keil Compiler, for PSOC 3, which you do
not need, most activity will be PSOC 4, 5LP, 6.

If you have an old version, just use Cypress Update Manager to
do the install. It in the Windows Menu where you start the old installation.

Regards, Dana.
 
Top