I2C bit banging component

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

I2C bit banging component

Jump to solution
1,323 Views
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.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,134 Views
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

View solution in original post

0 Kudos
Reply
3 Replies
1,135 Views
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 Kudos
Reply
1,135 Views
Kewal
Contributor IV

Anyways I achieved it through code warrior ..

thanks.

0 Kudos
Reply
1,135 Views
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 Kudos
Reply