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

cross mob
WolfgangCS
Level 3
Level 3
25 replies posted 50 sign-ins First solution authored

Hello,
How can I implement a Shift Register in the top design of PSoC Creator for a PSOC 6? The target device is the CY8C6347BZI-BLD43

0 Likes
1 Solution

@WolfgangCS ,

You can create a simple bit-bang method that is very low-HW cost.  It is very CPU intensive and may be lower in data transfer rates.

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

0 Likes
17 Replies
LeoMathews
Moderator
Moderator
Moderator
First question asked 500 replies posted 100 solutions authored

Hi @WolfgangCS 

The shift register component is incompatible in PSoC 6 device(CY8C6347BZI-BLD43). I believe you can implement one shift register using D- flip flops(DFF) if it fits your requirement as shown below.

LeoMathews_0-1691054537524.png

But the DFFs does not directly appear in the component catalogue for the PSoC 6 device. To import them DFFs to the component catalogue, please perform the following steps:

> Navigate to the components tab of your project and right click on the project, select import component option.

LeoMathews_2-1691055318670.png

> Select the DFF source component(cydff_v1_30) from the CyPrimitives library as shown:

LeoMathews_3-1691055662593.png

> The cydff_v1_30 appears under the project as shown:

LeoMathews_4-1691055792394.png

 

> Select the cydff_v1_30.cymacro file and you should be able to the DFF component in the window. Right click next to the component and select properties. Set the Doc.CatalogVisibilityExpression as true by clearing the default content and click on OK.

LeoMathews_5-1691055946382.png

> Execute the same for cydff_v1_30.cysym file(set the visibility to true).

> Now save the files and go back the project. You should be able to view the component in Digital>Logic>D Flip Flop.

LeoMathews_6-1691056569266.png

Thanks and Regards,
Leo

WolfgangCS
Level 3
Level 3
25 replies posted 50 sign-ins First solution authored

Hi @LeoMathews ,
Thank you very much for your response.
I apologize for the somewhat trivial question, but how is it possible that a "basic" component like a shift register is not in the libraries for PSoC 6 or is even incompatible?
My goal anyway is to be able to create a 19-bit shift register with the same settings as these in the figure.

WolfgangCS_1-1691075438658.png

 

WolfgangCS_0-1691075221468.png

 


Does 19 bits mean that I will have to use 19 DFF for one shift register? How can I initialize the same macro functions as the shift register using the 19 DFFs?

Thank you very much for your helpfulness

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

@WolfgangCS ,

The part you have selected (CY8C6347BZI-BLD43)  has no UDBs.   However similar parts have up to 12 UDBs which can implement a shift register.

Len_CONSULTRON_0-1691088239393.png

 

Len
"Engineering is an Art. The Art of Compromise."
lock attach
Attachments are accessible only for community members.
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

@WolfgangCS ,

I changed the part to CY8C6347BZI-BLD53 and use the ShiftRegister primitive.  It Application Builds without an issue.

Attached is the start of the project.

 

Len
"Engineering is an Art. The Art of Compromise."

Hi @Len_CONSULTRON,
Thank you for your reply.
I added the primitive of this shift register but there is no datasheet related to this component, where can I find its related functions to call in the main file?

0 Likes

@WolfgangCS ,

I'm not aware of a datasheet for any of the primitives.

Additionally there doesn't appear to be any .c of .h files that would hold API calls or special defines.

Primitives are intended to be used in a component.  They tend to be comprised of UDB editor files or usually Verilog source files.

Len
"Engineering is an Art. The Art of Compromise."

Dear @Len_CONSULTRON ,
Thank you for your response.
The doubt just occurred to me by also seeing that after doing Generate Application in PSoC Creator no .c or .h files related to the primitive were generated.
So there are no functions in C code that you can call for functions related to primitives? If so how can I read the inputs and outputs of this shift register primitive?
Thank you

0 Likes

@WolfgangCS ,

Good question.  I've design some custom components but I've never worked with a primitive.   Infineon would be a better source for this information.

However I looked at the cyfitter.h file.  I named my BShiftRegister to "BSR".

When you look in this file for the #defines with a "BSR_" prefix, you find all the registers involved with their respective physical addresses.

Len
"Engineering is an Art. The Art of Compromise."

I would not know how to contact Infineon other than through this community...

Also by creating a component is it possible to generate .c and .h files? Or anyway even using 19 DFFs I think nothing changes if you then have no way to read the output data via C language.

I apologize for my surprise or complaint, which will remain an end in itself anyway, but it seems really strange to me that for a PSoC 6 it is not possible to use implementations made with a PSoC 3.

0 Likes

@WolfgangCS ,

Yes.  Under PsoC Creator you can still create your own components.  With these custom components it is standard practice to create your own .h and .c files to create defines and API calls for SW access.

Note:  Creating a custom component is a sophisticated method and the documentation under Infineon resources are scattered across multiple documents.   Many subtopics for component creation may be a little on the "light"-side.  Therefore experimentation may be needed.

Overall, custom component creation is not for the "faint of heart".

Using my 19 DFF method strangely needs no SW access other than serially loading the bits and causing the Clocking using the Control register interface.

Many of the internal resources between the PSoC6 and PSoC3/PSoC5 are similar but at the register access-level not always the same.   

There is a way for the component author to change the interface to the registers using a conditional compile statements based on Device Family info.   Sometimes it is done.  Many times it is not.

Having said that, you can import the PsoC3 component and modify it to work with the PSoC6.  Again ... not for the faint of heart.

Len
"Engineering is an Art. The Art of Compromise."

But using the 19 DFFs, how do I read the bit string output to the 19th DFF? Currently, my problem consists precisely in reading the data in the SW part, since unfortunately the shift register primitive has no functions that can be called. 

0 Likes

@WolfgangCS ,

What's your goal here?

Are you using the SR to write data to another device or read data from an external serial stream?

 

Len
"Engineering is an Art. The Art of Compromise."

My goal is to use the shift register to read data from an AS5045 encoder with Synchronous Serial Interface (SSI). Previously the implementation was done with a PSoC 3 CY8C3246PVI-147 and now I need to do it with a PSoC 6 CY8C6347BZI-BLD53.

0 Likes

@WolfgangCS ,

You can create a simple bit-bang method that is very low-HW cost.  It is very CPU intensive and may be lower in data transfer rates.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
DennisS_46
Employee
Employee
100 sign-ins 50 likes received 50 solutions authored

An alternative is to use the Smart I/O, which has a data unit for an 8 bit shift register, then 8 more bits which can be registered. Some chips have two Smart I/O ports. These have been used for FSK demodulation.
---- Dennis

lock attach
Attachments are accessible only for community members.
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

@WolfgangCS ,

Attached is another version of the project that works on a CY8CKIT-062-BLE.

I used 19 DFFs.  I verified I get shifted data.

Len
"Engineering is an Art. The Art of Compromise."
LeoMathews
Moderator
Moderator
Moderator
First question asked 500 replies posted 100 solutions authored

Hi @WolfgangCS ,

Thread was locked due to inactivity for long time, you can continue the discussion on the topic by opening a new thread with reference to the locked one. The continuous discussion in an inactive thread may mostly be unattended by community users.

Thanks and Regards,
Leo

0 Likes