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 Slave problem

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



Joined: 24 Feb 2010
Posts: 22

View user's profile Send private message

I2C Slave problem
PostPosted: Mon May 24, 2010 4:14 am     Reply with quote

Hi all,

I am trying to let two PICs communicate with each other over I2C. I am using a PIC24F16KA102 as the slave and a PIC24HJ64GP504 as the master.

The first problem I ran into was with CCS not wanting to configure the slave as a slave, stating Bad Option: SLAVE. The master does work, however. I tested it with the FRAM I have on the board.

I then decided to implement the slave device myself. It seems that the slave address gets recognized by the slave address, but I am not sure how to let the slave send an ACK bit. According to the reference manual the slave module will automatically generate the ACK bit, but I am not seeing this at the master.

Any help will be appreciated
Swys



Joined: 24 Feb 2010
Posts: 22

View user's profile Send private message

PostPosted: Mon May 24, 2010 6:13 am     Reply with quote

O, and I am using version 4.107 of the PCD compiler
christian.koji



Joined: 12 May 2010
Posts: 16

View user's profile Send private message

PostPosted: Mon May 24, 2010 8:59 am     Reply with quote

Hey, i had a problem with i2c too if u wanna u can take a look at this topic
http://www.ccsinfo.com/forum/viewtopic.php?t=42546
or this
http://www.ccsinfo.com/forum/viewtopic.php?t=42626

there is a functional master and slave for pic 18f452
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