I2C and K20

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

I2C and K20

Jump to solution
1,204 Views
lander
Contributor IV

Is the I2C component only available with the accelerometer for the kinetis k20 tower?  Are there any resources that are available that has an I2C example with the k20 board?  I used the demo code that works with the accelerometer but there are no PE components in the demo project.

I hope my question is clear enough,

Liz

Labels (1)
1 Solution
573 Views
deepakrana
NXP Employee
NXP Employee

hi

you did not mention the frequency of the controller you have with you

i take an example of the 72Mhz part. In your CW(10.) installation go to the path  location C:\Freescale\CW MCU v10.3\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\TWR-K20D72M .

If you are using a 100 Mhz part then you can use the example in the same location under the K60 board.

In this you will find a I2C based PE example.

Yes on FSL boards there is an I2C accelerometer so we have example for that. You can modify this code as per the I2C device you are using. Things you need to take care are the device address and the command flow for the I2C device of your choice. All the API required to communicate are part of the example project.

Hope this helps

Cheers

View solution in original post

4 Replies
574 Views
deepakrana
NXP Employee
NXP Employee

hi

you did not mention the frequency of the controller you have with you

i take an example of the 72Mhz part. In your CW(10.) installation go to the path  location C:\Freescale\CW MCU v10.3\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\TWR-K20D72M .

If you are using a 100 Mhz part then you can use the example in the same location under the K60 board.

In this you will find a I2C based PE example.

Yes on FSL boards there is an I2C accelerometer so we have example for that. You can modify this code as per the I2C device you are using. Things you need to take care are the device address and the command flow for the I2C device of your choice. All the API required to communicate are part of the example project.

Hope this helps

Cheers

573 Views
lander
Contributor IV

Do you know where I can find another copy of the I2C for K20 that was in the folder you showed me?  All I need is the ProcessorExpert.c,  I accidently modified it and I am trying to find the original.

I'm really new at this.

Thank you,

Liz

0 Kudos
573 Views
deepakrana
NXP Employee
NXP Employee

Hi

Run the installer of CW again and you get the orginal examples back

The processor expert examples come with the CW installation you cannot get them separate.

If you intend to modify them , the best is to copy the examples to a directory outside the installation folder and modify them

This way you will have a backup

0 Kudos
573 Views
lander
Contributor IV

Yes, it is the 72MHz!  Thank you, I had no idea all this PE code was on my computer.

Have a great day!