cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

MaTr_1730276
New Contributor II

Hello everybody,

I have implemented the CORDIC as shown in AN2341 using PSoC5LP with very good result in terms of speed by means of Look Up tables.

I reached a speed of 8us to get a complete conversion (considering also the sign of sine and cosine to extend my results up to 360°).

For a new application I would to use the same algorithm but in this case I'm encountering a problem.

I have to divide the 360° into 2400 step to reach my resolution, so the sign 8 bit used in AN2341 do not lead my system to an appreciable accuracy.

I need to increment the CORDIC to at least 10 bit.

Could anyone help me to get extended the look up tables to 10 bit values?

Thanks and regards

0 Likes
1 Solution
himam_31
Employee

Hello Manuel,

We do not have any examples for 10bit implementation as of now. Could you share your current project. The implementation of Lookup tables in the current project might help in suggesting 10bit.

Thanks,

Hima

View solution in original post

0 Likes
7 Replies
himam_31
Employee

Hello Manuel,

We do not have any examples for 10bit implementation as of now. Could you share your current project. The implementation of Lookup tables in the current project might help in suggesting 10bit.

Thanks,

Hima

View solution in original post

0 Likes
MaTr_1730276
New Contributor II

Hello Hima,

thanks for your answer.

In the meanwhile I modified the 8 bit LUT.

I created a 9 bit LUT with the 24640 value necessary for the whole combinations.

I tried to compile the 10 bit modified LUT but it takes too values to be stored in ROM (>96000) and they cannot be stored because there not enough space in my device.

At the moment I'm trying the 9 bit version.

Thanks and regards

0 Likes
odissey1
Honored Contributor II

m.trotta,

Check this UDB  implimplement of CORDIC

CORDIC v2.0

/odissey1

0 Likes
MaTr_1730276
New Contributor II

Hello odyssey,

I already checked the UDB implementation of CORDIC but unfortunately it's too slow for my application.

I can obtain a new data from the UDB after ~80us.

With software implementation using LUT I can reach 8us..

0 Likes
odissey1
Honored Contributor II

m.trotta,

Attached is a demo project of 10-bit signed sine table (FastSine10). Typically takes 50 CPU clocks to obtain result, which is under 1us. Look-up table is folded 8-bit, occupying only 256 bytes in SRAM. Will that help?

/odissey1

FastSine_01a.png

0 Likes
MaTr_1730276
New Contributor II

Hello Odissey,

I can find the attachment..  However, the Demo seems to be a sin() function generator.. What I'm looking for is a arctan() function, where I provide sin and cos to the function and then it returns the angle!

0 Likes
odissey1
Honored Contributor II

m.trotta,

Sorry, it is not an arctan()...

0 Likes