I2C slave

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
xy_283156
Level 2
Level 2

Hi, i need some help with programming a I²C slave. A function should called when the slave-address followed by a Stop condition appears on the I2C bus. In other words: A ADC-conversion should initiated by signaling a STOP condition after the slave has been addressed. Purpose is to save some bus overhead, because i don't have to transfer useless bytes. I hope you understand my problem. Has anyone an idea to do that? best regards

0 Likes
1 Solution
xy_283156
Level 2
Level 2

The stauts "I2C_SSTAT_WR_CMPLT"  is set when a STOP condition is received?

   

That would help, i thought it will set when the buffer is complete.

   

I will try that, thanks bob.

View solution in original post

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Did you try

   

I2C_SlaveStatus(() and check for I2C_SSTAT_WR_CMPLT
Slave write transfer complete. Set when a Stop condition is received.

   

 

   

Bob

0 Likes
xy_283156
Level 2
Level 2

The stauts "I2C_SSTAT_WR_CMPLT"  is set when a STOP condition is received?

   

That would help, i thought it will set when the buffer is complete.

   

I will try that, thanks bob.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

At least the datasheet states so. Please, be so kind to keep us informed.

   

 

   

Bob

0 Likes