Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® Software > Quaternion C Library

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Quaternion C Library
Moderator:
JFMD

Post Reply
Follow this topic



Quaternion C Library

kokovec posted on 19 Dec 2010 12:23 PM PST
Member
10 Forum Posts

I'm not sure if this should be posted elsewhere but...

 Does anyone know of any quaternion libraries or functions geared towards microcontrollers like PSOC5?
It would be nice if Creator came with some extended math libraries for robotics or other 3D applications.

 




Re: Quaternion C Library

Robert-CY posted on 10 Jan 2011 02:55 PM PST
Cypress Employee
129 Forum Posts

I'm not sure if this should be posted elsewhere but...

 Does anyone know of any quaternion libraries or functions geared towards microcontrollers like PSOC5?
It would be nice if Creator came with some extended math libraries for robotics or other 3D applications.

 

Hi,

did you find quaternion routines that are available either in "C" source or even better already tested on an ARM-Cortex core? It would be nice to share information like robotic related software here on this forum.

Robert



Re: Quaternion C Library

victoraargote posted on 14 Jan 2011 10:43 AM PST
Top Contributor
26 Forum Posts

Here is some source code for making Quaternion operations in C and other languages, i think you can take the code from here and create an own library.

 

http://rosettacode.org/wiki/Simple_Quaternion_type_and_operations

 

Regards,

Victor Andres



Re: Quaternion C Library

kokovec posted on 16 Jan 2011 12:04 PM PST
Member
10 Forum Posts

Thanks for the link!

I've been using matrix math as a workaround for now.
Eventually I'll get motivated enough to develop some quaternion functions for the PSOC5 when the dreaded gimbal lock gives me no other choice.

Of course if Cypress wants to help out the robotics and graphics community it would be much appreciated 

It's not only useful for robotics though: http://www.youtube.com/watch?v=O-E0BgYP0qw

 

 



Re: Quaternion C Library

kiku posted on 18 Jan 2011 10:00 AM PST
Cypress Employee
61 Forum Posts

 Hi,

 

Your video seems very interesting. Could you give some more details on what are all the interfaces you have made and how exactly you are using PSoC for your application?


Regards,

Kishore.



Re: Quaternion C Library

kokovec posted on 03 Feb 2011 12:01 PM PST
Member
10 Forum Posts

 I'll try.

Basically I'm working on a memory expansion module for the Vectrex (an 80's video game machine).
Vectrex games came on a cart with up to 32K of ROM. The Vectrex itself has 2K of RAM of which only 874 bytes are available to the programmer. This setup gives the Vectrex an extra 18K of RAM that is also visible to the PSOC5.

The system has 3 components. The PSOC, a 32K SRAM chip (from Cypress of course) and a game cartridge.
The Vectrex address bus, data bus and sync signals are extended out to all components. The PSOC logic blocks are designed to arbitrate these signals between all the devices. The PSOC can take control of the external RAM chip while allowing the Vectrex to keep reading the 32K game cart. In effect acting like a co-processor (of sorts).

The Vectrex can send "commands" to the PSOC by using memory registers in the expanded RAM. A read or write to a certain address will cause an interrupt event for the PSOC. The PSOC then performs the operation and flags the Vectrex when it's done. Meanwhile the Vectrex is free to perform other tasks that do not use external RAM and doesn't have to wait for the PSOC.

The Y-tube video shows the Vectrex using the PSOC to perform 3D rotations of objects it stores in the external RAM.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20