I2C and K20

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

I2C and K20

跳至解决方案
1,631 次查看
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

标签 (1)
1 解答
1,000 次查看
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

在原帖中查看解决方案

4 回复数
1,001 次查看
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

1,000 次查看
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 项奖励
回复
1,000 次查看
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 项奖励
回复
1,000 次查看
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!