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

i2C pinout for 18F452

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



Joined: 23 Mar 2008
Posts: 50

View user's profile Send private message

i2C pinout for 18F452
PostPosted: Sat Mar 29, 2008 1:55 pm     Reply with quote

HI there-
In the data sheet for the PIC18F452, it lists pin C3 as SCL for the serial clock in/out for i2c mode, it also lists pin C4 as i2c Data I/O.

Do I have to use these pins for i2C communications? I have inherited a board that uses pins E1 and E2, both listed among other things, as digital IO.
Is there a way I can make this work?

The chip that I will be talking to is 24LC256/ 512.
Thanks!
N_N
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Mar 29, 2008 2:39 pm     Reply with quote

Just specify PIN_E1 and PIN_E2 in the #use i2c() statement.
The compiler will create software i2c code for those pins.
It will work perfectly well.

Make sure your board has pull-up resistors on SDA and SCL.
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