So the main problem are the timings?
The main problem (at the moment) is that you had a perfectly good driver that works for everyone with your compiler...and you changed it so that it doesn't work any more.
You need to post what happens when you haven't tampered with the driver.
You also need to ignore the CLKSYNC register..it has nothing to do with this.
I suggest you compile this....
void main()
{
IIC_INIT();
while(1)
{
IIC_start();
IIC_write(0x60);
IIC_write(0xfd);
IIC_write(0xc0);
IIC_stop();
}
}
...which will compile on your compiler and run it (forever) until you get an ACK back from the AS1130. If you don't it can only be 1 of 2 things.
1) You have the wrong address (Iwould suggest trying 0x30 which is the 7 bit addr)
2) Something is wrong with your hardware.
Every write should get an ack.
NEVER EVER think you can solve a problem by changing ANYTHING that comes with a compiler (unless you know EXACTLY what you are doing)
The delays in your driver are there for a reason...
Popcorn anyone?
