Newbie Q: Is the Basic_Counter available for PSoC 6?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

I am very new to the Cypress PSoC system, and recently started playing with the PSoC 6 BLE dev kit. I see that the set of digital components available for PSoC 6 in the IDE is missing some common ones I see in other PSoC designs - like  Basic_Counter, for example. Is it possible to import these type of components to PSoC 6, or do we need to create them? I'd appreciate any suggestions on how to make use of existing components.

Thanks

Mahesh

1 Solution
lock attach
Attachments are accessible only for community members.

I agree Mahesh, we are working on enabling the components in PSoC 6 soon.

Yes, you can use the verilog code but even easier way is to simply import the UDB component to your project and enable it for PSoC 6. This process of enabling the component would vary between components but for the basic counter it is very simple. Anyway I have enabled the component in the attached project for your testing - you can now import this component to your projects (Through "components" tab in the workspace explorer - right-click > import component > import from project/library > select the attached project and then select BasicCounter).

Let me know if this helps or if you need more guidance with this porting. To quickly summarize what I did for this project -

1. Imported the BasicCounter component through the above method but from "CyComponentLibrary" instead of my project. This component is present for P3/4/5 devices but not for P6.

2. To make sure the component is visible for P6, open the ".cysym" file > right-click in the empty area of the canvas that opens > properties > Doc.CatalogVisibilityExpression > change the value to "(GetFeatureParameter("m0s8udbif", "NUMUDB") > 0) || (GetFeatureParameter("mxudb", "NUMUDB") > 0) || (GetFeatureCount("S8_UDB") > 0)"

3. The above step will enable the component to be visible in the "Digital" tree of the component catalog. However the component will be incompatible.

4. In order to enable compatibility, open the ".cystate" file and search for PSoC 6. Now change the "State" to "Production" or "Prototype" and "Severity" to "None". This will enable the use of simple UDB components that do not require C code.

For the components that require C code, more steps are required and the steps vary with the component.

Regards,

Meenakshi Sundaram R

View solution in original post

7 Replies
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

Mahesh,

There is a digital counter component named as "Timer Counter" available from PSoC Creator component library. Please refer to code example CE220692 for details of implementation. In addition to this, it's also feasible use MCWDT as basic counter function.

Anonymous
Not applicable

Thanks!

I saw the "Timer Counter", but thought maybe it's overkill for a simple counter. I will read up on it.

0 Likes
Anonymous
Not applicable

fwan​ I see that the Timer Counter does not have an output like the simple counter - eg. cnt[3:0]. Is this something that can be enabled?

Thanks

Mahesh

0 Likes

Hello Mahesh,

Can you check the "Down Counter 7-bit" component in the components catalog and see if that serves your need (7-bit CNT output and down counter vs 2-32 bit up counting output in the basic counter)? Though we should be able to port the basic counter component to PSoC 6. But if you can make use of something that is already part of PSoC Creator, that would be ideal.

Let me know if the 7-bit counter serves your need or not, if not then we will discuss the possibilities of porting the simple counter to PSoC 6

Regards,
Meenakshi Sundaram R

0 Likes
Anonymous
Not applicable

Hi Meenakshi,

I see several examples where an n-bit up counter (eg. 2-bit. 4-bit, etc ) are used, so a 7-bit down counter won't be a substitute in those cases.

I realise that a counter for PSoC 6 can be created using the verilog code from BasicCounter.

But I am curious why some of the useful, common components are missing for PSoC 6. Another example is Debouncer - which is available for PSoC 5LP but not PSoC 6.

Regards

Mahesh

0 Likes
lock attach
Attachments are accessible only for community members.

I agree Mahesh, we are working on enabling the components in PSoC 6 soon.

Yes, you can use the verilog code but even easier way is to simply import the UDB component to your project and enable it for PSoC 6. This process of enabling the component would vary between components but for the basic counter it is very simple. Anyway I have enabled the component in the attached project for your testing - you can now import this component to your projects (Through "components" tab in the workspace explorer - right-click > import component > import from project/library > select the attached project and then select BasicCounter).

Let me know if this helps or if you need more guidance with this porting. To quickly summarize what I did for this project -

1. Imported the BasicCounter component through the above method but from "CyComponentLibrary" instead of my project. This component is present for P3/4/5 devices but not for P6.

2. To make sure the component is visible for P6, open the ".cysym" file > right-click in the empty area of the canvas that opens > properties > Doc.CatalogVisibilityExpression > change the value to "(GetFeatureParameter("m0s8udbif", "NUMUDB") > 0) || (GetFeatureParameter("mxudb", "NUMUDB") > 0) || (GetFeatureCount("S8_UDB") > 0)"

3. The above step will enable the component to be visible in the "Digital" tree of the component catalog. However the component will be incompatible.

4. In order to enable compatibility, open the ".cystate" file and search for PSoC 6. Now change the "State" to "Production" or "Prototype" and "Severity" to "None". This will enable the use of simple UDB components that do not require C code.

For the components that require C code, more steps are required and the steps vary with the component.

Regards,

Meenakshi Sundaram R

Anonymous
Not applicable

That's very useful information. Worked great, thanks!

Mahesh

0 Likes