How use pins from i2c

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        Hello. My project have two states: NORMAL and TEST. In NORMAL state I use i2c module. In NORMAL state I change state on the TEST. In TEST state I need use output pin from i2c (I want define logic level on pin SCL and SDA). Is it possible? Thank you.   
0 Likes
8 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum!When you initialize the I2C component, the pins become initialized, too. So if you stop the I2C component when it has run you may use the pins for your own purposes, but not with a hardware connection, only as software settings with Pin_Write() and Pin_Read.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

http://www.cypress.com/?rID=93401     AN86439 - PSoC® 4 - Using GPIO Pins

   

 

   

 

   

Also consult system ref manual in help menu of Creator, the GPIO section.

   

 

   

Regards, Dana.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        Why it does not work?   
0 Likes
Anonymous
Not applicable
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I cannot see something wrong so far.

   

There are still some questions regarding settings etc. Can you post your complete project, so that we all can have a look at all of your settings? Will make my life easier because testing will work faster.To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.



Bob
 

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        My leds pins work. I2C pins not work.   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

From the TRM -

   

 

   

   

 

   

From TRM also -

   

 

   

0 Likes
Anonymous
Not applicable
        If I added this code, i2c pins work. Thank you. reg32 regZal; regZal = I2CLCD_scl_PS; I2CLCD_scl_DR = regZal; I2C_SCL_HSIOM_REG = I2C_HSIOM_GPIO_SEL;   
0 Likes