10 Replies Latest reply on Jul 6, 2020 3:52 AM by LePo_1062026

    How to begin?


      Looking for guidance, I've not used a cypress component before.  I've got a little project and want to use the CYW20737.  I'll be designing 2 circuits that will talk via bluetooth, one having a potentiometer to set the speed and the second to receive that level and drive a motor accordingly.  I've programed a microchip part a few years back but haven't used Cypress's tools before (and I'm old-school, got my EE degree back in the 80's).


      I've installed PSoC Creator.  I've watched some of the BLE videos with Alan Hawse.  But it still leaves lots of questions.  I need to make a bunch of these circuits (50?).  For example, with Microchip, I had a PicKit3 that plugged into the USB of my computer & I could program each component via some pads on the circuit.  I assume such a programmer also exists for Cypress?


      On the good side, PSoC Creator is 1000 times more stable than microchip's program (I spent 10 times more effort with their bugs than actually debugging the project!).  For questions like the above, where is the best place to ask them? 

        • 1. Re: How to begin?



          I earned my EE degree back in the 80's too.   Things are REALLY different since then!  So much to learn, so little time.


          I'm not sure I'm the best person to start you off.  But here goes ...


          I always try to find example projects similar to the type of thing I'm trying to accomplish.   Most of the time, I find multiple projects each with pieces of the 'puzzle' of what I'm trying to do.  I then study (and modify) each project 'piece' until that piece accomplishes the spec I need.


          For instance, there are examples about how to use an ADC to read a potentiometer value.  There are examples that show how to drive a PWM which can be used to drive FETs controlling a motor.


          The BLE is a more complicated piece of the puzzle. This is where I'm not as advanced as others.  There are examples about BLE comm.  But I'm not sure where to steer you.


          Because I'm a relative novice in BLE, I created a set of testing tools that you might find helpful.


          This workspace has two projects.  One is as a BLE Beacon (ie. the PSoC6 operates in Advertisement only mode.  It only advertises and never connects).  The other project is a BLE Scanner that looks for BLE advertisers (in this case the BLE Beacon.  It never connects.)  With the Beacon advertising certain pieces of data and the Scanner seeing this data and displaying it, this might be a good tool for you to get started.


          With these two projects, you could learn, as I did, how to control the PSoC6 BLE.   You could eventually modify the user data contained in the Beacon advertisement (such as providing a ADC signal from the potentiometer).  The Scanner can be fixed to look only for the Beacon and the advertisement data received can be decoded to drive a PWM/FET/Motor circuit.


          If you are interested, here is a link to the Beacon/Scanner workspace:  PSoC6 BLE Beacon and Scanner Projects Available in Code Sharing Forum


          I realize this is a lot to learn for old dog's like us but it's worth it.



          • 2. Re: How to begin?

            Good Morning Len!


            I'll look into your example.  Can you tell me about what tools does cypress provide for programming devices?  Looking at the CYBLE-013025-EVAL, it looks like they put a FT232 to interface from USB to program the device through I2C.  I could lay out a circuit board for just that function, but surely Cypress already has this!

            • 3. Re: How to begin?

              Actually, let me toss out another option.


              What I want done is a breeze for someone who's experienced with PSoC & BLE.  I can write the outline of how I want the programs to work.  Like a State Machine.  One for the speed controller circuit, one State Machine for the motor controller circuit.  We're probably talking 1-2 hours of programming time.  Maybe an hour on the phone with me to explain the various parts.  I'll fine tune it.  I don't mind paying someone to write the program & spend a little time with me on the phone.  Anyone interested in a little side work?  Or, is there a different part of the forum to request this?


              I can do circuit layout/design easily.  A little cost is well worth the severalhours it would take me to do the simple code.

              • 4. Re: How to begin?

                BTW, doing a bit more research, it looks like the MiniProg4 CY8CKIT-005 is the better programmer/debugger to get.  Is that right?  I see where the MiniProg3 can do the older PSoC3 parts, but is there a reason to go back to those?


                Would you recommend getting 2 of the miniProg4's?  That way I can put 1 computer on the slave circuit and another computer on the main circuit, and debug them at the same time.  That's my thinking, does anyone do this?  Or have issues?


                With the MiniProg4, let's say I've got 20 circuits to program.  Is the MiniProg4 good for doing a bunch at a time? With microchip, it wasn't a big deal to plug in one circuit and program it, then move to the next circuit and program it next, and so on...

                • 5. Re: How to begin?



                  As you pointed out, Cypress provides a separate programmer/debugger called the MiniProg4.   On all their PSoC6 kits and evaluation boards  Cypress includes a KitProg3 interface circuit.  The KitProg3 has a PSoC5 with special programming to support programming and debugging.  It has at least 4 port interfaces:  A USB to talk to the PC host, a JTag to program/debug the target PSoC6, a UART, I2C to the target PSoC6.


                  The KitProg3 is designed as a break-away to separate it from the target board.  Later, you can connect the headers between the two boards to reprogram or debug the target.


                  I find for myself not to just jump in to circuit layout directly.   I usually see what Cypress has for prototype eval boards.

                  For starters I tend to use the CY8CPROTO-063 board.  It's $20 and has many GPIO pin interface headers on it for me to create prototype interface boards.  I work with the prototype boards until I'm happy with the results of HW and SW then I commit to circuit layout.


                  Is your goal to use just one PSoC6 for the master and one for the slave?  Or do you plan to use multiple PSoC6s for master and for slave?



                  • 6. Re: How to begin?

                    A point of clarity.  What is the difference between the KitProg3 and MiniProg3?


                    I did pick up a couple of kits. One is the CY8CKIT-042-BLE, 'bluetooth low energy pioneer kit'.  Inside the boards aren't labelled, but there is a main board that has a USB port that goes to my PC.  And a few headers, one for the included plug-in BLE device.  It didn't have any small cables, so I didn't even think it would be a programmer.  I've done a basic blinking light program following the Alan Hawse PSoC BLE videos.  Is the main board a MiniProg3 or KitProg3?  Documentation is minimal with Cypress (both good and bad!).


                    Yes, I intend to have a simple single master/ single slave configuration.  I'd like to add a cell phone app as a second bluetooth controller, but that's the next stage.  That would let me use my phone to control it if my remote dies (which happens often enough in my world, it's a very abusive environment).


                    I'm not a college kid, I don't mine spending a little $$.  But let me get the right thing.


                    • 7. Re: How to begin?




                      What is the difference between the KitProg3 and MiniProg3?


                      The KitProgX (X = <no num>, 2 or 3) is usually attached to a KIT or eval board.  It is a PSoC5 with firmware for programming and/or debugging the target PSoC on the kit/eval.   On some Kits, the KitProg can be detached if desired.  On others (like the CY8CKIT-042-BLE) the KitProg cannot be separated.


                      Here a link for the KitProg parts of the Kits.  Select the KitProg version that applies to your Kit.



                      The MiniProgs are standalone programmer/debugger.   The MiniProg4 has a slight advantage that if the JTag 12 pin connection is supported on your target PSoC, you can use the debugger in trace mode.

                      Here are some info links:

                      MiniProg3: https://www.cypress.com/documentation/development-kitsboards/cy8ckit-002-psoc-miniprog3-program-and-debug-kit

                      MinProg4: https://www.cypress.com/documentation/development-kitsboards/cy8ckit-005-miniprog4-program-and-debug-kit


                      Which is better?  Let's just say that I've never purchased the MiniProg.  I've found for my needs that the KitProg handles everything I need.   Even in the cases where I create my own target PSoC PCB, I use a broken-off KitProg to program and debug if needed.






                      • 8. Re: How to begin?



                        in a previous post:

                        With the MiniProg4, let's say I've got 20 circuits to program.  Is the MiniProg4 good for doing a bunch at a time? With microchip, it wasn't a big deal to plug in one circuit and program it, then move to the next circuit and program it next, and so on...

                        In the last post:


                        Yes, I intend to have a simple single master/ single slave configuration.


                        I'm confused.  I'm going to assume one PSoC on the master and one PSoC on the slave.


                        You mentioned:


                        I did pick up a couple of kits. One is the CY8CKIT-042-BLE,


                        Are you planning on using the PSoC4 -BLE (used in the CY8CKIT-042-BLE) or the PSoC6 (since you posted this discussion on the PSoC6 forum)?



                        Inside the boards aren't labelled, but there is a main board that has a USB port that goes to my PC


                        There should be three PCBAs.  The large one is the KitProg with interface circuits for eval like Capsense, LEDs and others.  The next larger one is intended to be plugged into the large PCBA and programmed.  This PCBA is the PSoC4 BLE target.   The last smallest PCBA is designed for use with a diagnostic tool called "CYSMART". 


                        Here's a link to info about this kit and at the bottom more links to user guides, schematics board designs and the such.



                        Documentation is minimal with Cypress (both good and bad!).


                        There is usually plenty of documentation in the from of user guides, HW design files, Application notes, KBAs (Knowledge Base Articles) and examples.  However, they're not always easy to find on the Cypress Community forum.  You will find most of this info on the Cypress web site.


                        Back to your original question:  How do I get started?


                        I usually take the approach about getting the smaller pieces of HW and SW working and talking.  I make many projects (under one workspace) For example, if I need an LED to blink in a certain way, I create a project just to get it to blink.  This project contains a file called LED.c and LED.h that has these routines.   I get it working and provide a API (Application Programming Interface) to main() calls to exercise the functions.


                        Next if I have a motor drive, create a new project to design API calls and unit test the motor functions I want to support. 


                        If I need BLE comm functions, I basically do the same and create a new project to send BLE messages and another project to receive BLE messages.  I unit test these projects on separate HW to make sure the BLE comm paths are working.


                        Once, I have enough pieces unit tested and working I combine the source and header files from the other projects into the target project.


                        There's a philosophy I've used that begins with a question:  "How do you eat an elephant?"

                        Answer:  "One piece at a time".




                        PS:  Message me if you're interested in contacting me by phone.

                        • 9. Re: How to begin?


                          First, I can't find where to private message in this system.  How do I do that?


                          I got the PSoC4 BLE because, per the video series, that was what he used.  I didn't realize there was an eval board for every chip model.


                          It sounds like I need to pick up a couple of the right KitProgs with the right chip.  And one of the MiniProgs.  Find sample programs for each function and work them individually & suck them into the main program.

                          • 10. Re: How to begin?



                            It appears since the last Forum SW update, the messaging function is no longer available.  Hmm....   If you feel comfortable publishing your phone number here, I'll contact you.


                            When I mentioned in an earlier post on this discussion about a Beacon/Scanner example code, it is written for the PSoC6 eco-system.  If you're interested in the PSoC6 (faster and less current) Cypress has a few kits you can purchase. 


                            One is the CY8CPROTO-063-BLE.  It is $20.   This is a bare-bones board but has connections at the edge of the board to add headers to place prototype interface circuits.   https://www.cypress.com/documentation/development-kitsboards/psoc-6-ble-prototyping-kit-cy8cproto-063-ble


                            The other is the CY8CKIT-062-BLE.  It costs $75.   It is very similar to the CY8CKIT-042-BLE eval kit you have. It is a significantly larger board with built-in headers for Arduino-style boards.  It also has other circuits like an E-Ink Display card, a PDM microphone, thermistor and an accelerometer.  https://www.cypress.com/documentation/development-kitsboards/psoc-6-ble-pioneer-kit-cy8ckit-062-ble


                            For me, I've purchased a few of the CY8CPROTO-063-BLE boards.   They're cheap and small and can be packaged in smaller project boxes to be easily transportable.


                            I should mention: Both of the kits mentioned above use the KitProg for programming/debugging.   Therefore you can delay the Miniprog for a while.


                            If you prefer the PSoC4 BLE eco-system, I don't have nearly as much experience and my example will not work with it.