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

How i2c_isr_state works after an interrupt
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
Ttelmah
Guest







PostPosted: Thu Sep 27, 2007 3:13 am     Reply with quote

The clock is not rising too early.
What you show, is correct behaviour.
The clock line is taken high, so that the data line can be raised with it already high, to signal the 'stop'. The data is read in the high period of the clock. For your whole transfer, the clock high times, are the same, and it reads
1 0 1 0 1 0 1 0 1 0 (MSB to LSB) correctly.
Then the clock line goes high again, for the 'ACK'. The data line is released here, so a '1' is read. At the end of this transaction, the clock is dropped, so that the data line can change (remember lines are only allowed to change in the 'low' periods of the clock time, for normal transactions). As soon as the data line is seen to be low, the clock can go high, then the data line rising, is the 'stop' condition.
The I2C timing diagrams, show dropping at all at this point as 'undefined', with a 'blip' shown on the clock line, with it able to be left high, or drop as the manufacturers see fit.

Best Wishes
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