F-RAM I2C writing and reading Data Master-Slave using Pioneer BLE 042 kit

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

cross mob
Anonymous
Not applicable

Hello,

I am an engineering student, I have purchased the CY8CKIT-042-BLE kit. Well, I'm new with the kit and I am trying to write a basic code to writ and read data using an I2C Master.
To write my code, I used this driver : http://www.barth-dev.de/using-the-fram-of-the-psoc-4-ble-pioneer-kit/

What I did, is that I created new project, I put an I2C Master in the schematic and I created a header file then I copied the code from FRAM.h and past it in the new header file. 

   

in the other hand I copied the FRAM.c code and past it into the main.c (I am not sure if this is the correct way to use the driver) when I compile I do not get any errors.

Well, my question is : this is the right way to use the driver ? If yes, If I want to write a code that write and send data from Master then read it from Slave, should I open a new void main after the driver ? and which functions should I use to read and write because I'm confused with all those functions that I find in the documentation : http://www.cypress.com/file/274551/download

Thank you very much for answering,
Saban

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum, Mohamed.

   

At http://www.cypress.com/documentation/development-kitsboards/cy15framkit-001-cypresss-serial-f-ram-de... you can find the installation files for a Cypress fram kit. These include I2C examples.

   

The way you were building up your project was quite right, provided the given drivers from HP were correct and did not use C++.

   

 

   

Bob

View solution in original post

0 Likes
1 Reply
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum, Mohamed.

   

At http://www.cypress.com/documentation/development-kitsboards/cy15framkit-001-cypresss-serial-f-ram-de... you can find the installation files for a Cypress fram kit. These include I2C examples.

   

The way you were building up your project was quite right, provided the given drivers from HP were correct and did not use C++.

   

 

   

Bob

0 Likes