Hi,
This I think it is not as simple a question as mentioned. However, the fastest duration at which data bits are shifted out will be decided by the execution time of the loop:
Thanks for response, but!
Your response didn't help me!
I already know speed is coming from that loops, but i don't know how to calculate
that!
I don't know how long is single instructions are executed!
Does any know how to calculate that?
u can the try hit and trail method ..... if I2C works without delay its ok ...... if not then put delay steadly bw loop untill it start work ...... or use simulator.
Hi,
Yes, the speed will be under 400KHz, since the clock Hi/Lo each has a 'Hold' delay which is equal to 3 NOPs and at 24MHz clock it works out to 1.5microsec. So, the maximum clock rate will be below 333kHz.
Keil has an excellent simulator. If you simulate the code, you will be able to see processor cycles, exact time period between clock cycle etc. Just calculate the frequency from time duration.