Quote Originally Posted by mackrackit View Post
Just thoughts...
Can you do one I2CREAD in place of six or at least narrow it down to three?
Code:
I2CREAD DPIN,CPIN,SAD_W,ZOUT_H,[Z.BYTE1]
I2CREAD DPIN,CPIN,SAD_W,ZOUT_L,[Z.BYTE0]
becomes
Code:
I2CREAD DPIN,CPIN,SAD_W,ZOUT_H,[Z.BYTE1,Z.BYTE0]
For the time thing you may want to look at this:
http://www.picbasic.co.uk/forum/showthread.php?t=190
and
http://www.picbasic.co.uk/forum/showthread.php?t=3251

Yep, they are interrupt based but...

First, thanks a lot for your reply. While, it does work if I reduce the I2CRead commands. So, do you think it could be better, if I use assembly codes to perform the I2CReads and I2Cwrites? What am I wondering is whether the I2C commands themselves are taking too much time.

The second part, I plan to use an RTC chip includes milisecond, you know, more hardware could enlarge the circuit a little bit....