I2C bit banging component

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

I2C bit banging component

跳至解决方案
891 次查看
Kewal
Contributor IV

Hi

 

There is a GenericSWI2C component available for bit banging but it is not compatible with KSDK 1.2.0 and KDS 3.0.

 

So is there any such component available for use with processor expert on KDS 3.0.

标签 (1)
标记 (1)
0 项奖励
1 解答
702 次查看
BlackNight
NXP Employee
NXP Employee

Hi Kewal,

you could create a project for Processor Expert without the SDK, then add the GenericSWI2C component and copy over the sources.

In the .c file there are the following macros

#define SCL_SetDir(dir) SCL1_SetDir(dir)

#define SCL_ClrVal()    SCL1_ClrVal()

#define SCL_GetVal()    SCL1_GetVal()

#define SDA_SetDir(dir) SDA1_SetDir(dir)

#define SDA_ClrVal()    SDA1_ClrVal()

#define SDA_GetVal()    SDA1_GetVal()

you would need to call the SDK functions.

I hope this helps,

Erich

在原帖中查看解决方案

0 项奖励
3 回复数
703 次查看
BlackNight
NXP Employee
NXP Employee

Hi Kewal,

you could create a project for Processor Expert without the SDK, then add the GenericSWI2C component and copy over the sources.

In the .c file there are the following macros

#define SCL_SetDir(dir) SCL1_SetDir(dir)

#define SCL_ClrVal()    SCL1_ClrVal()

#define SCL_GetVal()    SCL1_GetVal()

#define SDA_SetDir(dir) SDA1_SetDir(dir)

#define SDA_ClrVal()    SDA1_ClrVal()

#define SDA_GetVal()    SDA1_GetVal()

you would need to call the SDK functions.

I hope this helps,

Erich

0 项奖励
703 次查看
Kewal
Contributor IV

Anyways I achieved it through code warrior ..

thanks.

0 项奖励
703 次查看
Kewal
Contributor IV

Yeah, actually I tried before posting this question. I got an error with below description

Error during adding referenced component/template "Unsupported/Wait-UNSUPPORTED".

Component is either missing or corrupted.

It was just a project with processor expert and KSDK option as none. Also tried with codewarrior and found same issue.

Do i need to add any other component?

GenericSWI2C.JPG

0 项奖励