Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 1 > Accessing Registries via I2C Communication

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



Accessing Registries via I2C Communication
Moderator:
ARVI

Post Reply
Follow this topic



Accessing Registries via I2C Communication

Burnap posted on 09 Jul 2011 3:05 PM PST

1 Forum Post

Hello everyone, this is my first post and my first real endeavor into such a project.  First of all, I would like to commend Cypress for the state-of-the-art technology.

I just started using PSoC a few days ago and am using the CYONS2000xLBxC for laser navigation purposes. 

I am using the PSoC Designer 5.1.

I believe I have initialized communication between the CYONS2000-LBxC and the MCU via I2C. I have simply used the source code "Example_I2CHW" from Cypress's Source Code section and am having a tough time writing the C code to access the respective registry in which I would like to extract data from. 

The data I wish to extract is that of the X and Y displacements sensed, which is recognized by the number of counts acknowledged (i.e. 800 Counts = 1 inch). This data needs to be transmitted using the I2C and into the MCU interface so that the positional values are attained. 

At this stage, I am using the Example_I2CHW project as a base and am trying to write valid code so that this objective is met. Am I on the right track? Is there any helpful references you could supply me with? Am I even making sense?

Thanks a million in advance,
Andrew




Re: Accessing Registries via I2C Communication

graa posted on 14 Jul 2011 07:43 PM PST
Cypress Employee
275 Forum Posts

I have written to the ONS navigation product experts to provide you with information on your questions.

 

Best Regards,

Ganesh 



Re: Accessing Registries via I2C Communication

JMIG posted on 15 Jul 2011 11:32 AM PST
Cypress Employee
1 Forum Post

 Hi Andrew,

Judging from your interaction with John on the CRM system, you may have already answered several of your own questions, but just in case, I thought that I would give you some hints:

Your project should use at least two user modules: I2CHW for communication and LaserNAV to implement the tracking engine. There is a large amount of reference material about how to use these user modules available right at your fingertips in PSoC Designer in the form of user module datasheets. To access them, simply right-click on the user module that you want to learn how to use in either the Workspace Explorer or User Module Catalog window, and select one of the view options in the 'Datasheet' drop-down menu.

Contained in these  datasheets, there is a description of the APIs that the user module makes available to you, and some example code which shows how it is used. I recommend using the example code in the LaserNAV and I2CHW user module datasheets as a starting point, and reading through the list of API descriptions to learn how to combine, use, and modify that example code to build a project which meets your requirements.

For example, the LaserNAV_fReadXYCounts(&XYData) function will update the XYData array with the current movement information from the sensor. 

Anyway, again, it seems like you may have figured a lot of this out on your own. If you have any additional concerns, John and I can answer them most effectively through the CRM system.

Regards,

-James






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