CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Releasing I2C lines.

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
beaker404



Joined: 24 Jul 2012
Posts: 163

View user's profile Send private message

Releasing I2C lines.
PostPosted: Tue Sep 11, 2018 1:33 pm     Reply with quote

Is there a way to use I2C lines and then release them so they can be normal I/O lines in the program? I am needing to do some I2C commands then the slave device is putting a pulse out on the SDA line for timing from then on.

MPLAB V 8.91.00.00
CCS PCM C Compiler, Version 5.064, xxxxx
Windows 10
16F876 running on 5V.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Sep 12, 2018 12:34 pm     Reply with quote

This line will disable the hardware i2c module and release SDA and SCL:
Code:
i2c_init(FALSE);


If you're using streams then add the stream name:
Code:
i2c_init(stream, FALSE);
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group