cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

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
Reply
4 Replies
Esteemed Contributor

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
Reply
Esteemed Contributor

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
Reply
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
Reply
Esteemed Contributor

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
Reply