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 CCS Technical Support

I2C Master Slave (18F4550) once again!? [FINALLY RESOLVED]
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

PostPosted: Sun Sep 02, 2007 2:16 am     Reply with quote

Hey Tim,

unfortunately i dont have a simple working code.. i've integrated it into a complex one.
But here it is:
state = SSPSTAT & 0B00101101;

Then do a switch case on the above mentioned table:
Code:

State      Incoming (i2c_read)
09          E0   (expected)  slave Address
29          00   (expected) data sent from master
29          42 ('B')   (expected)   "      "
09          E0   (expected)    slave address
29          00   (expected)  data sent from master
0D          E1  (here is the unexpected state 0D it should be 0C !!) master sends address with READ
2C          FF  (master reads)    (expected)


By the way revision B3 has no errata in i2c as mentioned on the microchip website!
GOOD LUCK
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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