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

Can't get I2C in 18F452 working!

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Aug 06, 2007 1:15 am     Reply with quote

1. Make a simple test program, similar to the one in this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=30346&start=10

2. Don't use your eeprom routines. Use the CCS driver for the 24LC64.
Here is the driver file location:
Quote:
c:\Program Files\picc\Drivers\2464.c


3. Make sure that you have a pull-up resistor (4.7K) on SDA and
also on SCL.

4. Make sure the address pins on the eeprom (A0, A1, A2) are
all connected to ground. Also connect the WP pin to ground.

5. Post your compiler version. You can find it at the top of the .LST
file, which is in your project directory. The version number is a 4-digit
number in this format: x.xxx


Last edited by PCM programmer on Mon Aug 06, 2007 1:26 am; edited 1 time in total
40inD



Joined: 30 Jul 2007
Posts: 112
Location: Moscow, Russia

View user's profile Send private message

PostPosted: Mon Aug 06, 2007 1:24 am     Reply with quote

I have pull-up resistors on SDA and SCL...
I will try 2464.c...
And what about RTC?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Aug 06, 2007 1:27 am     Reply with quote

For this test, disconnect all other i2c chips from the i2c bus, except for
the eeprom.
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