UDBs for trigonometric functions???

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

cross mob
Anonymous
Not applicable

Hi,

   

A program I just finished makes extensive use of cos() sin() functions, which makes the whole algorithm way too slow on a PSoC 5LP at 67MHz...

   

I was wondering, could UDB be programmed to calculate this functions somehow via hardware... (I'm in the process of trying Taylor/Cheby polynomials, but a hardware solution would definitevitely do it!!  )

   

THANKS!

0 Likes
4 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

CORDIC algorithim one approach -

   

 

   

    

   

          http://en.wikipedia.org/wiki/CORDIC

   

 

   

The there is alwas UDB asm and editor to construct your own

   

 

   

    

   

          http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0CDcQFjAC&url=http%3A%2F%2Fteal.g...

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Another approach is use of a lookup table, size and element size

   

of course controlling accuracy.

   

 

   

If you google "embedded sine algorithms" you will get a number

   

of hits on papers, solutions.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

 Thanks Dana, 

   

I'm aware of the different approaches to calculate a sin, cos more efficiently.... I'm just not sure which one could be programmed into UDBs since I haven't looked into them on detail.... I'll look onto de cordic alg.

   

thank you

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Here is UDB based CORDIC -

   

 

   

    

   

          

   

http://portal.cypress.com/?app=forum&id=2492&rID=73361

   

 

   

http://www.cypress.com/?app=forum&id=2492&rID=74650

   

 

   

 

   

Regards, Dana.

0 Likes