cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ Creator & Designer

Anonymous
Not applicable

Hello all,

   

this is a UDB implementation of a 16-bit fixed point CORDIC for calculating the sine and cosine of a given angle. It is supported on PSoC 3 and can possibly (ignoring warnings) run up to 33 MHz. I've attached a demo project with the project library so try running it on the CY8CKIT-001 Devkit.

0 Likes
1 Solution
Bob_Marlowe
Expert II

I like that component!

   

Will there be a chance to implement this for PSoC5(LP) ?

   

 

   

Bob

View solution in original post

8 Replies
Anonymous
Not applicable

 Very cool!  how do you get the data into / out of the UDB, and how do you select sine / cosine calculation?

0 Likes
Bob_Marlowe
Expert II

Since it is the same algorithm sine and cosine are calculated at the same time and retrieved together. Have a look at the (excellent) documentation.

   

The initial angle to calculate from is given with the Start() API.

   

 

   

Bob

0 Likes
Bob_Marlowe
Expert II

I like that component!

   

Will there be a chance to implement this for PSoC5(LP) ?

   

 

   

Bob

Anonymous
Not applicable

 Good one 

   

0 Likes
Anonymous
Not applicable

 Thanks guys. 🙂

   

 

   

Yes, the API and usage information are in the accompanying datasheet. You simply need to call the Start(uint16 angle) API to start the calculation.

   

 

   

I originally intended for this component to be supported for both PSoC3 and PSoC5LP, but I've only had the chance to verify it on PSoC3. I Hope to get this done when I can get my hands on a PSoC5LP and have the time to develop it.

0 Likes
Anonymous
Not applicable

 Hi,

   

 

   

many thanks for that component too! Love to see, someone did this. 

   

 

   

Will there also be the inverse version phi = f(sin(phi), cos(phi)) for getting phase angle out of sine and cosine? I did this for myself but with less to none efford in space utilization and a lot more DP in use than you .

   

 

   

Bye

   

Franz

0 Likes
Anonymous
Not applicable

Yes Franz,

   

I'll be making the inverse version and adding it as a part of this component in the next version.

0 Likes
MaTr_1730276
New Contributor II

Hello,

did make the inverse version? I mean the version where I provide the sin/cos digital values to the component, and get the angle from the component output?

Thanks

0 Likes