Setting up I2C connections on K70

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting up I2C connections on K70

1,343 Views
nicholasconstan
Contributor I

Hello!

I am looking for some tips and guidance. I am looking to setup an I2C connection between a K70 board and an old TWR-RF board. Can someone direct me to a useful demo or discussion regarding this task? Also I want to make sure I have my jumpers in the proper positions.

For the TWR-RF board I have J8 on and J9 off to manage off board power, a jumper on pins 11 - 12 and 13 - 14 on J1 to manage the I2C data and clock running between the RF board and the elevator.

Any help will be greatly appreciated! Thank you!

Labels (1)
Tags (3)
0 Kudos
9 Replies

837 Views
RadekS
NXP Employee
NXP Employee

Hi Nicholas,

as free inspiration you can use my example code for I2C communication with accelerometer sensor:

https://community.freescale.com/docs/DOC-104587

It is not what you really want, but it could be better than nothing.

Example used I2C bus in pooling mode and it integrates two approaches for waiting for new data:

  1. GPIO pin interrupt could be used for signalize when slave has new data
  2. Or master could periodically read slaves status.

I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

837 Views
nicholasconstan
Contributor I

My goals are to have a interrupt driven task using MQX. The end result is to have to TWR-LCD screens communicating state changes to one another using zigbee.

0 Kudos

837 Views
nicholasconstan
Contributor I

More Background information:

The application I am building should result in the ability for two towers to play tic tac toe against one another. The users of the towers can interact with the game using a gui displayed on the TWR-Graphical-LCD. The two towers should then transmit the latest move over a zigbee connection. My thought is that in order to have the zigbee board attached to the TWR-RF communicate to the K70 board I should utilize the I2C connection available through the elevator.

What I have accomplished thus far is a working tic tac toe gui which stores the games data in an array. I also have a working zigbee connection between two towers. The massive hole is connecting these two working parts together.

0 Kudos

837 Views
egoodii
Senior Contributor III

Is this all already running under MQX?

0 Kudos

837 Views
nicholasconstan
Contributor I

Yes

0 Kudos

837 Views
egoodii
Senior Contributor III

So I take it you are looking for a 'worked example' of of a proper blocking-task utilizing the MQX I2C interrupt-mode interface.

0 Kudos

837 Views
nicholasconstan
Contributor I

Yes

0 Kudos

837 Views
egoodii
Senior Contributor III

Well, it doesn't look like anybody with THAT info is going to respond on THIS thread.  I suggest you submit a new question with that specific request.

0 Kudos

837 Views
egoodii
Senior Contributor III

What are your GOALS for the I2C firmware tasks?  Are you looking for the 'simplest bare-metal polled interface', or are you looking for a full background, interrupt-driven state machine to handle it all with minimal processor clocks?  Or MQX? OR uTasker!

0 Kudos