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

Need help with simple I2C communications

 
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: Tue May 22, 2007 1:07 pm     Reply with quote

Start by programming your Slave PIC with the CCS example code
in Ex_Slave.c. It's in this directory:
c:\Program Files\Picc\Examples

Then use the sample code shown in this post for your Master PIC.
http://www.ccsinfo.com/forum/viewtopic.php?t=28097&start=9

That should work, and it will prove if your hardware is OK (ie., it has
pull-ups on the SDA and SCL lines, and a ground connection between
the two boards).

Don't try to use the 4x PLL oscillator in your initial test program.
Just run it at 10 MHz. Also, use the latest version of the compiler
or use vs. 3.249.
corbico



Joined: 23 Jan 2007
Posts: 3

View user's profile Send private message

Thanks
PostPosted: Tue May 22, 2007 7:16 pm     Reply with quote

Thanks to all for the info. With your help I was able to get the master / slave communications working as well as communicating with a battery pack on the smbus.
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